类 OneToManyPersister
- java.lang.Object
-
- org.hibernate.persister.collection.AbstractCollectionPersister
-
- org.hibernate.persister.collection.OneToManyPersister
-
- 所有已实现的接口:
CollectionMetadata,CollectionPersister,QueryableCollection,SQLLoadableCollection,Joinable,PropertyMapping,CollectionDefinition
public class OneToManyPersister extends AbstractCollectionPersister
Collection persister for one-to-many associations.- 作者:
- Gavin King, Brett Meyer
-
-
字段概要
-
从类继承的字段 org.hibernate.persister.collection.AbstractCollectionPersister
batchSize, elementColumnAliases, elementColumnIsGettable, 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
-
-
构造器概要
构造器 构造器 说明 OneToManyPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanconsumesCollectionAlias()Very, very, very ugly...booleanconsumesEntityAlias()Very, very, very ugly...protected CollectionInitializercreateCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers)Create the OneToManyLoaderprotected CollectionInitializercreateSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)protected voiddoProcessQueuedOps(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)protected intdoUpdateRows(Serializable id, PersistentCollection collection, SharedSessionContractImplementor session)StringfilterFragment(String alias)protected StringfilterFragment(String alias, Set<String> treatAsDeclarations)StringfromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)Get the from clause part of any joins (optional operation)StringfromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)Get the from clause part of any joins (optional operation)protected StringgenerateDeleteRowString()Generate the SQL UPDATE that updates a particular row's foreign key to nullprotected StringgenerateDeleteString()Generate the SQL UPDATE that updates all the foreign keys to nullprotected StringgenerateInsertRowString()Generate the SQL UPDATE that updates a foreign key to a valueprotected StringgenerateUpdateRowString()Generate the SQL UPDATE that inserts a collection indexObjectgetElementByIndex(Serializable key, Object index, SharedSessionContractImplementor session, Object owner)FilterAliasGeneratorgetFilterAliasGenerator(String rootAlias)StringgetTableName()The table to join to.voidinsertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)Insert the persistent state of any new collection elementsbooleanisCascadeDeleteEnabled()Is cascade delete handled by the database-level foreign key constraint definition?booleanisManyToMany()Is this a many-to-many association?booleanisOneToMany()Is this a one-to-many association?protected booleanisRowDeleteEnabled()protected booleanisRowInsertEnabled()voidrecreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)(Re)create the collection's persistent stateStringselectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)All columns to select, when loading.StringwhereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)Get the where clause part of any joins (optional operation)StringwhereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)Get the where clause part of any joins (optional operation)-
从类继承的方法 org.hibernate.persister.collection.AbstractCollectionPersister
appendElementColumns, appendIdentifierColumns, appendIndexColumns, createDelete, createInsert, createUpdate, 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, getNavigableRole, 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, writeKey
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.persister.entity.Joinable
fromJoinFragment
-
-
-
-
构造器详细资料
-
OneToManyPersister
public OneToManyPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException
-
-
方法详细资料
-
isRowDeleteEnabled
protected boolean isRowDeleteEnabled()
-
isRowInsertEnabled
protected boolean isRowInsertEnabled()
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
从接口复制的说明:CollectionPersisterIs cascade delete handled by the database-level foreign key constraint definition?
-
generateDeleteString
protected String generateDeleteString()
Generate the SQL UPDATE that updates all the foreign keys to null
-
generateInsertRowString
protected String generateInsertRowString()
Generate the SQL UPDATE that updates a foreign key to a value
-
generateUpdateRowString
protected String generateUpdateRowString()
Generate the SQL UPDATE that inserts a collection index
-
generateDeleteRowString
protected String generateDeleteRowString()
Generate the SQL UPDATE that updates a particular row's foreign key to null
-
recreate
public void recreate(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersister(Re)create the collection's persistent state- 指定者:
recreate在接口中CollectionPersister- 覆盖:
recreate在类中AbstractCollectionPersister- 抛出:
HibernateException
-
insertRows
public void insertRows(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
从接口复制的说明:CollectionPersisterInsert the persistent state of any new collection elements- 指定者:
insertRows在接口中CollectionPersister- 覆盖:
insertRows在类中AbstractCollectionPersister- 抛出:
HibernateException
-
doProcessQueuedOps
protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session) throws HibernateException
-
consumesEntityAlias
public boolean consumesEntityAlias()
从接口复制的说明:JoinableVery, very, very ugly...- 返回:
- Does this persister "consume" entity column aliases in the result set?
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
从接口复制的说明:JoinableVery, very, very ugly...- 返回:
- Does this persister "consume" collection column aliases in the result set?
-
isOneToMany
public boolean isOneToMany()
从接口复制的说明:CollectionPersisterIs this a one-to-many association?
-
isManyToMany
public 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- 指定者:
isManyToMany在类中AbstractCollectionPersister
-
doUpdateRows
protected int doUpdateRows(Serializable id, PersistentCollection collection, SharedSessionContractImplementor session)
- 指定者:
doUpdateRows在类中AbstractCollectionPersister
-
selectFragment
public String selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)
从接口复制的说明:JoinableAll columns to select, when loading.
-
createCollectionInitializer
protected CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) throws MappingException
Create the OneToManyLoader- 指定者:
createCollectionInitializer在类中AbstractCollectionPersister- 抛出:
MappingException- 另请参阅:
OneToManyLoader
-
fromJoinFragment
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
从接口复制的说明:JoinableGet the from clause part of any joins (optional operation)
-
fromJoinFragment
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the from clause part of any joins (optional operation)
-
whereJoinFragment
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)
从接口复制的说明:JoinableGet the where clause part of any joins (optional operation)
-
whereJoinFragment
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)
从接口复制的说明:JoinableGet the where clause part of any joins (optional operation)
-
getTableName
public String getTableName()
从接口复制的说明:JoinableThe table to join to.- 指定者:
getTableName在接口中Joinable- 覆盖:
getTableName在类中AbstractCollectionPersister
-
filterFragment
public String filterFragment(String alias) throws MappingException
-
filterFragment
protected String filterFragment(String alias, Set<String> treatAsDeclarations) throws MappingException
-
createSubselectInitializer
protected CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)
-
getElementByIndex
public Object getElementByIndex(Serializable key, Object index, SharedSessionContractImplementor session, Object owner)
- 指定者:
getElementByIndex在接口中CollectionPersister- 覆盖:
getElementByIndex在类中AbstractCollectionPersister
-
getFilterAliasGenerator
public FilterAliasGenerator getFilterAliasGenerator(String rootAlias)
-
-