Class MockCollectionPersister
- java.lang.Object
-
- org.hibernate.processor.validation.MockCollectionPersister
-
- All Implemented Interfaces:
FilterRestrictable,Restrictable,WhereRestrictable,CollectionPersister,QueryableCollection,Joinable,PropertyMapping
- Direct Known Subclasses:
ProcessorSessionFactory.ElementCollectionPersister,ProcessorSessionFactory.ToManyAssociationPersister
public abstract class MockCollectionPersister extends Object implements QueryableCollection
-
-
Constructor Summary
Constructors Constructor Description MockCollectionPersister(String role, CollectionType collectionType, Type elementType, MockSessionFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconsumesCollectionAlias()Very, very, very ugly...String[]getCollectionSpaces()Get the "space" that holds the persistent stateCollectionTypegetCollectionType()Get the associatedTypeString[]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 aliasEntityPersistergetElementPersister()Get the persister of the element class, if this is a collection of entities (optional operation).TypegetElementType()Get the "element" typeSessionFactoryImplementorgetFactory()FetchModegetFetchMode()Should we load this collection role by outerjoining?TypegetIdentifierType()Get the type of the surrogate keyString[]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 aliasString[]getIndexFormulas()Get the index formulas if this is an indexed collection (optional operation)TypegetIndexType()Get the "index" type for a list or map (optional operation)String[]getKeyColumnNames()The columns to join onTypegetKeyType()Get the "key" type (the type of the foreign key)StringgetMappedByProperty()StringgetName()An identifying name; a class name or collection role name.EntityPersistergetOwnerEntityPersister()Get the persister of the entity that "owns" this collectionStringgetRole()Get the name of this collection role (the fully qualified class name, extended by a "property path")StringgetTableName()The table to join to.booleanhasIndex()Is this an "indexed" collection? (list or map)booleanisCollection()Is this instance actually a CollectionPersister?booleanisOneToMany()Is this a one-to-many association?String[]toColumns(String propertyName)Given a property path, return the corresponding column name(s).TypetoType(String propertyName)Given a component path expression, get the type of the property-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.persister.collection.CollectionPersister
applyBaseManyToManyRestrictions, deleteRows, elementExists, getAttributeMapping, getBatchSize, getCacheAccessStrategy, getCacheEntryStructure, getCollectionMetadata, getCollectionSemantics, getElementByIndex, getElementClass, getElementColumnAliases, getGenerator, getIdentifierColumnAlias, getIdentifierGenerator, getIndexColumnAliases, getKeyColumnAliases, getManyToManyFilterFragment, getNavigableRole, getSize, getSortingComparator, hasCache, hasManyToManyOrdering, hasOrdering, hasOrphanDelete, indexExists, initialize, insertRows, isAffectedByEnabledFetchProfiles, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEnabledFilters, isAffectedByEntityGraph, isArray, isBatchLoadable, isCascadeDeleteEnabled, isExtraLazy, isInverse, isLazy, isManyToMany, isMutable, isPrimitiveArray, isSubselectLoadable, isVersioned, needsRemove, postInstantiate, processQueuedOps, recreate, remove, updateRows, useShallowQueryCacheLayout
-
Methods inherited from interface org.hibernate.metamodel.mapping.FilterRestrictable
applyFilterRestrictions, applyFilterRestrictions
-
Methods inherited from interface org.hibernate.persister.entity.Joinable
consumesEntityAlias
-
Methods inherited from interface org.hibernate.persister.collection.QueryableCollection
getManyToManyOrderByString, getSQLOrderByString, hasWhere, selectFragment
-
Methods inherited from interface org.hibernate.metamodel.mapping.Restrictable
applyBaseRestrictions, applyBaseRestrictions
-
Methods inherited from interface org.hibernate.metamodel.mapping.WhereRestrictable
applyWhereRestrictions, hasWhereRestrictions
-
-
-
-
Constructor Detail
-
MockCollectionPersister
public MockCollectionPersister(String role, CollectionType collectionType, Type elementType, MockSessionFactory factory)
-
-
Method Detail
-
getRole
public String getRole()
Description copied from interface:CollectionPersisterGet the name of this collection role (the fully qualified class name, extended by a "property path")- Specified by:
getRolein interfaceCollectionPersister
-
getName
public String getName()
Description copied from interface:JoinableAn identifying name; a class name or collection role name.
-
getCollectionType
public CollectionType getCollectionType()
Description copied from interface:CollectionPersisterGet the associatedType- Specified by:
getCollectionTypein interfaceCollectionPersister
-
getOwnerEntityPersister
public EntityPersister getOwnerEntityPersister()
Description copied from interface:CollectionPersisterGet the persister of the entity that "owns" this collection- Specified by:
getOwnerEntityPersisterin interfaceCollectionPersister
-
toType
public Type toType(String propertyName) throws QueryException
Description copied from interface:PropertyMappingGiven a component path expression, get the type of the property- Specified by:
toTypein interfacePropertyMapping- Throws:
QueryException
-
getKeyType
public Type getKeyType()
Description copied from interface:CollectionPersisterGet the "key" type (the type of the foreign key)- Specified by:
getKeyTypein interfaceCollectionPersister
-
getIndexType
public Type getIndexType()
Description copied from interface:CollectionPersisterGet the "index" type for a list or map (optional operation)- Specified by:
getIndexTypein interfaceCollectionPersister
-
getElementType
public Type getElementType()
Description copied from interface:CollectionPersisterGet the "element" type- Specified by:
getElementTypein interfaceCollectionPersister
-
getIdentifierType
public Type getIdentifierType()
Description copied from interface:CollectionPersisterGet the type of the surrogate key- Specified by:
getIdentifierTypein interfaceCollectionPersister
-
hasIndex
public boolean hasIndex()
Description copied from interface:CollectionPersisterIs this an "indexed" collection? (list or map)- Specified by:
hasIndexin interfaceCollectionPersister
-
getElementPersister
public EntityPersister getElementPersister()
Description copied from interface: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 beOuterJoinLoadable.- Specified by:
getElementPersisterin interfaceQueryableCollection
-
getFactory
public SessionFactoryImplementor getFactory()
- Specified by:
getFactoryin interfaceCollectionPersister
-
isOneToMany
public boolean isOneToMany()
Description copied from interface:CollectionPersisterIs this a one-to-many association?- Specified by:
isOneToManyin interfaceCollectionPersister
-
getCollectionSpaces
public String[] getCollectionSpaces()
Description copied from interface:CollectionPersisterGet the "space" that holds the persistent state- Specified by:
getCollectionSpacesin interfaceCollectionPersister
-
getMappedByProperty
public String getMappedByProperty()
- Specified by:
getMappedByPropertyin interfaceCollectionPersister- Returns:
- the name of the property this collection is mapped by
-
getIndexColumnNames
public String[] getIndexColumnNames()
Description copied from interface:QueryableCollectionGet the names of the collection index columns if this is an indexed collection (optional operation)- Specified by:
getIndexColumnNamesin interfaceQueryableCollection
-
getIndexColumnNames
public String[] getIndexColumnNames(String alias)
Description copied from interface:QueryableCollectionGet the names of the collection index columns if this is an indexed collection (optional operation), aliased by the given table alias- Specified by:
getIndexColumnNamesin interfaceQueryableCollection
-
getIndexFormulas
public String[] getIndexFormulas()
Description copied from interface:QueryableCollectionGet the index formulas if this is an indexed collection (optional operation)- Specified by:
getIndexFormulasin interfaceQueryableCollection
-
getElementColumnNames
public String[] getElementColumnNames(String alias)
Description copied from interface: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- Specified by:
getElementColumnNamesin interfaceQueryableCollection
-
getElementColumnNames
public String[] getElementColumnNames()
Description copied from interface:QueryableCollectionGet the names of the collection element columns (or the primary key columns in the case of a one-to-many association)- Specified by:
getElementColumnNamesin interfaceQueryableCollection
-
getFetchMode
public FetchMode getFetchMode()
Description copied from interface:QueryableCollectionShould we load this collection role by outerjoining?- Specified by:
getFetchModein interfaceQueryableCollection
-
getTableName
public String getTableName()
Description copied from interface:JoinableThe table to join to.- Specified by:
getTableNamein interfaceJoinable
-
getKeyColumnNames
public String[] getKeyColumnNames()
Description copied from interface:JoinableThe columns to join on- Specified by:
getKeyColumnNamesin interfaceJoinable
-
isCollection
public boolean isCollection()
Description copied from interface:JoinableIs this instance actually a CollectionPersister?- Specified by:
isCollectionin interfaceJoinable
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
Description copied from interface:JoinableVery, very, very ugly...- Specified by:
consumesCollectionAliasin interfaceJoinable- Returns:
- Does this persister "consume" collection column aliases in the result set?
-
toColumns
public String[] toColumns(String propertyName)
Description copied from interface:PropertyMappingGiven a property path, return the corresponding column name(s).- Specified by:
toColumnsin interfacePropertyMapping
-
-