当前页面:
在线文档首页 >
Hibernate 2.1.8 正式版 API 英文文档
CriteriaLoader (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档
net.sf.hibernate.loader
Class CriteriaLoader
java.lang.Object
net.sf.hibernate.loader.Loader
net.sf.hibernate.loader.OuterJoinLoader
net.sf.hibernate.loader.AbstractEntityLoader
net.sf.hibernate.loader.CriteriaLoader
- public class CriteriaLoader
- extends AbstractEntityLoader
A Loader for Criteria queries. Note that criteria queries are
more like multi-object load()s than like HQL queries.
- Author:
- Gavin King
Method Summary |
protected void |
addToPropertySpaces(Serializable space)
|
protected String |
applyLocks(String sqlSelectString,
Map lockModes,
Dialect dialect)
Append FOR UPDATE OF clause, if necessary. |
protected String |
generateRootAlias(String tableName)
|
protected String |
generateTableAlias(String className,
int n,
String path,
boolean isLinkTable)
|
protected int |
getJoinType(AssociationType type,
int config,
String path,
String table,
String[] foreignKeyColumns,
SessionFactoryImplementor factory)
|
protected LockMode[] |
getLockModes(Map lockModes)
What lock mode does this load entities with? |
Set |
getQuerySpaces()
|
protected Object |
getResultColumnOrRow(Object[] row,
ResultSet rs,
SessionImplementor session)
Get the actual object that is returned in the user-visible result list. |
protected List |
getResultList(List results)
|
protected String |
getWhereFragment()
Use the discriminator, to narrow the select to instances
of the queried subclass. |
List |
list(SessionImplementor session)
|
Methods inherited from class net.sf.hibernate.loader.AbstractEntityLoader |
addAllToPropertySpaces, getAlias, getCollectionOwner, getCollectionPersister, getEntityAliases, getPersister, initClassPersisters, initStatementString, isJoinedFetchEnabled, renderStatement, setAlias, toString |
Methods inherited from class net.sf.hibernate.loader.OuterJoinLoader |
containsCollectionPersister, countClassPersisters, createLockModeArray, getOwners, getPersisters, getSQLString, getSuffixes, isJoinedFetchEnabledByDefault, mergeOuterJoins, selectString, toOwner, walkCollectionTree, walkTree, whereString |
Methods inherited from class net.sf.hibernate.loader.Loader |
bindNamedParameters, bindPositionalParameters, doList, generateAlias, generateSuffixes, getResultSet, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadEntity, loadEntityBatch, loadSingleRow, postInstantiate, prepareQueryStatement, upgradeLocks |
CriteriaLoader
public CriteriaLoader(OuterJoinLoadable persister,
SessionFactoryImplementor factory,
CriteriaImpl criteria)
throws HibernateException
list
public List list(SessionImplementor session)
throws HibernateException,
SQLException
- Throws:
HibernateException
SQLException
getResultColumnOrRow
protected Object getResultColumnOrRow(Object[] row,
ResultSet rs,
SessionImplementor session)
throws SQLException,
HibernateException
- Description copied from class:
Loader
- Get the actual object that is returned in the user-visible result list.
This empty implementation merely returns its first argument. This is
overridden by some subclasses.
- Overrides:
getResultColumnOrRow
in class Loader
- Throws:
SQLException
HibernateException
getJoinType
protected int getJoinType(AssociationType type,
int config,
String path,
String table,
String[] foreignKeyColumns,
SessionFactoryImplementor factory)
throws MappingException
- Overrides:
getJoinType
in class OuterJoinLoader
- Throws:
MappingException
getWhereFragment
protected String getWhereFragment()
throws MappingException
- Use the discriminator, to narrow the select to instances
of the queried subclass.
- Overrides:
getWhereFragment
in class AbstractEntityLoader
- Throws:
MappingException
generateTableAlias
protected String generateTableAlias(String className,
int n,
String path,
boolean isLinkTable)
- Overrides:
generateTableAlias
in class OuterJoinLoader
generateRootAlias
protected String generateRootAlias(String tableName)
- Overrides:
generateRootAlias
in class OuterJoinLoader
getQuerySpaces
public Set getQuerySpaces()
addToPropertySpaces
protected void addToPropertySpaces(Serializable space)
- Overrides:
addToPropertySpaces
in class AbstractEntityLoader
applyLocks
protected String applyLocks(String sqlSelectString,
Map lockModes,
Dialect dialect)
throws QueryException
- Description copied from class:
Loader
- Append FOR UPDATE OF clause, if necessary. This
empty superclass implementation merely returns its first
argument.
- Overrides:
applyLocks
in class Loader
- Throws:
QueryException
getLockModes
protected LockMode[] getLockModes(Map lockModes)
- Description copied from class:
Loader
- What lock mode does this load entities with?
- Overrides:
getLockModes
in class OuterJoinLoader
getResultList
protected List getResultList(List results)
- Overrides:
getResultList
in class Loader