|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.persister.collection.AbstractCollectionPersister
org.hibernate.persister.collection.OneToManyPersister
public class OneToManyPersister
Collection persister for one-to-many associations.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
OneToManyPersister(Collection collection,
CollectionRegionAccessStrategy cacheAccessStrategy,
Configuration cfg,
SessionFactoryImplementor factory)
|
|
| Method Summary | |
|---|---|
boolean |
consumesCollectionAlias()
Very, very, very ugly... |
boolean |
consumesEntityAlias()
Very, very, very ugly... |
protected CollectionInitializer |
createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers)
Create the OneToManyLoader |
protected CollectionInitializer |
createSubselectInitializer(SubselectFetch subselect,
SessionImplementor session)
|
protected void |
doProcessQueuedOps(PersistentCollection collection,
Serializable id,
SessionImplementor session)
|
protected int |
doUpdateRows(Serializable id,
PersistentCollection collection,
SessionImplementor session)
|
String |
filterFragment(String alias)
|
String |
fromJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the from clause part of any joins (optional operation) |
protected String |
generateDeleteRowString()
Generate the SQL UPDATE that updates a particular row's foreign key to null |
protected String |
generateDeleteString()
Generate the SQL UPDATE that updates all the foreign keys to null |
protected String |
generateInsertRowString()
Generate the SQL UPDATE that updates a foreign key to a value |
protected String |
generateUpdateRowString()
Generate the SQL UPDATE that inserts a collection index |
Object |
getElementByIndex(Serializable key,
Object index,
SessionImplementor session,
Object owner)
|
FilterAliasGenerator |
getFilterAliasGenerator(String rootAlias)
|
String |
getTableName()
The table to join to. |
void |
insertRows(PersistentCollection collection,
Serializable id,
SessionImplementor session)
Insert the persistent state of any new collection elements |
boolean |
isCascadeDeleteEnabled()
Is cascade delete handled by the database-level foreign key constraint definition? |
boolean |
isManyToMany()
Is this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not conatin all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones. |
boolean |
isOneToMany()
Is this a one-to-many association? |
protected boolean |
isRowDeleteEnabled()
|
protected boolean |
isRowInsertEnabled()
|
void |
recreate(PersistentCollection collection,
Serializable id,
SessionImplementor session)
(Re)create the collection's persistent state |
String |
selectFragment(Joinable rhs,
String rhsAlias,
String lhsAlias,
String entitySuffix,
String collectionSuffix,
boolean includeCollectionColumns)
All columns to select, when loading. |
String |
whereJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the where clause part of any joins (optional operation) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public OneToManyPersister(Collection collection,
CollectionRegionAccessStrategy cacheAccessStrategy,
Configuration cfg,
SessionFactoryImplementor factory)
throws MappingException,
CacheException
MappingException
CacheException| Method Detail |
|---|
protected boolean isRowDeleteEnabled()
isRowDeleteEnabled in class AbstractCollectionPersisterprotected boolean isRowInsertEnabled()
isRowInsertEnabled in class AbstractCollectionPersisterpublic boolean isCascadeDeleteEnabled()
CollectionPersister
protected String generateDeleteString()
generateDeleteString in class AbstractCollectionPersisterprotected String generateInsertRowString()
generateInsertRowString in class AbstractCollectionPersisterprotected String generateUpdateRowString()
generateUpdateRowString in class AbstractCollectionPersisterprotected String generateDeleteRowString()
generateDeleteRowString in class AbstractCollectionPersister
public void recreate(PersistentCollection collection,
Serializable id,
SessionImplementor session)
throws HibernateException
CollectionPersister
recreate in interface CollectionPersisterrecreate in class AbstractCollectionPersisterHibernateException
public void insertRows(PersistentCollection collection,
Serializable id,
SessionImplementor session)
throws HibernateException
CollectionPersister
insertRows in interface CollectionPersisterinsertRows in class AbstractCollectionPersisterHibernateException
protected void doProcessQueuedOps(PersistentCollection collection,
Serializable id,
SessionImplementor session)
throws HibernateException
doProcessQueuedOps in class AbstractCollectionPersisterHibernateExceptionpublic boolean consumesEntityAlias()
Joinable
public boolean consumesCollectionAlias()
Joinable
public boolean isOneToMany()
CollectionPersister
public boolean isManyToMany()
CollectionPersister
isManyToMany in interface CollectionPersisterisManyToMany in class AbstractCollectionPersister
protected int doUpdateRows(Serializable id,
PersistentCollection collection,
SessionImplementor session)
doUpdateRows in class AbstractCollectionPersister
public String selectFragment(Joinable rhs,
String rhsAlias,
String lhsAlias,
String entitySuffix,
String collectionSuffix,
boolean includeCollectionColumns)
Joinable
protected CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers)
throws MappingException
createCollectionInitializer in class AbstractCollectionPersisterMappingExceptionOneToManyLoader
public String fromJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Joinable
public String whereJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)
Joinable
public String getTableName()
Joinable
getTableName in interface JoinablegetTableName in class AbstractCollectionPersister
public String filterFragment(String alias)
throws MappingException
filterFragment in class AbstractCollectionPersisterMappingException
protected CollectionInitializer createSubselectInitializer(SubselectFetch subselect,
SessionImplementor session)
createSubselectInitializer in class AbstractCollectionPersister
public Object getElementByIndex(Serializable key,
Object index,
SessionImplementor session,
Object owner)
getElementByIndex in interface CollectionPersistergetElementByIndex in class AbstractCollectionPersisterpublic FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
getFilterAliasGenerator in class AbstractCollectionPersister
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||