| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.hibernate.persister.collection.AbstractCollectionPersisterorg.hibernate.persister.collection.OneToManyPersisterpublic class OneToManyPersisterextends AbstractCollectionPersisterField Summary |
Fields inherited from class org.hibernate.persister.collection.AbstractCollectionPersister | |
batchSize, elementColumnAliases, elementColumnIsInPrimaryKey, elementColumnIsSettable, elementColumnNames, elementFormulaTemplates, elementFormulas, elementIsPureFormula, elementType, hasIdentifier, hasIndex, hasWhere, identifierColumnName, indexColumnAliases, indexColumnIsSettable, indexColumnNames, indexContainsFormula, indexFormulaTemplates, indexFormulas, keyColumnAliases, keyColumnNames, qualifiedTableName, sqlWhereString | |
Constructor Summary | |
| |
Method Summary | |
boolean |
|
boolean |
|
protected CollectionInitializer |
|
protected CollectionInitializer |
|
protected int |
|
String |
|
String |
|
protected String |
|
protected String |
|
protected String |
|
protected String |
|
Object |
|
String |
|
boolean |
|
boolean |
|
boolean |
|
protected boolean | |
protected boolean | |
String |
|
String |
|
public OneToManyPersister(Collection collection, CollectionRegionAccessStrategy cacheAccessStrategy, Configuration cfg, SessionFactoryImplementor factory) throws MappingException, CacheException
public boolean consumesCollectionAlias()
Very, very, very ugly...
- Specified by:
- consumesCollectionAlias in interface Joinable
- Returns:
- Does this persister "consume" collection column aliases in the result set?
public boolean consumesEntityAlias()
Very, very, very ugly...
- Specified by:
- consumesEntityAlias in interface Joinable
- Returns:
- Does this persister "consume" entity column aliases in the result set?
protected CollectionInitializer createCollectionInitializer(java.util.Map enabledFilters) throws MappingException
Create the OneToManyLoader
- See Also:
OneToManyLoader
protected CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SessionImplementor session)
- Overrides:
- createSubselectInitializer in interface AbstractCollectionPersister
protected int doUpdateRows(Serializable id,
PersistentCollection collection,
SessionImplementor session)
throws HibernateException
- Overrides:
- doUpdateRows in interface AbstractCollectionPersister
public String filterFragment(String alias)
throws MappingException
- Overrides:
- filterFragment in interface AbstractCollectionPersister
public String fromJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)Get the from clause part of any joins (optional operation)
- Specified by:
- fromJoinFragment in interface Joinable
protected String generateDeleteRowString()
Generate the SQL UPDATE that updates a particular row's foreign key to null
- Overrides:
- generateDeleteRowString in interface AbstractCollectionPersister
protected String generateDeleteString()
Generate the SQL UPDATE that updates all the foreign keys to null
- Overrides:
- generateDeleteString in interface AbstractCollectionPersister
protected String generateInsertRowString()
Generate the SQL UPDATE that updates a foreign key to a value
- Overrides:
- generateInsertRowString in interface AbstractCollectionPersister
protected String generateUpdateRowString()
Not needed for one-to-many association
- Overrides:
- generateUpdateRowString in interface AbstractCollectionPersister
public Object getElementByIndex(Serializable key,
Object index,
SessionImplementor session,
Object owner)
- Specified by:
- getElementByIndex in interface CollectionPersister
- Overrides:
- getElementByIndex in interface AbstractCollectionPersister
public String getTableName()
The table to join to.
- Specified by:
- getTableName in interface Joinable
- Overrides:
- getTableName in interface AbstractCollectionPersister
public boolean isCascadeDeleteEnabled()
Is cascade delete handled by the database-level foreign key constraint definition?
- Specified by:
- isCascadeDeleteEnabled in interface CollectionPersister
public 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.
- Specified by:
- isManyToMany in interface CollectionPersister
- Overrides:
- isManyToMany in interface AbstractCollectionPersister
public boolean isOneToMany()
Is this a one-to-many association?
- Specified by:
- isOneToMany in interface CollectionPersister
protected boolean isRowDeleteEnabled()
- Overrides:
- isRowDeleteEnabled in interface AbstractCollectionPersister
protected boolean isRowInsertEnabled()
- Overrides:
- isRowInsertEnabled in interface AbstractCollectionPersister
public String selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)
All columns to select, when loading.
- Specified by:
- selectFragment in interface Joinable
public String whereJoinFragment(String alias,
boolean innerJoin,
boolean includeSubclasses)Get the where clause part of any joins (optional operation)
- Specified by:
- whereJoinFragment in interface Joinable