Top Description Fields Constructors Methods
org.hibernate.persister.collection

public Class BasicCollectionPersister

extends AbstractCollectionPersister
Class Inheritance
Imports
java.io.Serializable, java.sql.PreparedStatement, .SQLException, java.util.ArrayList, .Iterator, .List, .Set, org.hibernate.HibernateException, .MappingException, org.hibernate.cache.CacheException, org.hibernate.cache.spi.access.CollectionDataAccess, org.hibernate.collection.spi.PersistentCollection, org.hibernate.engine.jdbc.batch.internal.BasicBatchKey, org.hibernate.engine.spi.LoadQueryInfluencers, .SharedSessionContractImplementor, .SubselectFetch, org.hibernate.internal.FilterAliasGenerator, .StaticFilterAliasGenerator, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.jdbc.Expectation, .Expectations, org.hibernate.loader.collection.BatchingCollectionInitializerBuilder, .CollectionInitializer, .SubselectCollectionLoader, org.hibernate.mapping.Collection, org.hibernate.persister.entity.Joinable, org.hibernate.persister.spi.PersisterCreationContext, org.hibernate.pretty.MessageHelper, org.hibernate.sql.Delete, .Insert, .SelectFragment, .Update, org.hibernate.type.AssociationType

Collection persister for collections of values and many-to-many associations.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private BasicBatchKey
Inherited from org.hibernate.persister.collection.AbstractCollectionPersister:
batchSizeelementColumnAliaseselementColumnIsGettableelementColumnIsInPrimaryKeyelementColumnIsSettableelementColumnNameselementColumnReaderselementColumnReaderTemplateselementColumnWriterselementFormulaselementFormulaTemplateselementIsPureFormulaelementTypehasIdentifierhasIndexhasWhereidentifierColumnNameindexColumnAliasesindexColumnIsGettableindexColumnIsSettableindexColumnNamesindexContainsFormulaindexFormulasindexFormulaTemplatesisInversekeyColumnAliaseskeyColumnNamesqualifiedTableNamerecreateBatchKeysqlExceptionHelpersqlWhereString

Constructor Summary

AccessConstructor and Description
public
BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext)

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
protected CollectionInitializer
protected CollectionInitializer
protected void
private int
doUpdateRow(Serializable id, PersistentCollection collection, SharedSessionContractImplementor session, Expectation expectation, boolean callable, boolean useBatch, List<E> elements, String sql, int count, int i)

protected int
public String
fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)

Implements org.hibernate.persister.entity.Joinable.fromJoinFragment.

Get the from clause part of any joins (optional operation)
public String
fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)

Implements org.hibernate.persister.entity.Joinable.fromJoinFragment.

Get the from clause part of any joins (optional operation)
protected String
generateDeleteRowString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateDeleteRowString.

Generate the SQL DELETE that deletes a particular row
protected String
generateDeleteString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateDeleteString.

Generate the SQL DELETE that deletes all rows
protected String
protected String
public FilterAliasGenerator
public boolean
isCascadeDeleteEnabled()

Implements org.hibernate.persister.collection.CollectionPersister.isCascadeDeleteEnabled.

Is cascade delete handled by the database-level foreign key constraint definition?
public boolean
public boolean
private String
manyToManySelectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String collectionSuffix)

public String
selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)

Implements org.hibernate.persister.entity.Joinable.selectFragment.

All columns to select, when loading.
public String
whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)

Implements org.hibernate.persister.entity.Joinable.whereJoinFragment.

Get the where clause part of any joins (optional operation)
public String
whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)

Implements org.hibernate.persister.entity.Joinable.whereJoinFragment.

Get the where clause part of any joins (optional operation)
Inherited from org.hibernate.persister.collection.AbstractCollectionPersister:
appendElementColumnsappendIdentifierColumnsappendIndexColumnscreateDeletecreateInsertcreateUpdatedecrementIndexByBasedeleteRowsdetermineTableNamedoProcessQueuedOpselementExistsfilterFragmentfilterFragmentfilterFragmentfilterFragmentgenerateDetectRowByElementStringgenerateDetectRowByIndexStringgenerateSelectFragmentgenerateSelectRowByIndexStringgenerateSelectSizeStringgetAppropriateInitializergetBatchSizegetCacheAccessStrategygetCacheEntryStructuregetCollectionMetadatagetCollectionPersistergetCollectionPropertyColumnAliasesgetCollectionSpacesgetCollectionTypegetDeleteAllCheckStylegetDeleteCheckStylegetDialectgetElementByIndexgetElementClassgetElementColumnAliasesgetElementColumnNamesgetElementColumnNamesgetElementDefinitiongetElementPersistergetElementTypegetFactorygetFetchModegetIdentifierColumnAliasgetIdentifierColumnNamegetIdentifierGeneratorgetIdentifierTypegetIndexColumnAliasesgetIndexColumnNamesgetIndexColumnNamesgetIndexDefinitiongetIndexFormulasgetIndexTypegetInitializergetInsertCheckStylegetKeyColumnAliasesgetKeyColumnNamesgetKeyTypegetManyToManyFilterFragmentgetManyToManyOrderByStringgetMappedByPropertygetNamegetNavigableRolegetOwnerEntityNamegetOwnerEntityPersistergetRolegetSizegetSQLDeleteRowStringgetSQLDeleteStringgetSQLExceptionConvertergetSQLExceptionHelpergetSQLInsertRowStringgetSQLOrderByStringgetSQLUpdateRowStringgetSQLWhereStringgetTableNamegetTypegetUpdateCheckStylehasCachehasIndexhasManyToManyOrderinghasOrderinghasOrphanDeletehasWhereincrementIndexByBaseindexExistsinitCollectionPropertyMapinitializeinsertRowsisAffectedByEnabledFiltersisArrayisCollectionisDeleteAllCallableisDeleteCallableisExtraLazyisInsertCallableisInverseisLazyisMutableisPrimitiveArrayisRowDeleteEnabledisRowInsertEnabledisSubselectLoadableisUpdateCallableisVersionedlogStaticSQLoneToManyFilterFragmentoneToManyFilterFragmentpostInstantiateprocessQueuedOpsreadElementreadIdentifierreadIndexreadKeyrecreateremoveselectFragmenttoColumnstoColumnstoStringtoTypeupdateRowswriteElementwriteElementToWherewriteIdentifierwriteIndexwriteIndexToWherewriteKey

Field Detail

updateBatchKeyback to summary
private BasicBatchKey updateBatchKey

Constructor Detail

BasicCollectionPersisterback to summary
public BasicCollectionPersister(Collection collectionBinding, CollectionDataAccess cacheAccessStrategy, PersisterCreationContext creationContext) throws MappingException, CacheException

Method Detail

consumesCollectionAliasback to summary
public boolean consumesCollectionAlias()

Implements org.hibernate.persister.entity.Joinable.consumesCollectionAlias.

Doc from org.hibernate.persister.entity.Joinable.consumesCollectionAlias.

Very, very, very ugly...

Returns:boolean

Does this persister "consume" collection column aliases in the result set?

consumesEntityAliasback to summary
public boolean consumesEntityAlias()

Implements org.hibernate.persister.entity.Joinable.consumesEntityAlias.

Doc from org.hibernate.persister.entity.Joinable.consumesEntityAlias.

Very, very, very ugly...

Returns:boolean

Does this persister "consume" entity column aliases in the result set?

createCollectionInitializerback to summary
protected CollectionInitializer createCollectionInitializer(LoadQueryInfluencers loadQueryInfluencers) throws MappingException

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.createCollectionInitializer.

Create the CollectionLoader

Annotations
@Override
See Also
org.hibernate.loader.collection.BasicCollectionLoader
createSubselectInitializerback to summary
protected CollectionInitializer createSubselectInitializer(SubselectFetch subselect, SharedSessionContractImplementor session)

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.createSubselectInitializer.

Annotations
@Override
doProcessQueuedOpsback to summary
protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, SharedSessionContractImplementor session)

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.doProcessQueuedOps.

Annotations
@Override
doUpdateRowback to summary
private int doUpdateRow(Serializable id, PersistentCollection collection, SharedSessionContractImplementor session, Expectation expectation, boolean callable, boolean useBatch, List<E> elements, String sql, int count, int i) throws SQLException
doUpdateRowsback to summary
protected int doUpdateRows(Serializable id, PersistentCollection collection, SharedSessionContractImplementor session) throws HibernateException

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.doUpdateRows.

Annotations
@Override
fromJoinFragmentback to summary
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)

Implements org.hibernate.persister.entity.Joinable.fromJoinFragment.

Doc from org.hibernate.persister.entity.Joinable.fromJoinFragment.

Get the from clause part of any joins (optional operation)

Annotations
@Override
fromJoinFragmentback to summary
public String fromJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)

Implements org.hibernate.persister.entity.Joinable.fromJoinFragment.

Doc from org.hibernate.persister.entity.Joinable.fromJoinFragment.

Get the from clause part of any joins (optional operation)

Annotations
@Override
generateDeleteRowStringback to summary
protected String generateDeleteRowString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateDeleteRowString.

Generate the SQL DELETE that deletes a particular row

Annotations
@Override
generateDeleteStringback to summary
protected String generateDeleteString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateDeleteString.

Generate the SQL DELETE that deletes all rows

Annotations
@Override
generateInsertRowStringback to summary
protected String generateInsertRowString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateInsertRowString.

Generate the SQL INSERT that creates a new row

Annotations
@Override
generateUpdateRowStringback to summary
protected String generateUpdateRowString()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.generateUpdateRowString.

Generate the SQL UPDATE that updates a row

Annotations
@Override
getFilterAliasGeneratorback to summary
public FilterAliasGenerator getFilterAliasGenerator(String rootAlias)

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.getFilterAliasGenerator.

Annotations
@Override
isCascadeDeleteEnabledback to summary
public boolean isCascadeDeleteEnabled()

Implements org.hibernate.persister.collection.CollectionPersister.isCascadeDeleteEnabled.

Doc from org.hibernate.persister.collection.CollectionPersister.isCascadeDeleteEnabled.

Is cascade delete handled by the database-level foreign key constraint definition?

isManyToManyback to summary
public boolean isManyToMany()

Implements abstract org.hibernate.persister.collection.AbstractCollectionPersister.isManyToMany.

Implements org.hibernate.persister.collection.CollectionPersister.isManyToMany.

Doc from org.hibernate.persister.collection.CollectionPersister.isManyToMany.

Is 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.

Annotations
@Override
isOneToManyback to summary
public boolean isOneToMany()

Implements org.hibernate.persister.collection.CollectionPersister.isOneToMany.

Doc from org.hibernate.persister.collection.CollectionPersister.isOneToMany.

Is this a one-to-many association?

manyToManySelectFragmentback to summary
private String manyToManySelectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String collectionSuffix)
selectFragmentback to summary
public String selectFragment(Joinable rhs, String rhsAlias, String lhsAlias, String entitySuffix, String collectionSuffix, boolean includeCollectionColumns)

Implements org.hibernate.persister.entity.Joinable.selectFragment.

Doc from org.hibernate.persister.entity.Joinable.selectFragment.

All columns to select, when loading.

whereJoinFragmentback to summary
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses)

Implements org.hibernate.persister.entity.Joinable.whereJoinFragment.

Doc from org.hibernate.persister.entity.Joinable.whereJoinFragment.

Get the where clause part of any joins (optional operation)

Annotations
@Override
whereJoinFragmentback to summary
public String whereJoinFragment(String alias, boolean innerJoin, boolean includeSubclasses, Set<String> treatAsDeclarations)

Implements org.hibernate.persister.entity.Joinable.whereJoinFragment.

Doc from org.hibernate.persister.entity.Joinable.whereJoinFragment.

Get the where clause part of any joins (optional operation)

Annotations
@Override