|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 Loader
protected Loadable[] getPersisters()
Loader
getPersisters
in class Loader
protected CollectionPersister getCollectionPersister()
Loader
getCollectionPersister
in class Loader
protected String[] getSuffixes()
Loader
getSuffixes
in class Loader
public Object load(SessionImplementor session, Serializable id, Object object) throws HibernateException, SQLException
UniqueEntityLoader
load
in interface UniqueEntityLoader
HibernateException
SQLException
protected LockMode[] getLockModes(Map lockModes)
Loader
getLockModes
in class Loader
lockModes
- 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 Loader
SQLException
HibernateException
protected boolean isSingleRowLoader()
Loader
isSingleRowLoader
in class Loader
protected int[] getOwners()
Loader
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |