public class OneToManyPersister extends AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnIsInPrimaryKey, elementColumnIsSettable, elementColumnNames, elementColumnReaders, elementColumnReaderTemplates, elementColumnWriters, elementFormulas, elementFormulaTemplates, elementIsPureFormula, elementType, hasIdentifier, hasIndex, hasWhere, identifierColumnName, indexColumnAliases, indexColumnIsGettable, indexColumnIsSettable, indexColumnNames, indexContainsFormula, indexFormulas, indexFormulaTemplates, isInverse, keyColumnAliases, keyColumnNames, qualifiedTableName, recreateBatchKey, sqlExceptionHelper, sqlWhereString| Constructor and Description |
|---|
OneToManyPersister(Collection collectionBinding,
CollectionRegionAccessStrategy cacheAccessStrategy,
PersisterCreationContext creationContext) |
| 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 void |
doProcessQueuedOps(PersistentCollection collection,
java.io.Serializable id,
SessionImplementor session) |
protected int |
doUpdateRows(java.io.Serializable id,
PersistentCollection collection,
SessionImplementor session) |
java.lang.String |
filterFragment(java.lang.String alias) |
protected java.lang.String |
filterFragment(java.lang.String alias,
java.util.Set<java.lang.String> treatAsDeclarations) |
java.lang.String |
fromJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the from clause part of any joins
(optional operation)
|
java.lang.String |
fromJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses,
java.util.Set<java.lang.String> treatAsDeclarations)
Get the from clause part of any joins
(optional operation)
|
protected java.lang.String |
generateDeleteRowString()
Generate the SQL UPDATE that updates a particular row's foreign
key to null
|
protected java.lang.String |
generateDeleteString()
Generate the SQL UPDATE that updates all the foreign keys to null
|
protected java.lang.String |
generateInsertRowString()
Generate the SQL UPDATE that updates a foreign key to a value
|
protected java.lang.String |
generateUpdateRowString()
Generate the SQL UPDATE that inserts a collection index
|
java.lang.Object |
getElementByIndex(java.io.Serializable key,
java.lang.Object index,
SessionImplementor session,
java.lang.Object owner) |
FilterAliasGenerator |
getFilterAliasGenerator(java.lang.String rootAlias) |
java.lang.String |
getTableName()
The table to join to.
|
void |
insertRows(PersistentCollection collection,
java.io.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,
java.io.Serializable id,
SessionImplementor session)
(Re)create the collection's persistent state
|
java.lang.String |
selectFragment(Joinable rhs,
java.lang.String rhsAlias,
java.lang.String lhsAlias,
java.lang.String entitySuffix,
java.lang.String collectionSuffix,
boolean includeCollectionColumns)
All columns to select, when loading.
|
java.lang.String |
whereJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses)
Get the where clause part of any joins
(optional operation)
|
java.lang.String |
whereJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses,
java.util.Set<java.lang.String> treatAsDeclarations)
Get the where clause part of any joins
(optional operation)
|
appendElementColumns, appendIdentifierColumns, appendIndexColumns, decrementIndexByBase, deleteRows, determineTableName, doProcessQueuedOps, elementExists, filterFragment, filterFragment, generateDetectRowByElementString, generateDetectRowByIndexString, generateSelectFragment, generateSelectRowByIndexString, generateSelectSizeString, getAppropriateInitializer, getBatchSize, getCacheAccessStrategy, getCacheEntryStructure, getCollectionMetadata, getCollectionPersister, getCollectionPropertyColumnAliases, getCollectionSpaces, getCollectionType, getDeleteAllCheckStyle, getDeleteCheckStyle, getDialect, getElementClass, getElementColumnAliases, getElementColumnNames, getElementColumnNames, getElementDefinition, getElementPersister, getElementType, getFactory, getFetchMode, getIdentifierColumnAlias, getIdentifierColumnName, getIdentifierGenerator, getIdentifierType, getIndexColumnAliases, getIndexColumnNames, getIndexColumnNames, getIndexDefinition, getIndexFormulas, getIndexType, getInitializer, getInsertCheckStyle, getKeyColumnAliases, getKeyColumnNames, getKeyType, getManyToManyFilterFragment, getManyToManyOrderByString, getMappedByProperty, getName, getOwnerEntityName, getOwnerEntityPersister, getRole, getSize, getSQLDeleteRowString, getSQLDeleteString, getSQLExceptionConverter, getSQLExceptionHelper, getSQLInsertRowString, getSQLOrderByString, getSQLUpdateRowString, getSQLWhereString, getType, getUpdateCheckStyle, hasCache, hasIndex, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, hasWhere, incrementIndexByBase, indexExists, initCollectionPropertyMap, initialize, isAffectedByEnabledFilters, isArray, isCollection, isDeleteAllCallable, isDeleteCallable, isExtraLazy, isInsertCallable, isInverse, isLazy, isMutable, isPrimitiveArray, isSubselectLoadable, isUpdateCallable, isVersioned, logStaticSQL, oneToManyFilterFragment, oneToManyFilterFragment, postInstantiate, processQueuedOps, readElement, readIdentifier, readIndex, readKey, remove, selectFragment, toColumns, toColumns, toString, toType, updateRows, writeElement, writeElementToWhere, writeIdentifier, writeIndex, writeIndexToWhere, writeKeypublic OneToManyPersister(Collection collectionBinding, CollectionRegionAccessStrategy cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
MappingExceptionCacheExceptionprotected boolean isRowDeleteEnabled()
isRowDeleteEnabled in class AbstractCollectionPersisterprotected boolean isRowInsertEnabled()
isRowInsertEnabled in class AbstractCollectionPersisterpublic boolean isCascadeDeleteEnabled()
CollectionPersisterprotected java.lang.String generateDeleteString()
generateDeleteString in class AbstractCollectionPersisterprotected java.lang.String generateInsertRowString()
generateInsertRowString in class AbstractCollectionPersisterprotected java.lang.String generateUpdateRowString()
generateUpdateRowString in class AbstractCollectionPersisterprotected java.lang.String generateDeleteRowString()
generateDeleteRowString in class AbstractCollectionPersisterpublic void recreate(PersistentCollection collection, java.io.Serializable id, SessionImplementor session) throws HibernateException
CollectionPersisterrecreate in interface CollectionPersisterrecreate in class AbstractCollectionPersisterHibernateExceptionpublic void insertRows(PersistentCollection collection, java.io.Serializable id, SessionImplementor session) throws HibernateException
CollectionPersisterinsertRows in interface CollectionPersisterinsertRows in class AbstractCollectionPersisterHibernateExceptionprotected void doProcessQueuedOps(PersistentCollection collection, java.io.Serializable id, SessionImplementor session) throws HibernateException
doProcessQueuedOps in class AbstractCollectionPersisterHibernateExceptionpublic boolean consumesEntityAlias()
Joinablepublic boolean consumesCollectionAlias()
Joinablepublic boolean isOneToMany()
CollectionPersisterpublic boolean isManyToMany()
CollectionPersisterisManyToMany in interface CollectionPersisterisManyToMany in class AbstractCollectionPersisterprotected int doUpdateRows(java.io.Serializable id,
PersistentCollection collection,
SessionImplementor session)
doUpdateRows in class AbstractCollectionPersisterpublic java.lang.String selectFragment(Joinable rhs, java.lang.String rhsAlias, java.lang.String lhsAlias, java.lang.String entitySuffix, java.lang.String collectionSuffix, boolean includeCollectionColumns)
Joinableprotected CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) throws MappingException
createCollectionInitializer in class AbstractCollectionPersisterMappingExceptionOneToManyLoaderpublic java.lang.String fromJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses)
Joinablepublic java.lang.String fromJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses,
java.util.Set<java.lang.String> treatAsDeclarations)
Joinablepublic java.lang.String whereJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses)
Joinablepublic java.lang.String whereJoinFragment(java.lang.String alias,
boolean innerJoin,
boolean includeSubclasses,
java.util.Set<java.lang.String> treatAsDeclarations)
Joinablepublic java.lang.String getTableName()
JoinablegetTableName in interface JoinablegetTableName in class AbstractCollectionPersisterpublic java.lang.String filterFragment(java.lang.String alias)
throws MappingException
filterFragment in class AbstractCollectionPersisterMappingExceptionprotected java.lang.String filterFragment(java.lang.String alias,
java.util.Set<java.lang.String> treatAsDeclarations)
throws MappingException
filterFragment in class AbstractCollectionPersisterMappingExceptionprotected CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SessionImplementor session)
createSubselectInitializer in class AbstractCollectionPersisterpublic java.lang.Object getElementByIndex(java.io.Serializable key,
java.lang.Object index,
SessionImplementor session,
java.lang.Object owner)
getElementByIndex in interface CollectionPersistergetElementByIndex in class AbstractCollectionPersisterpublic FilterAliasGenerator getFilterAliasGenerator(java.lang.String rootAlias)
getFilterAliasGenerator in class AbstractCollectionPersisterCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.