Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.loader.Loader
org.hibernate.loader.BasicLoader
org.hibernate.loader.hql.QueryLoader
public class QueryLoader
extends BasicLoader
Field Summary |
Fields inherited from class org.hibernate.loader.BasicLoader | |
NO_SUFFIX |
Constructor Summary | |
|
Method Summary | |
protected String |
|
protected int |
|
String[] | |
protected int[] | |
protected CollectionPersister[] |
|
String[] | |
protected boolean[] | |
Loadable[] | |
protected LockMode[] |
|
int[] |
|
protected EntityType[] | |
protected int[] |
|
protected String | |
protected Object |
|
protected List |
|
protected String |
|
String[] | |
String[] | |
protected boolean | |
Iterator |
|
List |
|
protected boolean | |
ScrollableResults |
|
protected boolean | |
void |
Methods inherited from class org.hibernate.loader.BasicLoader | |
generateSuffixes , generateSuffixes , getCollectionAliases , getCollectionSuffixes , getEntityAliases , getSuffixes , postInstantiate |
public QueryLoader(QueryTranslatorImpl queryTranslator, SessionFactoryImplementor factory, SelectClause selectClause)
Creates a new Loader implementation.
- Parameters:
queryTranslator
- The query translator that is the delegator.factory
- The factory from which this loader is being created.selectClause
- The AST representing the select clause for loading.
protected String applyLocks(String sql, Map lockModes, Dialect dialect) throws QueryException
- Overrides:
- applyLocks in interface Loader
protected int bindParameterValues(PreparedStatement statement, QueryParameters queryParameters, int startIndex, SessionImplementor session) throws SQLException
We specifically override this method here, because in general we know much more about the parameters and their appropriate bind positions here then we do in our super because we track them explciitly here through the ParameterSpecification interface.
- Overrides:
- bindParameterValues in interface Loader
- Parameters:
queryParameters
- The encapsulation of the parameter values to be bound.startIndex
- The position from which to start binding parameter values.session
- The originating session.
- Returns:
- The number of JDBC bind positions actually bound during this method execution.
protected int[] getCollectionOwners()
- Overrides:
- getCollectionOwners in interface Loader
protected CollectionPersister[] getCollectionPersisters()
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value
- Overrides:
- getCollectionPersisters in interface Loader
public String[] getCollectionSuffixes()
- Overrides:
- getCollectionSuffixes in interface BasicLoader
protected boolean[] getEntityEagerPropertyFetches()
- Overrides:
- getEntityEagerPropertyFetches in interface Loader
public Loadable[] getEntityPersisters()
- Overrides:
- getEntityPersisters in interface Loader
protected LockMode[] getLockModes(Map lockModes)
- Overrides:
- getLockModes in interface Loader
- Parameters:
lockModes
- a collection of lock modes specified dynamically via the Query interface
public int[] getNamedParameterLocs(String name) throws QueryException
Returns the locations of all occurrences of the named parameter.
- Overrides:
- getNamedParameterLocs in interface Loader
protected EntityType[] getOwnerAssociationTypes()
- Overrides:
- getOwnerAssociationTypes in interface Loader
protected int[] getOwners()
An array of indexes of the entity that owns a one-to-one association to the entity at the given index (-1 if there is no "owner")
protected String getQueryIdentifier()
- Overrides:
- getQueryIdentifier in interface Loader
protected Object getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session) throws SQLException, HibernateException
- Overrides:
- getResultColumnOrRow in interface Loader
protected List getResultList(List results, ResultTransformer resultTransformer) throws QueryException
- Overrides:
- getResultList in interface Loader
protected String getSQLString()
The SQL query string to be called.
- Overrides:
- getSQLString in interface Loader
public String[] getSqlAliasSuffixes()
protected boolean isSubselectLoadingEnabled()
- Overrides:
- isSubselectLoadingEnabled in interface Loader
public Iterator iterate(QueryParameters queryParameters, EventSource session) throws HibernateException
public List list(SessionImplementor session, QueryParameters queryParameters) throws HibernateException
protected boolean needsFetchingScroll()
- Overrides:
- needsFetchingScroll in interface Loader
public ScrollableResults scroll(QueryParameters queryParameters, SessionImplementor session) throws HibernateException