public class OneToManyPersister extends AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnIsInPrimaryKey, elementColumnIsSettable, elementColumnNames, elementColumnReaders, elementColumnReaderTemplates, elementColumnWriters, elementFormulas, elementFormulaTemplates, elementIsPureFormula, elementType, hasIdentifier, hasIndex, hasWhere, identifierColumnName, indexColumnAliases, indexColumnIsSettable, indexColumnNames, indexContainsFormula, indexFormulas, indexFormulaTemplates, keyColumnAliases, keyColumnNames, qualifiedTableName, sqlWhereString
Constructor and Description |
---|
OneToManyPersister(Collection collection,
CollectionRegionAccessStrategy cacheAccessStrategy,
Configuration cfg,
SessionFactoryImplementor factory) |
Modifier and Type | Method and Description |
---|---|
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 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()
Not needed for one-to-many association
|
Object |
getElementByIndex(Serializable key,
Object index,
SessionImplementor session,
Object owner) |
String |
getTableName()
The table to join to.
|
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() |
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)
|
appendElementColumns, appendIdentifierColumns, appendIndexColumns, decrementIndexByBase, deleteRows, elementExists, filterFragment, generateDetectRowByElementString, generateDetectRowByIndexString, generateSelectFragment, generateSelectRowByIndexString, generateSelectSizeString, getAppropriateInitializer, getCacheAccessStrategy, getCacheEntryStructure, getCollectionMetadata, getCollectionPropertyColumnAliases, getCollectionSpaces, getCollectionType, getDeleteAllCheckStyle, getDeleteCheckStyle, getDialect, getElementClass, getElementColumnAliases, getElementColumnNames, getElementColumnNames, getElementNodeName, getElementPersister, getElementType, getFactory, getFetchMode, getIdentifierColumnAlias, getIdentifierColumnName, getIdentifierGenerator, getIdentifierType, getIndexColumnAliases, getIndexColumnNames, getIndexColumnNames, getIndexFormulas, getIndexNodeName, getIndexType, getInitializer, getInsertCheckStyle, getKeyColumnAliases, getKeyColumnNames, getKeyType, getManyToManyFilterFragment, getManyToManyOrderByString, getName, getNodeName, getOwnerEntityName, getOwnerEntityPersister, getRole, getSize, getSQLDeleteRowString, getSQLDeleteString, getSQLExceptionConverter, getSQLExceptionHelper, getSQLInsertRowString, getSQLOrderByString, getSQLUpdateRowString, getSQLWhereString, getType, getUpdateCheckStyle, hasCache, hasIndex, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, hasWhere, incrementIndexByBase, indexExists, initCollectionPropertyMap, initialize, insertRows, isAffectedByEnabledFilters, isArray, isCollection, isDeleteAllCallable, isDeleteCallable, isExtraLazy, isInsertCallable, isInverse, isLazy, isMutable, isPrimitiveArray, isSubselectLoadable, isUpdateCallable, isVersioned, logStaticSQL, oneToManyFilterFragment, postInstantiate, readElement, readIdentifier, readIndex, readKey, recreate, remove, selectFragment, toColumns, toColumns, toString, toType, updateRows, writeElement, writeElementToWhere, writeIdentifier, writeIndex, writeIndexToWhere, writeKey
public OneToManyPersister(Collection collection, CollectionRegionAccessStrategy cacheAccessStrategy, Configuration cfg, SessionFactoryImplementor factory) throws MappingException, CacheException
MappingException
CacheException
protected boolean isRowDeleteEnabled()
isRowDeleteEnabled
in class AbstractCollectionPersister
protected boolean isRowInsertEnabled()
isRowInsertEnabled
in class AbstractCollectionPersister
public boolean isCascadeDeleteEnabled()
CollectionPersister
protected String generateDeleteString()
generateDeleteString
in class AbstractCollectionPersister
protected String generateInsertRowString()
generateInsertRowString
in class AbstractCollectionPersister
protected String generateUpdateRowString()
generateUpdateRowString
in class AbstractCollectionPersister
protected String generateDeleteRowString()
generateDeleteRowString
in class AbstractCollectionPersister
public boolean consumesEntityAlias()
Joinable
public boolean consumesCollectionAlias()
Joinable
public boolean isOneToMany()
CollectionPersister
public boolean isManyToMany()
CollectionPersister
isManyToMany
in interface CollectionPersister
isManyToMany
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 AbstractCollectionPersister
MappingException
OneToManyLoader
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 Joinable
getTableName
in class AbstractCollectionPersister
public String filterFragment(String alias) throws MappingException
filterFragment
in class AbstractCollectionPersister
MappingException
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 CollectionPersister
getElementByIndex
in class AbstractCollectionPersister
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.