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 boolean
consumesCollectionAlias()
Very, very, very ugly...String[]
getCollectionSpaces()
Get the "space" that holds the persistent stateCollectionType
getCollectionType()
Get the associatedType
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 aliasEntityPersister
getElementPersister()
Get the persister of the element class, if this is a collection of entities (optional operation).Type
getElementType()
Get the "element" typeSessionFactoryImplementor
getFactory()
FetchMode
getFetchMode()
Should we load this collection role by outerjoining?Type
getIdentifierType()
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)Type
getIndexType()
Get the "index" type for a list or map (optional operation)String[]
getKeyColumnNames()
The columns to join onType
getKeyType()
Get the "key" type (the type of the foreign key)String
getMappedByProperty()
String
getName()
An identifying name; a class name or collection role name.EntityPersister
getOwnerEntityPersister()
Get the persister of the entity that "owns" this collectionString
getRole()
Get the name of this collection role (the fully qualified class name, extended by a "property path")String
getTableName()
The table to join to.boolean
hasIndex()
Is this an "indexed" collection? (list or map)boolean
isCollection()
Is this instance actually a CollectionPersister?boolean
isOneToMany()
Is this a one-to-many association?String[]
toColumns(String propertyName)
Given a property path, return the corresponding column name(s).Type
toType(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:CollectionPersister
Get the name of this collection role (the fully qualified class name, extended by a "property path")- Specified by:
getRole
in interfaceCollectionPersister
-
getName
public String getName()
Description copied from interface:Joinable
An identifying name; a class name or collection role name.
-
getCollectionType
public CollectionType getCollectionType()
Description copied from interface:CollectionPersister
Get the associatedType
- Specified by:
getCollectionType
in interfaceCollectionPersister
-
getOwnerEntityPersister
public EntityPersister getOwnerEntityPersister()
Description copied from interface:CollectionPersister
Get the persister of the entity that "owns" this collection- Specified by:
getOwnerEntityPersister
in interfaceCollectionPersister
-
toType
public Type toType(String propertyName) throws QueryException
Description copied from interface:PropertyMapping
Given a component path expression, get the type of the property- Specified by:
toType
in interfacePropertyMapping
- Throws:
QueryException
-
getKeyType
public Type getKeyType()
Description copied from interface:CollectionPersister
Get the "key" type (the type of the foreign key)- Specified by:
getKeyType
in interfaceCollectionPersister
-
getIndexType
public Type getIndexType()
Description copied from interface:CollectionPersister
Get the "index" type for a list or map (optional operation)- Specified by:
getIndexType
in interfaceCollectionPersister
-
getElementType
public Type getElementType()
Description copied from interface:CollectionPersister
Get the "element" type- Specified by:
getElementType
in interfaceCollectionPersister
-
getIdentifierType
public Type getIdentifierType()
Description copied from interface:CollectionPersister
Get the type of the surrogate key- Specified by:
getIdentifierType
in interfaceCollectionPersister
-
hasIndex
public boolean hasIndex()
Description copied from interface:CollectionPersister
Is this an "indexed" collection? (list or map)- Specified by:
hasIndex
in interfaceCollectionPersister
-
getElementPersister
public EntityPersister getElementPersister()
Description copied from interface:QueryableCollection
Get 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:
getElementPersister
in interfaceQueryableCollection
-
getFactory
public SessionFactoryImplementor getFactory()
- Specified by:
getFactory
in interfaceCollectionPersister
-
isOneToMany
public boolean isOneToMany()
Description copied from interface:CollectionPersister
Is this a one-to-many association?- Specified by:
isOneToMany
in interfaceCollectionPersister
-
getCollectionSpaces
public String[] getCollectionSpaces()
Description copied from interface:CollectionPersister
Get the "space" that holds the persistent state- Specified by:
getCollectionSpaces
in interfaceCollectionPersister
-
getMappedByProperty
public String getMappedByProperty()
- Specified by:
getMappedByProperty
in interfaceCollectionPersister
- Returns:
- the name of the property this collection is mapped by
-
getIndexColumnNames
public String[] getIndexColumnNames()
Description copied from interface:QueryableCollection
Get the names of the collection index columns if this is an indexed collection (optional operation)- Specified by:
getIndexColumnNames
in interfaceQueryableCollection
-
getIndexColumnNames
public String[] getIndexColumnNames(String alias)
Description copied from interface:QueryableCollection
Get the names of the collection index columns if this is an indexed collection (optional operation), aliased by the given table alias- Specified by:
getIndexColumnNames
in interfaceQueryableCollection
-
getIndexFormulas
public String[] getIndexFormulas()
Description copied from interface:QueryableCollection
Get the index formulas if this is an indexed collection (optional operation)- Specified by:
getIndexFormulas
in interfaceQueryableCollection
-
getElementColumnNames
public String[] getElementColumnNames(String alias)
Description copied from interface:QueryableCollection
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- Specified by:
getElementColumnNames
in interfaceQueryableCollection
-
getElementColumnNames
public String[] getElementColumnNames()
Description copied from interface:QueryableCollection
Get the names of the collection element columns (or the primary key columns in the case of a one-to-many association)- Specified by:
getElementColumnNames
in interfaceQueryableCollection
-
getFetchMode
public FetchMode getFetchMode()
Description copied from interface:QueryableCollection
Should we load this collection role by outerjoining?- Specified by:
getFetchMode
in interfaceQueryableCollection
-
getTableName
public String getTableName()
Description copied from interface:Joinable
The table to join to.- Specified by:
getTableName
in interfaceJoinable
-
getKeyColumnNames
public String[] getKeyColumnNames()
Description copied from interface:Joinable
The columns to join on- Specified by:
getKeyColumnNames
in interfaceJoinable
-
isCollection
public boolean isCollection()
Description copied from interface:Joinable
Is this instance actually a CollectionPersister?- Specified by:
isCollection
in interfaceJoinable
-
consumesCollectionAlias
public boolean consumesCollectionAlias()
Description copied from interface:Joinable
Very, very, very ugly...- Specified by:
consumesCollectionAlias
in interfaceJoinable
- Returns:
- Does this persister "consume" collection column aliases in the result set?
-
toColumns
public String[] toColumns(String propertyName)
Description copied from interface:PropertyMapping
Given a property path, return the corresponding column name(s).- Specified by:
toColumns
in interfacePropertyMapping
-
-