类 AbstractCollectionPersister
- java.lang.Object
-
- org.hibernate.persister.collection.AbstractCollectionPersister
-
- 所有已实现的接口:
CollectionMetadata,CollectionPersister,QueryableCollection,SQLLoadableCollection,Joinable,PropertyMapping,CollectionDefinition
public abstract class AbstractCollectionPersister extends Object implements CollectionMetadata, SQLLoadableCollection
Base implementation of the QueryableCollection interface.- 作者:
- Gavin King
- 另请参阅:
BasicCollectionPersister,OneToManyPersister
-
-
字段概要
-
构造器概要
构造器 构造器 说明 AbstractCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected voidappendElementColumns(SelectFragment frag, String elemAlias)protected voidappendIdentifierColumns(SelectFragment frag, String alias)protected voidappendIndexColumns(SelectFragment frag, String alias)protected abstract CollectionInitializercreateCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers)protected DeletecreateDelete()protected InsertcreateInsert()protected abstract CollectionInitializercreateSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)protected UpdatecreateUpdate()protected ObjectdecrementIndexByBase(Object index)voiddeleteRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)Delete the persistent state of any elements that were removed from the collectionprotected StringdetermineTableName(Table table, JdbcEnvironment jdbcEnvironment)protected voiddoProcessQueuedOps(PersistentCollection collection, Serializable key, int nextIndex, SharedSessionContractImplementor session)protected abstract voiddoProcessQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session)protected abstract intdoUpdateRows(Serializable key, PersistentCollection collection, SharedSessionContractImplementor session)booleanelementExists(Serializable key, Object element, SharedSessionContractImplementor session)protected StringfilterFragment(String alias)StringfilterFragment(String alias, Map enabledFilters)Get the where clause filter, given a query alias and considering enabled session filtersStringfilterFragment(String alias, Map enabledFilters, Set<String> treatAsDeclarations)Get the where clause filter, given a query alias and considering enabled session filtersprotected StringfilterFragment(String alias, Set<String> treatAsDeclarations)protected abstract StringgenerateDeleteRowString()protected abstract StringgenerateDeleteString()protected StringgenerateDetectRowByElementString()protected StringgenerateDetectRowByIndexString()protected abstract StringgenerateInsertRowString()protected SelectFragmentgenerateSelectFragment(String alias, String columnSuffix)protected StringgenerateSelectRowByIndexString()protected StringgenerateSelectSizeString(boolean isIntegerIndexed)protected abstract StringgenerateUpdateRowString()protected CollectionInitializergetAppropriateInitializer(Serializable key, SharedSessionContractImplementor session)intgetBatchSize()CollectionDataAccessgetCacheAccessStrategy()Get the cacheCacheEntryStructuregetCacheEntryStructure()Get the cache structureCollectionMetadatagetCollectionMetadata()CollectionPersistergetCollectionPersister()String[]getCollectionPropertyColumnAliases(String propertyName, String suffix)Serializable[]getCollectionSpaces()Get the "space" that holds the persistent stateCollectionTypegetCollectionType()Get the associated Typeprotected ExecuteUpdateResultCheckStylegetDeleteAllCheckStyle()protected ExecuteUpdateResultCheckStylegetDeleteCheckStyle()protected DialectgetDialect()ObjectgetElementByIndex(Serializable key, Object index, SharedSessionContractImplementor session, Object owner)ClassgetElementClass()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 aliasCollectionElementDefinitiongetElementDefinition()EntityPersistergetElementPersister()Get the persister of the element class, if this is a collection of entities (optional operation).TypegetElementType()The collection element typeSessionFactoryImplementorgetFactory()FetchModegetFetchMode()Should we load this collection role by outerjoining?abstract FilterAliasGeneratorgetFilterAliasGenerator(String rootAlias)StringgetIdentifierColumnAlias(String suffix)Generates the collection's identifier column aliases, based on the given suffix.StringgetIdentifierColumnName()IdentifierGeneratorgetIdentifierGenerator()Get the surrogate key generation strategy (optional operation)TypegetIdentifierType()Get the type of the surrogate keyString[]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 aliasCollectionIndexDefinitiongetIndexDefinition()String[]getIndexFormulas()Get the index formulas if this is an indexed collection (optional operation)TypegetIndexType()The collection index type (or null if the collection has no index)CollectionInitializergetInitializer()Intended for internal use only.protected ExecuteUpdateResultCheckStylegetInsertCheckStyle()String[]getKeyColumnAliases(String suffix)Generates the collection's key column aliases, based on the given suffix.String[]getKeyColumnNames()The columns to join onTypegetKeyType()The collection key typeStringgetManyToManyFilterFragment(String alias, Map enabledFilters)StringgetManyToManyOrderByString(String alias)Get the order-by to be applied at the target table of a many to manyStringgetMappedByProperty()StringgetName()An identifying name; a class name or collection role name.NavigableRolegetNavigableRole()StringgetOwnerEntityName()EntityPersistergetOwnerEntityPersister()Get the persister of the entity that "owns" this collectionStringgetRole()The name of this collection roleintgetSize(Serializable key, SharedSessionContractImplementor session)protected StringgetSQLDeleteRowString()protected StringgetSQLDeleteString()protected SQLExceptionConvertergetSQLExceptionConverter()protected SqlExceptionHelpergetSQLExceptionHelper()protected StringgetSQLInsertRowString()StringgetSQLOrderByString(String alias)Get the order by SQLprotected StringgetSQLUpdateRowString()protected StringgetSQLWhereString(String alias)StringgetTableName()The table to join to.TypegetType()Get the type of the thing containing the propertiesprotected ExecuteUpdateResultCheckStylegetUpdateCheckStyle()booleanhasCache()Is this collection role cacheablebooleanhasIndex()Is this collection indexed?booleanhasManyToManyOrdering()booleanhasOrdering()Is this an ordered collection?booleanhasOrphanDelete()Does this collection implement "orphan delete"?booleanhasWhere()Does this collection role have a where clause filter?protected ObjectincrementIndexByBase(Object index)booleanindexExists(Serializable key, Object index, SharedSessionContractImplementor session)voidinitCollectionPropertyMap()voidinitialize(Serializable key, SharedSessionContractImplementor session)Initialize the given collection with the given key TODO: add owner argument!!voidinsertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)Insert the persistent state of any new collection elementsbooleanisAffectedByEnabledFilters(SharedSessionContractImplementor session)booleanisArray()Is the collection an array?booleanisCollection()Is this instance actually a CollectionPersister?protected booleanisDeleteAllCallable()protected booleanisDeleteCallable()booleanisExtraLazy()protected booleanisInsertCallable()booleanisInverse()Is this collection "inverse", so state changes are not propagated to the database.booleanisLazy()Is the collection lazily initialized?abstract booleanisManyToMany()Is this a many-to-many association?booleanisMutable()Can the elements of this collection change?booleanisPrimitiveArray()Is the collection a primitive array?protected booleanisRowDeleteEnabled()protected booleanisRowInsertEnabled()booleanisSubselectLoadable()protected booleanisUpdateCallable()booleanisVersioned()Does this collection cause version increment of the owning entity?protected voidlogStaticSQL()StringoneToManyFilterFragment(String alias)StringoneToManyFilterFragment(String alias, Set<String> treatAsDeclarations)voidpostInstantiate()voidprocessQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session)Process queued operations within the PersistentCollection.ObjectreadElement(ResultSet rs, Object owner, String[] aliases, SharedSessionContractImplementor session)Read the element from a row of the JDBC ResultSetObjectreadIdentifier(ResultSet rs, String alias, SharedSessionContractImplementor session)Read the identifier from a row of the JDBC ResultSetObjectreadIndex(ResultSet rs, String[] aliases, SharedSessionContractImplementor session)Read the index from a row of the JDBC ResultSetObjectreadKey(ResultSet rs, String[] aliases, SharedSessionContractImplementor session)Read the key from a row of the JDBC ResultSetvoidrecreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)(Re)create the collection's persistent statevoidremove(Serializable id, SharedSessionContractImplementor session)Completely remove the persistent state of the collectionStringselectFragment(String alias, String columnSuffix)Generate a list of collection index, key and element columnsString[]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.StringtoString()TypetoType(String propertyName)Given a component path expression, get the type of the propertyvoidupdateRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)Update the persistent state of any elements that were modifiedprotected intwriteElement(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session)Write the element to a JDBC PreparedStatementprotected intwriteElementToWhere(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session)Write the element to a JDBC PreparedStatementintwriteIdentifier(PreparedStatement st, Object id, int i, SharedSessionContractImplementor session)Write the identifier to a JDBC PreparedStatementprotected intwriteIndex(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session)Write the index to a JDBC PreparedStatementprotected intwriteIndexToWhere(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session)Write the index to a JDBC PreparedStatementprotected intwriteKey(PreparedStatement st, Serializable key, int i, SharedSessionContractImplementor session)Write the key to a JDBC PreparedStatement-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.persister.collection.CollectionPersister
isCascadeDeleteEnabled, isOneToMany
-
从接口继承的方法 org.hibernate.persister.entity.Joinable
consumesCollectionAlias, consumesEntityAlias, fromJoinFragment, fromJoinFragment, fromJoinFragment, selectFragment, whereJoinFragment, whereJoinFragment
-
-
-
-
字段详细资料
-
hasWhere
protected final boolean hasWhere
-
sqlWhereString
protected final String sqlWhereString
-
indexContainsFormula
protected final boolean indexContainsFormula
-
elementIsPureFormula
protected final boolean elementIsPureFormula
-
elementType
protected final Type elementType
-
keyColumnNames
protected final String[] keyColumnNames
-
indexColumnNames
protected final String[] indexColumnNames
-
indexFormulaTemplates
protected final String[] indexFormulaTemplates
-
indexFormulas
protected final String[] indexFormulas
-
indexColumnIsGettable
protected final boolean[] indexColumnIsGettable
-
indexColumnIsSettable
protected final boolean[] indexColumnIsSettable
-
elementColumnNames
protected final String[] elementColumnNames
-
elementColumnWriters
protected final String[] elementColumnWriters
-
elementColumnReaders
protected final String[] elementColumnReaders
-
elementColumnReaderTemplates
protected final String[] elementColumnReaderTemplates
-
elementFormulaTemplates
protected final String[] elementFormulaTemplates
-
elementFormulas
protected final String[] elementFormulas
-
elementColumnIsGettable
protected final boolean[] elementColumnIsGettable
-
elementColumnIsSettable
protected final boolean[] elementColumnIsSettable
-
elementColumnIsInPrimaryKey
protected final boolean[] elementColumnIsInPrimaryKey
-
indexColumnAliases
protected final String[] indexColumnAliases
-
elementColumnAliases
protected final String[] elementColumnAliases
-
keyColumnAliases
protected final String[] keyColumnAliases
-
identifierColumnName
protected final String identifierColumnName
-
qualifiedTableName
protected final String qualifiedTableName
-
hasIndex
protected final boolean hasIndex
-
hasIdentifier
protected final boolean hasIdentifier
-
isInverse
protected final boolean isInverse
-
batchSize
protected final int batchSize
-
sqlExceptionHelper
protected final SqlExceptionHelper sqlExceptionHelper
-
recreateBatchKey
protected BasicBatchKey recreateBatchKey
-
-
构造器详细资料
-
AbstractCollectionPersister
public AbstractCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
-
-
方法详细资料
-
determineTableName
protected String determineTableName(Table table, JdbcEnvironment jdbcEnvironment)
-
postInstantiate
public void postInstantiate() throws MappingException- 指定者:
postInstantiate在接口中CollectionPersister- 抛出:
MappingException
-
logStaticSQL
protected void logStaticSQL()
-
initialize
public void initialize(Serializable key, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterInitialize the given collection with the given key TODO: add owner argument!!- 指定者:
initialize在接口中CollectionPersister- 抛出:
HibernateException
-
getAppropriateInitializer
protected CollectionInitializer getAppropriateInitializer(Serializable key, SharedSessionContractImplementor session)
-
createSubselectInitializer
protected abstract CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)
-
createCollectionInitializer
protected abstract CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) throws MappingException
- 抛出:
MappingException
-
getNavigableRole
public NavigableRole getNavigableRole()
- 指定者:
getNavigableRole在接口中CollectionPersister
-
getCacheAccessStrategy
public CollectionDataAccess getCacheAccessStrategy()
从接口复制的说明:CollectionPersisterGet the cache- 指定者:
getCacheAccessStrategy在接口中CollectionPersister
-
hasCache
public boolean hasCache()
从接口复制的说明:CollectionPersisterIs this collection role cacheable- 指定者:
hasCache在接口中CollectionPersister
-
getCollectionType
public CollectionType getCollectionType()
从接口复制的说明:CollectionPersisterGet the associated Type- 指定者:
getCollectionType在接口中CollectionDefinition- 指定者:
getCollectionType在接口中CollectionPersister
-
getSQLOrderByString
public String getSQLOrderByString(String alias)
从接口复制的说明:QueryableCollectionGet the order by SQL- 指定者:
getSQLOrderByString在接口中QueryableCollection
-
getManyToManyOrderByString
public String getManyToManyOrderByString(String alias)
从接口复制的说明:QueryableCollectionGet the order-by to be applied at the target table of a many to many- 指定者:
getManyToManyOrderByString在接口中QueryableCollection- 参数:
alias- The alias for the many-to-many target table- 返回:
- appropriate order-by fragment or empty string.
-
getFetchMode
public FetchMode getFetchMode()
从接口复制的说明:QueryableCollectionShould we load this collection role by outerjoining?- 指定者:
getFetchMode在接口中QueryableCollection
-
hasOrdering
public 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在接口中CollectionPersister
-
hasManyToManyOrdering
public boolean hasManyToManyOrdering()
- 指定者:
hasManyToManyOrdering在接口中CollectionPersister
-
hasWhere
public boolean hasWhere()
从接口复制的说明:QueryableCollectionDoes this collection role have a where clause filter?- 指定者:
hasWhere在接口中QueryableCollection
-
getSQLDeleteString
protected String getSQLDeleteString()
-
getSQLInsertRowString
protected String getSQLInsertRowString()
-
getSQLUpdateRowString
protected String getSQLUpdateRowString()
-
getSQLDeleteRowString
protected String getSQLDeleteRowString()
-
getKeyType
public Type getKeyType()
从接口复制的说明:CollectionMetadataThe collection key type- 指定者:
getKeyType在接口中CollectionMetadata- 指定者:
getKeyType在接口中CollectionPersister
-
getIndexType
public Type getIndexType()
从接口复制的说明:CollectionMetadataThe collection index type (or null if the collection has no index)- 指定者:
getIndexType在接口中CollectionMetadata- 指定者:
getIndexType在接口中CollectionPersister
-
getElementType
public Type getElementType()
从接口复制的说明:CollectionMetadataThe collection element type- 指定者:
getElementType在接口中CollectionMetadata- 指定者:
getElementType在接口中CollectionPersister
-
getElementClass
public Class getElementClass()
Return the element class of an array, or null otherwise. needed by arrays- 指定者:
getElementClass在接口中CollectionPersister
-
readElement
public Object readElement(ResultSet rs, Object owner, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
从接口复制的说明:CollectionPersisterRead the element from a row of the JDBC ResultSet- 指定者:
readElement在接口中CollectionPersister- 抛出:
HibernateExceptionSQLException
-
readIndex
public Object readIndex(ResultSet rs, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
从接口复制的说明:CollectionPersisterRead the index from a row of the JDBC ResultSet- 指定者:
readIndex在接口中CollectionPersister- 抛出:
HibernateExceptionSQLException
-
readIdentifier
public Object readIdentifier(ResultSet rs, String alias, SharedSessionContractImplementor session) throws HibernateException, SQLException
从接口复制的说明:CollectionPersisterRead the identifier from a row of the JDBC ResultSet- 指定者:
readIdentifier在接口中CollectionPersister- 抛出:
HibernateExceptionSQLException
-
readKey
public Object readKey(ResultSet rs, String[] aliases, SharedSessionContractImplementor session) throws HibernateException, SQLException
从接口复制的说明:CollectionPersisterRead the key from a row of the JDBC ResultSet- 指定者:
readKey在接口中CollectionPersister- 抛出:
HibernateExceptionSQLException
-
writeKey
protected int writeKey(PreparedStatement st, Serializable key, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the key to a JDBC PreparedStatement
-
writeElement
protected int writeElement(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the element to a JDBC PreparedStatement
-
writeIndex
protected int writeIndex(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the index to a JDBC PreparedStatement
-
writeElementToWhere
protected int writeElementToWhere(PreparedStatement st, Object elt, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the element to a JDBC PreparedStatement
-
writeIndexToWhere
protected int writeIndexToWhere(PreparedStatement st, Object index, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the index to a JDBC PreparedStatement
-
writeIdentifier
public int writeIdentifier(PreparedStatement st, Object id, int i, SharedSessionContractImplementor session) throws HibernateException, SQLException
Write the identifier to a JDBC PreparedStatement
-
isPrimitiveArray
public boolean isPrimitiveArray()
从接口复制的说明:CollectionMetadataIs the collection a primitive array?- 指定者:
isPrimitiveArray在接口中CollectionMetadata- 指定者:
isPrimitiveArray在接口中CollectionPersister
-
isArray
public boolean isArray()
从接口复制的说明:CollectionMetadataIs the collection an array?- 指定者:
isArray在接口中CollectionMetadata- 指定者:
isArray在接口中CollectionPersister
-
getKeyColumnAliases
public String[] getKeyColumnAliases(String suffix)
从接口复制的说明:CollectionPersisterGenerates the collection's key column aliases, based on the given suffix.- 指定者:
getKeyColumnAliases在接口中CollectionPersister- 参数:
suffix- The suffix to use in the key column alias generation.- 返回:
- The key column aliases.
-
getElementColumnAliases
public String[] getElementColumnAliases(String suffix)
从接口复制的说明:CollectionPersisterGenerates the collection's element column aliases, based on the given suffix.- 指定者:
getElementColumnAliases在接口中CollectionPersister- 参数:
suffix- The suffix to use in the element column alias generation.- 返回:
- The key column aliases.
-
getIndexColumnAliases
public String[] getIndexColumnAliases(String suffix)
从接口复制的说明:CollectionPersisterGenerates the collection's index column aliases, based on the given suffix.- 指定者:
getIndexColumnAliases在接口中CollectionPersister- 参数:
suffix- The suffix to use in the index column alias generation.- 返回:
- The key column aliases, or null if not indexed.
-
getIdentifierColumnAlias
public String getIdentifierColumnAlias(String suffix)
从接口复制的说明:CollectionPersisterGenerates the collection's identifier column aliases, based on the given suffix.- 指定者:
getIdentifierColumnAlias在接口中CollectionPersister- 参数:
suffix- The suffix to use in the key column alias generation.- 返回:
- The key column aliases.
-
getIdentifierColumnName
public String getIdentifierColumnName()
- 指定者:
getIdentifierColumnName在接口中SQLLoadableCollection
-
selectFragment
public String selectFragment(String alias, String columnSuffix)
Generate a list of collection index, key and element columns- 指定者:
selectFragment在接口中QueryableCollection
-
generateSelectSizeString
protected String generateSelectSizeString(boolean isIntegerIndexed)
-
generateDetectRowByIndexString
protected String generateDetectRowByIndexString()
-
generateSelectRowByIndexString
protected String generateSelectRowByIndexString()
-
generateDetectRowByElementString
protected String generateDetectRowByElementString()
-
generateSelectFragment
protected SelectFragment generateSelectFragment(String alias, String columnSuffix)
-
appendElementColumns
protected void appendElementColumns(SelectFragment frag, String elemAlias)
-
appendIndexColumns
protected void appendIndexColumns(SelectFragment frag, String alias)
-
appendIdentifierColumns
protected void appendIdentifierColumns(SelectFragment frag, String alias)
-
getIndexColumnNames
public String[] getIndexColumnNames()
从接口复制的说明:QueryableCollectionGet the names of the collection index columns if this is an indexed collection (optional operation)- 指定者:
getIndexColumnNames在接口中QueryableCollection
-
getIndexFormulas
public String[] getIndexFormulas()
从接口复制的说明:QueryableCollectionGet the index formulas if this is an indexed collection (optional operation)- 指定者:
getIndexFormulas在接口中QueryableCollection
-
getIndexColumnNames
public 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在接口中QueryableCollection
-
getElementColumnNames
public 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在接口中QueryableCollection
-
getElementColumnNames
public 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在接口中QueryableCollection
-
getKeyColumnNames
public String[] getKeyColumnNames()
从接口复制的说明:JoinableThe columns to join on- 指定者:
getKeyColumnNames在接口中Joinable
-
hasIndex
public boolean hasIndex()
从接口复制的说明:CollectionMetadataIs this collection indexed?- 指定者:
hasIndex在接口中CollectionMetadata- 指定者:
hasIndex在接口中CollectionPersister
-
isLazy
public boolean isLazy()
从接口复制的说明:CollectionMetadataIs the collection lazily initialized?- 指定者:
isLazy在接口中CollectionMetadata- 指定者:
isLazy在接口中CollectionPersister
-
isInverse
public boolean isInverse()
从接口复制的说明:CollectionPersisterIs this collection "inverse", so state changes are not propagated to the database.- 指定者:
isInverse在接口中CollectionPersister
-
getTableName
public String getTableName()
从接口复制的说明:JoinableThe table to join to.- 指定者:
getTableName在接口中Joinable
-
remove
public void remove(Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterCompletely remove the persistent state of the collection- 指定者:
remove在接口中CollectionPersister- 抛出:
HibernateException
-
recreate
public void recreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersister(Re)create the collection's persistent state- 指定者:
recreate在接口中CollectionPersister- 抛出:
HibernateException
-
isRowDeleteEnabled
protected boolean isRowDeleteEnabled()
-
deleteRows
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在接口中CollectionPersister- 抛出:
HibernateException
-
isRowInsertEnabled
protected boolean isRowInsertEnabled()
-
insertRows
public void insertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterInsert the persistent state of any new collection elements- 指定者:
insertRows在接口中CollectionPersister- 抛出:
HibernateException
-
getRole
public String getRole()
从接口复制的说明:CollectionMetadataThe name of this collection role- 指定者:
getRole在接口中CollectionMetadata- 指定者:
getRole在接口中CollectionPersister
-
getOwnerEntityName
public String getOwnerEntityName()
-
getOwnerEntityPersister
public EntityPersister getOwnerEntityPersister()
从接口复制的说明:CollectionPersisterGet the persister of the entity that "owns" this collection- 指定者:
getOwnerEntityPersister在接口中CollectionPersister
-
getIdentifierGenerator
public IdentifierGenerator getIdentifierGenerator()
从接口复制的说明:CollectionPersisterGet the surrogate key generation strategy (optional operation)- 指定者:
getIdentifierGenerator在接口中CollectionPersister
-
getIdentifierType
public Type getIdentifierType()
从接口复制的说明:CollectionPersisterGet the type of the surrogate key- 指定者:
getIdentifierType在接口中CollectionPersister
-
hasOrphanDelete
public boolean hasOrphanDelete()
从接口复制的说明:CollectionPersisterDoes this collection implement "orphan delete"?- 指定者:
hasOrphanDelete在接口中CollectionPersister
-
toType
public Type toType(String propertyName) throws QueryException
从接口复制的说明:PropertyMappingGiven a component path expression, get the type of the property- 指定者:
toType在接口中PropertyMapping- 抛出:
QueryException
-
isManyToMany
public abstract boolean isManyToMany()
从接口复制的说明:CollectionPersisterIs this a many-to-many association? Note that this is mainly a convenience feature as the single persister does not contain all the information needed to handle a many-to-many itself, as internally it is looked at as two many-to-ones.- 指定者:
isManyToMany在接口中CollectionPersister
-
getManyToManyFilterFragment
public String getManyToManyFilterFragment(String alias, Map enabledFilters)
-
toColumns
public String[] toColumns(String alias, String propertyName) throws QueryException
从接口复制的说明:PropertyMappingObtain aliased column/formula fragments for the specified property path.- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryException
-
toColumns
public String[] toColumns(String propertyName) throws QueryException
从接口复制的说明:PropertyMappingGiven a property path, return the corresponding column name(s).- 指定者:
toColumns在接口中PropertyMapping- 抛出:
QueryException
-
getType
public Type getType()
从接口复制的说明:PropertyMappingGet the type of the thing containing the properties- 指定者:
getType在接口中PropertyMapping
-
getName
public String getName()
从接口复制的说明:JoinableAn identifying name; a class name or collection role name.
-
getElementPersister
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 OuterJoinLoadable.- 指定者:
getElementPersister在接口中QueryableCollection
-
isCollection
public boolean isCollection()
从接口复制的说明:JoinableIs this instance actually a CollectionPersister?- 指定者:
isCollection在接口中Joinable
-
getCollectionSpaces
public Serializable[] getCollectionSpaces()
从接口复制的说明:CollectionPersisterGet the "space" that holds the persistent state- 指定者:
getCollectionSpaces在接口中CollectionPersister
-
generateDeleteString
protected abstract String generateDeleteString()
-
generateDeleteRowString
protected abstract String generateDeleteRowString()
-
generateUpdateRowString
protected abstract String generateUpdateRowString()
-
generateInsertRowString
protected abstract String generateInsertRowString()
-
updateRows
public void updateRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterUpdate the persistent state of any elements that were modified- 指定者:
updateRows在接口中CollectionPersister- 抛出:
HibernateException
-
doUpdateRows
protected abstract int doUpdateRows(Serializable key, PersistentCollection collection, SharedSessionContractImplementor session) throws HibernateException
-
processQueuedOps
public void processQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterProcess queued operations within the PersistentCollection.- 指定者:
processQueuedOps在接口中CollectionPersister- 抛出:
HibernateException
-
doProcessQueuedOps
@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 session- 抛出:
HibernateException
-
doProcessQueuedOps
protected abstract void doProcessQueuedOps(PersistentCollection collection, Serializable key, SharedSessionContractImplementor session) throws HibernateException
-
getCollectionMetadata
public CollectionMetadata getCollectionMetadata()
- 指定者:
getCollectionMetadata在接口中CollectionPersister
-
getFactory
public SessionFactoryImplementor getFactory()
- 指定者:
getFactory在接口中CollectionPersister
-
filterFragment
protected String filterFragment(String alias) throws MappingException
- 抛出:
MappingException
-
filterFragment
protected String filterFragment(String alias, Set<String> treatAsDeclarations) throws MappingException
- 抛出:
MappingException
-
filterFragment
public String filterFragment(String alias, Map enabledFilters) throws MappingException
从接口复制的说明:JoinableGet the where clause filter, given a query alias and considering enabled session filters- 指定者:
filterFragment在接口中Joinable- 抛出:
MappingException
-
filterFragment
public String filterFragment(String alias, Map enabledFilters, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the where clause filter, given a query alias and considering enabled session filters- 指定者:
filterFragment在接口中Joinable
-
oneToManyFilterFragment
public String oneToManyFilterFragment(String alias) throws MappingException
- 指定者:
oneToManyFilterFragment在接口中Joinable- 抛出:
MappingException
-
oneToManyFilterFragment
public String oneToManyFilterFragment(String alias, Set<String> treatAsDeclarations)
- 指定者:
oneToManyFilterFragment在接口中Joinable
-
isInsertCallable
protected boolean isInsertCallable()
-
getInsertCheckStyle
protected ExecuteUpdateResultCheckStyle getInsertCheckStyle()
-
isUpdateCallable
protected boolean isUpdateCallable()
-
getUpdateCheckStyle
protected ExecuteUpdateResultCheckStyle getUpdateCheckStyle()
-
isDeleteCallable
protected boolean isDeleteCallable()
-
getDeleteCheckStyle
protected ExecuteUpdateResultCheckStyle getDeleteCheckStyle()
-
isDeleteAllCallable
protected boolean isDeleteAllCallable()
-
getDeleteAllCheckStyle
protected ExecuteUpdateResultCheckStyle getDeleteAllCheckStyle()
-
isVersioned
public boolean isVersioned()
从接口复制的说明:CollectionPersisterDoes this collection cause version increment of the owning entity?- 指定者:
isVersioned在接口中CollectionPersister
-
getSQLExceptionConverter
protected SQLExceptionConverter getSQLExceptionConverter()
-
getSQLExceptionHelper
protected SqlExceptionHelper getSQLExceptionHelper()
-
getCacheEntryStructure
public CacheEntryStructure getCacheEntryStructure()
从接口复制的说明:CollectionPersisterGet the cache structure- 指定者:
getCacheEntryStructure在接口中CollectionPersister
-
isAffectedByEnabledFilters
public boolean isAffectedByEnabledFilters(SharedSessionContractImplementor session)
-
isSubselectLoadable
public boolean isSubselectLoadable()
-
isMutable
public boolean isMutable()
从接口复制的说明:CollectionPersisterCan the elements of this collection change?- 指定者:
isMutable在接口中CollectionPersister
-
getCollectionPropertyColumnAliases
public String[] getCollectionPropertyColumnAliases(String propertyName, String suffix)
-
initCollectionPropertyMap
public void initCollectionPropertyMap()
-
getSize
public int getSize(Serializable key, SharedSessionContractImplementor session)
- 指定者:
getSize在接口中CollectionPersister
-
indexExists
public boolean indexExists(Serializable key, Object index, SharedSessionContractImplementor session)
- 指定者:
indexExists在接口中CollectionPersister
-
elementExists
public boolean elementExists(Serializable key, Object element, SharedSessionContractImplementor session)
- 指定者:
elementExists在接口中CollectionPersister
-
getElementByIndex
public Object getElementByIndex(Serializable key, Object index, SharedSessionContractImplementor session, Object owner)
- 指定者:
getElementByIndex在接口中CollectionPersister
-
isExtraLazy
public boolean isExtraLazy()
- 指定者:
isExtraLazy在接口中CollectionPersister
-
getDialect
protected Dialect getDialect()
-
getInitializer
public CollectionInitializer getInitializer()
Intended for internal use only. In fact really only currently used from test suite for assertion purposes.- 返回:
- The default collection initializer for this persister/collection.
-
getBatchSize
public int getBatchSize()
- 指定者:
getBatchSize在接口中CollectionPersister
-
getMappedByProperty
public String getMappedByProperty()
- 指定者:
getMappedByProperty在接口中CollectionPersister- 返回:
- the name of the property this collection is mapped by
-
getFilterAliasGenerator
public abstract FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
-
getCollectionPersister
public CollectionPersister getCollectionPersister()
- 指定者:
getCollectionPersister在接口中CollectionDefinition
-
getIndexDefinition
public CollectionIndexDefinition getIndexDefinition()
- 指定者:
getIndexDefinition在接口中CollectionDefinition
-
getElementDefinition
public CollectionElementDefinition getElementDefinition()
- 指定者:
getElementDefinition在接口中CollectionDefinition
-
createInsert
protected Insert createInsert()
-
createUpdate
protected Update createUpdate()
-
createDelete
protected Delete createDelete()
-
-