|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.hibernate.loader.Loader
net.sf.hibernate.loader.SimpleEntityLoader
Loads entity instances one instance per select, without without any outerjoin fetching.
The ClassPersister must implement Loadable. For other entities,
create a customized subclass of Loader.
EntityLoader| Field Summary |
| Fields inherited from class net.sf.hibernate.loader.Loader |
NO_SUFFIX |
| Constructor Summary | |
SimpleEntityLoader(Loadable persister,
String sql,
LockMode lockMode)
|
|
| Method Summary | |
protected CollectionPersister |
getCollectionPersister()
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value |
protected LockMode[] |
getLockModes(Map lockModes)
What lock mode does this load entities with? |
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 Loadable[] |
getPersisters()
An array of persisters of entity classes contained in each row of results; implemented by all subclasses |
protected Object |
getResultColumnOrRow(Object[] row,
ResultSet rs,
SessionImplementor session)
Get the actual object that is returned in the user-visible result list. |
protected String |
getSQLString()
The SQL query string to be called; implemented by all subclasses |
protected String[] |
getSuffixes()
The suffix identifies a particular column of results in the SQL ResultSet; implemented by all subclasses |
protected boolean |
isSingleRowLoader()
Return false is this loader is a batch entity loader |
Object |
load(SessionImplementor session,
Serializable id,
Object object)
Load an entity instance. |
| Methods inherited from class net.sf.hibernate.loader.Loader |
applyLocks, bindNamedParameters, bindPositionalParameters, doList, generateAlias, generateSuffixes, getCollectionOwner, getResultList, getResultSet, list, loadCollection, loadCollectionBatch, loadEntity, loadEntityBatch, loadSingleRow, postInstantiate, prepareQueryStatement, upgradeLocks |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleEntityLoader(Loadable persister, String sql, LockMode lockMode)
| Method Detail |
protected String getSQLString()
Loader
getSQLString in class Loaderprotected Loadable[] getPersisters()
Loader
getPersisters in class Loaderprotected CollectionPersister getCollectionPersister()
Loader
getCollectionPersister in class Loaderprotected String[] getSuffixes()
Loader
getSuffixes in class Loaderpublic Object load(SessionImplementor session, Serializable id, Object object) throws HibernateException, SQLException
UniqueEntityLoader
load in interface UniqueEntityLoaderHibernateException
SQLExceptionprotected LockMode[] getLockModes(Map lockModes)
Loader
getLockModes in class LoaderlockModes - a collection of lock modes specified dynamically via the Query interfaceprotected Object getResultColumnOrRow(Object[] row, ResultSet rs, SessionImplementor session) throws SQLException, HibernateException
Loader
getResultColumnOrRow in class LoaderSQLException
HibernateExceptionprotected boolean isSingleRowLoader()
Loader
isSingleRowLoader in class Loaderprotected int[] getOwners()
Loader
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||