queryablecollection.java

来自「用Java实现的23个常用设计模式源代码」· Java 代码 · 共 58 行

JAVA
58
字号
//$Id: QueryableCollection.java,v 1.1.2.2 2003/10/12 13:11:18 oneovthafew Exp $
package net.sf.hibernate.collection;

import net.sf.hibernate.persister.Joinable;
import net.sf.hibernate.persister.Loadable;
import net.sf.hibernate.persister.PropertyMapping;

/**
 * A collection role that may be queried or loaded by outer join.
 * @author Gavin King
 */
public interface QueryableCollection extends PropertyMapping, Joinable, CollectionPersister {
	/**
	 * Generate a list of collection index and element columns
	 */
	public abstract String selectClauseFragment(String alias);
	/**
	 * Generate a list of collection index, key and element columns
	 */
	public abstract String multiselectClauseFragment(String alias);
	/**
	 * Get the names of the collection index columns (optional operation)
	 */
	public abstract String[] getIndexColumnNames();
	/**
	 * Get the names of the collection element columns (or the primary key
	 * in the case of a many-to-one association)
	 */
	public abstract String[] getElementColumnNames();
	/**
	 * Get the names of the collection key columns
	 */
	public abstract String[] getKeyColumnNames();
	/**
	 * Get the extra where clause filter SQL
	 */
	public abstract String getSQLWhereString(String alias);
	/**
	 * Get the order by SQL
	 */
	public abstract String getSQLOrderByString(String alias);
	/**
	 * Does this collection role have a where clause filter?
	 */
	public abstract boolean hasWhere();
	/**
	 * Get the persister of the element class, if this is a
	 * collection of entities (optional operation)
	 */
	public abstract Loadable getElementPersister();
	/**
	 * Should we load this collection role by outerjoining?
	 * (if so, must implement <tt>QueryableCollection</tt>)
	 */
	public abstract int enableJoinedFetch();

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?