public abstract class AbstractCollectionPersister extends Object implements CollectionMetadata, SQLLoadableCollection
Base implementation of the <tt>QueryableCollection</tt> interface.
BasicCollectionPersister,
OneToManyPersister| Constructor and Description |
|---|
AbstractCollectionPersister(Collection collectionBinding,
CollectionDataAccess cacheAccessStrategy,
PersisterCreationContext creationContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendElementColumns(SelectFragment frag,
String elemAlias) |
protected void |
appendIdentifierColumns(SelectFragment frag,
String alias) |
protected void |
appendIndexColumns(SelectFragment frag,
String alias) |
protected abstract CollectionInitializer |
createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) |
protected abstract CollectionInitializer |
createSubselectInitializer(SubselectFetch subselect,
SharedSessionContractImplementor session) |
protected Object |
decrementIndexByBase(Object index) |
void |
deleteRows(PersistentCollection collection,
Serializable id,
SharedSessionContractImplementor session)
Delete the persistent state of any elements that were removed from
the collection
|
protected String |
determineTableName(Table table,
JdbcEnvironment jdbcEnvironment) |
protected void |
doProcessQueuedOps(PersistentCollection collection,
Serializable key,
int nextIndex,
SharedSessionContractImplementor session)
|
protected abstract void |
doProcessQueuedOps(PersistentCollection collection,
Serializable key,
SharedSessionContractImplementor session) |
protected abstract int |
doUpdateRows(Serializable key,
PersistentCollection collection,
SharedSessionContractImplementor session) |
boolean |
elementExists(Serializable key,
Object element,
SharedSessionContractImplementor session) |
protected String |
filterFragment(String alias) |
String |
filterFragment(String alias,
Map enabledFilters)
Get the where clause filter, given a query alias and considering enabled session filters
|
String |
filterFragment(String alias,
Map enabledFilters,
Set<String> treatAsDeclarations)
Get the where clause filter, given a query alias and considering enabled session filters
|
protected String |
filterFragment(String alias,
Set<String> treatAsDeclarations) |
protected abstract String |
generateDeleteRowString() |
protected abstract String |
generateDeleteString() |
protected String |
generateDetectRowByElementString() |
protected String |
generateDetectRowByIndexString() |
protected abstract String |
generateInsertRowString() |
protected SelectFragment |
generateSelectFragment(String alias,
String columnSuffix) |
protected String |
generateSelectRowByIndexString() |
protected String |
generateSelectSizeString(boolean isIntegerIndexed) |
protected abstract String |
generateUpdateRowString() |
protected CollectionInitializer |
getAppropriateInitializer(Serializable key,
SharedSessionContractImplementor session) |
int |
getBatchSize() |
CollectionDataAccess |
getCacheAccessStrategy()
Get the cache
|
CacheEntryStructure |
getCacheEntryStructure()
Get the cache structure
|
CollectionMetadata |
getCollectionMetadata() |
CollectionPersister |
getCollectionPersister() |
String[] |
getCollectionPropertyColumnAliases(String propertyName,
String suffix) |
Serializable[] |
getCollectionSpaces()
Get the "space" that holds the persistent state
|
CollectionType |
getCollectionType()
Get the associated <tt>Type</tt>
|
protected ExecuteUpdateResultCheckStyle |
getDeleteAllCheckStyle() |
protected ExecuteUpdateResultCheckStyle |
getDeleteCheckStyle() |
protected Dialect |
getDialect() |
Object |
getElementByIndex(Serializable key,
Object index,
SharedSessionContractImplementor session,
Object owner) |
Class |
getElementClass()
Return the element class of an array, or null otherwise.
|
String[] |
getElementColumnAliases(String suffix)
Generates the collection’s element column aliases, based on the given
suffix.
|
String[] |
getElementColumnNames()
Get the names of the collection element columns (or the primary
key columns in the case of a one-to-many association)
|
String[] |
getElementColumnNames(String alias)
Get the names of the collection element columns (or the primary
key columns in the case of a one-to-many association),
aliased by the given table alias
|
CollectionElementDefinition |
getElementDefinition() |
EntityPersister |
getElementPersister()
Get the persister of the element class, if this is a
collection of entities (optional operation).
|
Type |
getElementType()
The collection element type
|
SessionFactoryImplementor |
getFactory() |
FetchMode |
getFetchMode()
Should we load this collection role by outerjoining?
|
abstract org.hibernate.internal.FilterAliasGenerator |
getFilterAliasGenerator(String rootAlias) |
String |
getIdentifierColumnAlias(String suffix)
Generates the collection’s identifier column aliases, based on the given
suffix.
|
String |
getIdentifierColumnName() |
IdentifierGenerator |
getIdentifierGenerator()
Get the surrogate key generation strategy (optional operation)
|
Type |
getIdentifierType()
Get the type of the surrogate key
|
String[] |
getIndexColumnAliases(String suffix)
Generates the collection’s index column aliases, based on the given
suffix.
|
String[] |
getIndexColumnNames()
Get the names of the collection index columns if
this is an indexed collection (optional operation)
|
String[] |
getIndexColumnNames(String alias)
Get the names of the collection index columns if
this is an indexed collection (optional operation),
aliased by the given table alias
|
CollectionIndexDefinition |
getIndexDefinition() |
String[] |
getIndexFormulas()
Get the index formulas if this is an indexed collection
(optional operation)
|
Type |
getIndexType()
The collection index type (or null if the collection has no index)
|
CollectionInitializer |
getInitializer()
Intended for internal use only.
|
protected ExecuteUpdateResultCheckStyle |
getInsertCheckStyle() |
String[] |
getKeyColumnAliases(String suffix)
Generates the collection’s key column aliases, based on the given
suffix.
|
String[] |
getKeyColumnNames()
The columns to join on
|
Type |
getKeyType()
The collection key type
|
String |
getManyToManyFilterFragment(String alias,
Map enabledFilters) |
String |
getManyToManyOrderByString(String alias)
Get the order-by to be applied at the target table of a many to many
|
String |
getMappedByProperty() |
String |
getName()
An identifying name; a class name or collection role name.
|
NavigableRole |
getNavigableRole() |
String |
getOwnerEntityName() |
EntityPersister |
getOwnerEntityPersister()
Get the persister of the entity that "owns" this collection
|
String |
getRole()
The name of this collection role
|
int |
getSize(Serializable key,
SharedSessionContractImplementor session) |
protected String |
getSQLDeleteRowString() |
protected String |
getSQLDeleteString() |
protected SQLExceptionConverter |
getSQLExceptionConverter() |
protected SqlExceptionHelper |
getSQLExceptionHelper() |
protected String |
getSQLInsertRowString() |
String |
getSQLOrderByString(String alias)
Get the order by SQL
|
protected String |
getSQLUpdateRowString() |
protected String |
getSQLWhereString(String alias) |
String |
getTableName()
The table to join to.
|
Type |
getType()
Get the type of the thing containing the properties
|
protected ExecuteUpdateResultCheckStyle |
getUpdateCheckStyle() |
boolean |
hasCache()
Is this collection role cacheable
|
boolean |
hasIndex()
Is this collection indexed?
|
boolean |
hasManyToManyOrdering() |
boolean |
hasOrdering()
Is this an ordered collection? (An ordered collection is
ordered by the initialization operation, not by sorting
that happens in memory, as in the case of a sorted collection.)
|
boolean |
hasOrphanDelete()
Does this collection implement "orphan delete"?
|
boolean |
hasWhere()
Does this collection role have a where clause filter?
|
protected Object |
incrementIndexByBase(Object index) |
boolean |
indexExists(Serializable key,
Object index,
SharedSessionContractImplementor session) |
void |
initCollectionPropertyMap() |
void |
initialize(Serializable key,
SharedSessionContractImplementor session)
Initialize the given collection with the given key
TODO: add owner argument!!
|
void |
insertRows(PersistentCollection collection,
Serializable id,
SharedSessionContractImplementor session)
Insert the persistent state of any new collection elements
|
boolean |
isAffectedByEnabledFilters(SharedSessionContractImplementor session) |
boolean |
isArray()
Is the collection an array?
|
boolean |
isCollection()
Is this instance actually a CollectionPersister?
|
protected boolean |
isDeleteAllCallable() |
protected boolean |
isDeleteCallable() |
boolean |
isExtraLazy() |
protected boolean |
isInsertCallable() |
boolean |
isInverse()
Is this collection "inverse", so state changes are not
propogated to the database.
|
boolean |
isLazy()
Is the collection lazily initialized?
|
abstract 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 |
isMutable()
Can the elements of this collection change?
|
boolean |
isPrimitiveArray()
Is the collection a primitive array?
|
protected boolean |
isRowDeleteEnabled() |
protected boolean |
isRowInsertEnabled() |
boolean |
isSubselectLoadable() |
protected boolean |
isUpdateCallable() |
boolean |
isVersioned()
Does this collection cause version increment of the
owning entity?
|
protected void |
logStaticSQL() |
String |
oneToManyFilterFragment(String alias) |
String |
oneToManyFilterFragment(String alias,
Set<String> treatAsDeclarations) |
void |
postInstantiate() |
void |
processQueuedOps(PersistentCollection collection,
Serializable key,
SharedSessionContractImplementor session)
Process queued operations within the PersistentCollection.
|
Object |
readElement(ResultSet rs,
Object owner,
String[] aliases,
SharedSessionContractImplementor session)
Read the element from a row of the JDBC <tt>ResultSet</tt>
|
Object |
readIdentifier(ResultSet rs,
String alias,
SharedSessionContractImplementor session)
Read the identifier from a row of the JDBC <tt>ResultSet</tt>
|
Object |
readIndex(ResultSet rs,
String[] aliases,
SharedSessionContractImplementor session)
Read the index from a row of the JDBC <tt>ResultSet</tt>
|
Object |
readKey(ResultSet rs,
String[] aliases,
SharedSessionContractImplementor session)
Read the key from a row of the JDBC <tt>ResultSet</tt>
|
void |
recreate(PersistentCollection collection,
Serializable id,
SharedSessionContractImplementor session)
(Re)create the collection’s persistent state
|
void |
remove(Serializable id,
SharedSessionContractImplementor session)
Completely remove the persistent state of the collection
|
String |
selectFragment(String alias,
String columnSuffix)
Generate a list of collection index, key and element columns
|
String[] |
toColumns(String propertyName)
Given a property path, return the corresponding column name(s).
|
String[] |
toColumns(String alias,
String propertyName)
Obtain aliased column/formula fragments for the specified property path.
|
String |
toString() |
Type |
toType(String propertyName)
Given a component path expression, get the type of the property
|
void |
updateRows(PersistentCollection collection,
Serializable id,
SharedSessionContractImplementor session)
Update the persistent state of any elements that were modified
|
protected int |
writeElement(PreparedStatement st,
Object elt,
int i,
SharedSessionContractImplementor session)
Write the element to a JDBC <tt>PreparedStatement</tt>
|
protected int |
writeElementToWhere(PreparedStatement st,
Object elt,
int i,
SharedSessionContractImplementor session)
Write the element to a JDBC <tt>PreparedStatement</tt>
|
int |
writeIdentifier(PreparedStatement st,
Object id,
int i,
SharedSessionContractImplementor session)
Write the identifier to a JDBC <tt>PreparedStatement</tt>
|
protected int |
writeIndex(PreparedStatement st,
Object index,
int i,
SharedSessionContractImplementor session)
Write the index to a JDBC <tt>PreparedStatement</tt>
|
protected int |
writeIndexToWhere(PreparedStatement st,
Object index,
int i,
SharedSessionContractImplementor session)
Write the index to a JDBC <tt>PreparedStatement</tt>
|
protected int |
writeKey(PreparedStatement st,
Serializable key,
int i,
SharedSessionContractImplementor session)
Write the key to a JDBC <tt>PreparedStatement</tt>
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconsumesCollectionAlias, consumesEntityAlias, fromJoinFragment, fromJoinFragment, selectFragment, whereJoinFragment, whereJoinFragmentisCascadeDeleteEnabled, isOneToManyprotected final boolean hasWhere
protected final String sqlWhereString
protected final boolean indexContainsFormula
protected final boolean elementIsPureFormula
protected final Type elementType
protected final String[] keyColumnNames
protected final String[] indexColumnNames
protected final String[] indexFormulaTemplates
protected final String[] indexFormulas
protected final boolean[] indexColumnIsGettable
protected final boolean[] indexColumnIsSettable
protected final String[] elementColumnNames
protected final String[] elementColumnWriters
protected final String[] elementColumnReaders
protected final String[] elementColumnReaderTemplates
protected final String[] elementFormulaTemplates
protected final String[] elementFormulas
protected final boolean[] elementColumnIsSettable
protected final boolean[] elementColumnIsInPrimaryKey
protected final String[] indexColumnAliases
protected final String[] elementColumnAliases
protected final String[] keyColumnAliases
protected final String identifierColumnName
protected final String qualifiedTableName
protected final boolean hasIndex
protected final boolean hasIdentifier
protected final boolean isInverse
protected final int batchSize
protected final SqlExceptionHelper sqlExceptionHelper
protected org.hibernate.engine.jdbc.batch.internal.BasicBatchKey recreateBatchKey
public AbstractCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
MappingExceptionCacheExceptionprotected String determineTableName(Table table, JdbcEnvironment jdbcEnvironment)
public void postInstantiate()
throws MappingException
postInstantiate in interface CollectionPersisterMappingExceptionprotected void logStaticSQL()
public void initialize(Serializable key, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterInitialize the given collection with the given key TODO: add owner argument!!
initialize in interface CollectionPersisterHibernateExceptionprotected CollectionInitializer getAppropriateInitializer(Serializable key, SharedSessionContractImplementor session)
protected abstract CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)
protected abstract CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) throws MappingException
MappingExceptionpublic NavigableRole getNavigableRole()
getNavigableRole in interface CollectionPersisterpublic CollectionDataAccess getCacheAccessStrategy()
CollectionPersisterGet the cache
getCacheAccessStrategy in interface CollectionPersisterpublic boolean hasCache()
CollectionPersisterIs this collection role cacheable
hasCache in interface CollectionPersisterpublic CollectionType getCollectionType()
CollectionPersisterGet the associated <tt>Type</tt>
getCollectionType in interface CollectionPersistergetCollectionType in interface CollectionDefinitionpublic String getSQLOrderByString(String alias)
QueryableCollectionGet the order by SQL
getSQLOrderByString in interface QueryableCollectionpublic String getManyToManyOrderByString(String alias)
QueryableCollectionGet the order-by to be applied at the target table of a many to many
getManyToManyOrderByString in interface QueryableCollectionalias - The alias for the many-to-many target tablepublic FetchMode getFetchMode()
QueryableCollectionShould we load this collection role by outerjoining?
getFetchMode in interface QueryableCollectionpublic boolean hasOrdering()
CollectionPersisterIs this an ordered collection? (An ordered collection is ordered by the initialization operation, not by sorting that happens in memory, as in the case of a sorted collection.)
hasOrdering in interface CollectionPersisterpublic boolean hasManyToManyOrdering()
hasManyToManyOrdering in interface CollectionPersisterpublic boolean hasWhere()
QueryableCollectionDoes this collection role have a where clause filter?
hasWhere in interface QueryableCollectionprotected String getSQLDeleteString()
protected String getSQLInsertRowString()
protected String getSQLUpdateRowString()
protected String getSQLDeleteRowString()
public Type getKeyType()
CollectionMetadataThe collection key type
getKeyType in interface CollectionMetadatagetKeyType in interface CollectionPersisterpublic Type getIndexType()
CollectionMetadataThe collection index type (or null if the collection has no index)
getIndexType in interface CollectionMetadatagetIndexType in interface CollectionPersisterpublic Type getElementType()
CollectionMetadataThe collection element type
getElementType in interface CollectionMetadatagetElementType in interface CollectionPersisterpublic Class getElementClass()
Return the element class of an array, or null otherwise. needed by arrays
getElementClass in interface CollectionPersisterpublic Object readElement(ResultSet rs, Object owner, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
CollectionPersisterRead the element from a row of the JDBC <tt>ResultSet</tt>
readElement in interface CollectionPersisterHibernateExceptionSQLExceptionpublic Object readIndex(ResultSet rs, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
CollectionPersisterRead the index from a row of the JDBC <tt>ResultSet</tt>
readIndex in interface CollectionPersisterHibernateExceptionSQLExceptionpublic Object readIdentifier(ResultSet rs, String alias, SharedSessionContractImplementor session) throws HibernateException, SQLException
CollectionPersisterRead the identifier from a row of the JDBC <tt>ResultSet</tt>
readIdentifier in interface CollectionPersisterHibernateExceptionSQLExceptionpublic Object readKey(ResultSet rs, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
CollectionPersisterRead the key from a row of the JDBC <tt>ResultSet</tt>
readKey in interface CollectionPersisterHibernateExceptionSQLExceptionprotected int writeKey(PreparedStatement st, Serializable key, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the key to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionprotected int writeElement(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the element to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionprotected int writeIndex(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the index to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionprotected int writeElementToWhere(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the element to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionprotected int writeIndexToWhere(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the index to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionpublic int writeIdentifier(PreparedStatement st, Object id, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the identifier to a JDBC <tt>PreparedStatement</tt>
HibernateExceptionSQLExceptionpublic boolean isPrimitiveArray()
CollectionMetadataIs the collection a primitive array?
isPrimitiveArray in interface CollectionMetadataisPrimitiveArray in interface CollectionPersisterpublic boolean isArray()
CollectionMetadataIs the collection an array?
isArray in interface CollectionMetadataisArray in interface CollectionPersisterpublic String[] getKeyColumnAliases(String suffix)
CollectionPersisterGenerates the collection’s key column aliases, based on the given suffix.
getKeyColumnAliases in interface CollectionPersistersuffix - The suffix to use in the key column alias generation.public String[] getElementColumnAliases(String suffix)
CollectionPersisterGenerates the collection’s element column aliases, based on the given suffix.
getElementColumnAliases in interface CollectionPersistersuffix - The suffix to use in the element column alias generation.public String[] getIndexColumnAliases(String suffix)
CollectionPersisterGenerates the collection’s index column aliases, based on the given suffix.
getIndexColumnAliases in interface CollectionPersistersuffix - The suffix to use in the index column alias generation.public String getIdentifierColumnAlias(String suffix)
CollectionPersisterGenerates the collection’s identifier column aliases, based on the given suffix.
getIdentifierColumnAlias in interface CollectionPersistersuffix - The suffix to use in the key column alias generation.public String getIdentifierColumnName()
getIdentifierColumnName in interface SQLLoadableCollectionpublic String selectFragment(String alias, String columnSuffix)
Generate a list of collection index, key and element columns
selectFragment in interface QueryableCollectionprotected String generateSelectSizeString(boolean isIntegerIndexed)
protected String generateDetectRowByIndexString()
protected String generateSelectRowByIndexString()
protected String generateDetectRowByElementString()
protected SelectFragment generateSelectFragment(String alias, String columnSuffix)
protected void appendElementColumns(SelectFragment frag, String elemAlias)
protected void appendIndexColumns(SelectFragment frag, String alias)
protected void appendIdentifierColumns(SelectFragment frag, String alias)
public String[] getIndexColumnNames()
QueryableCollectionGet the names of the collection index columns if this is an indexed collection (optional operation)
getIndexColumnNames in interface QueryableCollectionpublic String[] getIndexFormulas()
QueryableCollectionGet the index formulas if this is an indexed collection (optional operation)
getIndexFormulas in interface QueryableCollectionpublic String[] getIndexColumnNames(String alias)
QueryableCollectionGet the names of the collection index columns if this is an indexed collection (optional operation), aliased by the given table alias
getIndexColumnNames in interface QueryableCollectionpublic String[] getElementColumnNames(String alias)
QueryableCollectionGet the names of the collection element columns (or the primary key columns in the case of a one-to-many association), aliased by the given table alias
getElementColumnNames in interface QueryableCollectionpublic String[] getElementColumnNames()
QueryableCollectionGet the names of the collection element columns (or the primary key columns in the case of a one-to-many association)
getElementColumnNames in interface QueryableCollectionpublic String[] getKeyColumnNames()
JoinableThe columns to join on
getKeyColumnNames in interface Joinablepublic boolean hasIndex()
CollectionMetadataIs this collection indexed?
hasIndex in interface CollectionMetadatahasIndex in interface CollectionPersisterpublic boolean isLazy()
CollectionMetadataIs the collection lazily initialized?
isLazy in interface CollectionMetadataisLazy in interface CollectionPersisterpublic boolean isInverse()
CollectionPersisterIs this collection "inverse", so state changes are not propogated to the database.
isInverse in interface CollectionPersisterpublic String getTableName()
JoinableThe table to join to.
getTableName in interface Joinablepublic void remove(Serializable id, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterCompletely remove the persistent state of the collection
remove in interface CollectionPersisterHibernateExceptionpublic void recreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
CollectionPersister(Re)create the collection’s persistent state
recreate in interface CollectionPersisterHibernateExceptionprotected boolean isRowDeleteEnabled()
public void deleteRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterDelete the persistent state of any elements that were removed from the collection
deleteRows in interface CollectionPersisterHibernateExceptionprotected boolean isRowInsertEnabled()
public void insertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterInsert the persistent state of any new collection elements
insertRows in interface CollectionPersisterHibernateExceptionpublic String getRole()
CollectionMetadataThe name of this collection role
getRole in interface CollectionMetadatagetRole in interface CollectionPersisterpublic String getOwnerEntityName()
public EntityPersister getOwnerEntityPersister()
CollectionPersisterGet the persister of the entity that "owns" this collection
getOwnerEntityPersister in interface CollectionPersisterpublic IdentifierGenerator getIdentifierGenerator()
CollectionPersisterGet the surrogate key generation strategy (optional operation)
getIdentifierGenerator in interface CollectionPersisterpublic Type getIdentifierType()
CollectionPersisterGet the type of the surrogate key
getIdentifierType in interface CollectionPersisterpublic boolean hasOrphanDelete()
CollectionPersisterDoes this collection implement "orphan delete"?
hasOrphanDelete in interface CollectionPersisterpublic Type toType(String propertyName) throws QueryException
PropertyMappingGiven a component path expression, get the type of the property
toType in interface PropertyMappingQueryExceptionpublic abstract boolean isManyToMany()
CollectionPersisterIs 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.
isManyToMany in interface CollectionPersisterpublic String getManyToManyFilterFragment(String alias, Map enabledFilters)
getManyToManyFilterFragment in interface CollectionPersisterpublic String[] toColumns(String alias, String propertyName) throws QueryException
PropertyMappingObtain aliased column/formula fragments for the specified property path.
toColumns in interface PropertyMappingQueryExceptionpublic String[] toColumns(String propertyName) throws QueryException
PropertyMappingGiven a property path, return the corresponding column name(s).
toColumns in interface PropertyMappingQueryExceptionpublic Type getType()
PropertyMappingGet the type of the thing containing the properties
getType in interface PropertyMappingpublic String getName()
JoinableAn identifying name; a class name or collection role name.
public EntityPersister getElementPersister()
QueryableCollectionGet the persister of the element class, if this is a collection of entities (optional operation). Note that for a one-to-many association, the returned persister must be <tt>OuterJoinLoadable</tt>.
getElementPersister in interface QueryableCollectionpublic boolean isCollection()
JoinableIs this instance actually a CollectionPersister?
isCollection in interface Joinablepublic Serializable[] getCollectionSpaces()
CollectionPersisterGet the "space" that holds the persistent state
getCollectionSpaces in interface CollectionPersisterprotected abstract String generateDeleteString()
protected abstract String generateDeleteRowString()
protected abstract String generateUpdateRowString()
protected abstract String generateInsertRowString()
public void updateRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterUpdate the persistent state of any elements that were modified
updateRows in interface CollectionPersisterHibernateExceptionprotected abstract int doUpdateRows(Serializable key, PersistentCollection collection, SharedSessionContractImplementor session) throws HibernateException
HibernateExceptionpublic void processQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session) throws HibernateException
CollectionPersisterProcess queued operations within the PersistentCollection.
processQueuedOps in interface CollectionPersisterHibernateException@Deprecated protected void doProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SharedSessionContractImplementor session) throws HibernateException
Process queued operations within the PersistentCollection.
collection - The collectionkey - The collection keynextIndex - The next index to writesession - The sessionHibernateExceptionprotected abstract void doProcessQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session) throws HibernateException
HibernateExceptionpublic CollectionMetadata getCollectionMetadata()
getCollectionMetadata in interface CollectionPersisterpublic SessionFactoryImplementor getFactory()
getFactory in interface CollectionPersisterprotected String filterFragment(String alias) throws MappingException
MappingExceptionprotected String filterFragment(String alias, Set<String> treatAsDeclarations) throws MappingException
MappingExceptionpublic String filterFragment(String alias, Map enabledFilters) throws MappingException
JoinableGet the where clause filter, given a query alias and considering enabled session filters
filterFragment in interface JoinableMappingExceptionpublic String filterFragment(String alias, Map enabledFilters, Set<String> treatAsDeclarations)
JoinableGet the where clause filter, given a query alias and considering enabled session filters
filterFragment in interface Joinablepublic String oneToManyFilterFragment(String alias) throws MappingException
oneToManyFilterFragment in interface JoinableMappingExceptionpublic String oneToManyFilterFragment(String alias, Set<String> treatAsDeclarations)
oneToManyFilterFragment in interface Joinableprotected boolean isInsertCallable()
protected ExecuteUpdateResultCheckStyle getInsertCheckStyle()
protected boolean isUpdateCallable()
protected ExecuteUpdateResultCheckStyle getUpdateCheckStyle()
protected boolean isDeleteCallable()
protected ExecuteUpdateResultCheckStyle getDeleteCheckStyle()
protected boolean isDeleteAllCallable()
protected ExecuteUpdateResultCheckStyle getDeleteAllCheckStyle()
public boolean isVersioned()
CollectionPersisterDoes this collection cause version increment of the owning entity?
isVersioned in interface CollectionPersisterprotected SQLExceptionConverter getSQLExceptionConverter()
protected SqlExceptionHelper getSQLExceptionHelper()
public CacheEntryStructure getCacheEntryStructure()
CollectionPersisterGet the cache structure
getCacheEntryStructure in interface CollectionPersisterpublic boolean isAffectedByEnabledFilters(SharedSessionContractImplementor session)
isAffectedByEnabledFilters in interface CollectionPersisterpublic boolean isSubselectLoadable()
public boolean isMutable()
CollectionPersisterCan the elements of this collection change?
isMutable in interface CollectionPersisterpublic String[] getCollectionPropertyColumnAliases(String propertyName, String suffix)
getCollectionPropertyColumnAliases in interface SQLLoadableCollectionpublic void initCollectionPropertyMap()
public int getSize(Serializable key, SharedSessionContractImplementor session)
getSize in interface CollectionPersisterpublic boolean indexExists(Serializable key, Object index, SharedSessionContractImplementor session)
indexExists in interface CollectionPersisterpublic boolean elementExists(Serializable key, Object element, SharedSessionContractImplementor session)
elementExists in interface CollectionPersisterpublic Object getElementByIndex(Serializable key, Object index, SharedSessionContractImplementor session, Object owner)
getElementByIndex in interface CollectionPersisterpublic boolean isExtraLazy()
isExtraLazy in interface CollectionPersisterprotected Dialect getDialect()
public CollectionInitializer getInitializer()
Intended for internal use only. In fact really only currently used from test suite for assertion purposes.
public int getBatchSize()
getBatchSize in interface CollectionPersisterpublic String getMappedByProperty()
getMappedByProperty in interface CollectionPersisterpublic abstract org.hibernate.internal.FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
public CollectionPersister getCollectionPersister()
getCollectionPersister in interface CollectionDefinitionpublic CollectionIndexDefinition getIndexDefinition()
getIndexDefinition in interface CollectionDefinitionpublic CollectionElementDefinition getElementDefinition()
getElementDefinition in interface CollectionDefinitionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.