类 Collection
- java.lang.Object
-
- org.hibernate.mapping.Collection
-
- 所有已实现的接口:
Serializable,Fetchable,Filterable,Value
- 直接已知子类:
Bag,IdentifierCollection,IndexedCollection,Set
public abstract class Collection extends Object implements Fetchable, Value, Filterable
Mapping for a collection. Subclasses specialize to particular collection styles.- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringDEFAULT_ELEMENT_COLUMN_NAMEstatic StringDEFAULT_KEY_COLUMN_NAME
-
构造器概要
构造器 限定符 构造器 说明 protectedCollection(MetadataBuildingContext buildingContext, PersistentClass owner)protectedCollection(MetadataImplementor metadata, PersistentClass owner)已过时。UseCollection(MetadataBuildingContext, PersistentClass)instead.
-
方法概要
-
-
-
构造器详细资料
-
Collection
protected Collection(MetadataBuildingContext buildingContext, PersistentClass owner)
-
Collection
@Deprecated protected Collection(MetadataImplementor metadata, PersistentClass owner)
已过时。UseCollection(MetadataBuildingContext, PersistentClass)instead.
-
-
方法详细资料
-
getMetadata
public MetadataImplementor getMetadata()
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- 指定者:
getServiceRegistry在接口中Value
-
isSet
public boolean isSet()
-
getKey
public KeyValue getKey()
-
getElement
public Value getElement()
-
isIndexed
public boolean isIndexed()
-
getCollectionTable
public Table getCollectionTable()
-
setCollectionTable
public void setCollectionTable(Table table)
-
isSorted
public boolean isSorted()
-
getComparator
public Comparator getComparator()
-
getRole
public String getRole()
-
getDefaultCollectionType
public abstract CollectionType getDefaultCollectionType() throws MappingException
- 抛出:
MappingException
-
isPrimitiveArray
public boolean isPrimitiveArray()
-
isArray
public boolean isArray()
-
hasFormula
public boolean hasFormula()
- 指定者:
hasFormula在接口中Value
-
isOneToMany
public boolean isOneToMany()
-
isInverse
public boolean isInverse()
-
getOwnerEntityName
public String getOwnerEntityName()
-
getOrderBy
public String getOrderBy()
-
setComparator
public void setComparator(Comparator comparator)
-
setElement
public void setElement(Value element)
-
setKey
public void setKey(KeyValue key)
-
setOrderBy
public void setOrderBy(String orderBy)
-
setRole
public void setRole(String role)
-
setSorted
public void setSorted(boolean sorted)
-
setInverse
public void setInverse(boolean inverse)
-
getOwner
public PersistentClass getOwner()
-
setOwner
@Deprecated public void setOwner(PersistentClass owner)
已过时。Inject the owner into constructor.- 参数:
owner- The owner
-
getWhere
public String getWhere()
-
setWhere
public void setWhere(String where)
-
getManyToManyWhere
public String getManyToManyWhere()
-
setManyToManyWhere
public void setManyToManyWhere(String manyToManyWhere)
-
getManyToManyOrdering
public String getManyToManyOrdering()
-
setManyToManyOrdering
public void setManyToManyOrdering(String orderFragment)
-
isIdentified
public boolean isIdentified()
-
hasOrphanDelete
public boolean hasOrphanDelete()
-
setOrphanDelete
public void setOrphanDelete(boolean orphanDelete)
-
getBatchSize
public int getBatchSize()
-
setBatchSize
public void setBatchSize(int i)
-
getFetchMode
public FetchMode getFetchMode()
- 指定者:
getFetchMode在接口中Fetchable- 指定者:
getFetchMode在接口中Value
-
setFetchMode
public void setFetchMode(FetchMode fetchMode)
- 指定者:
setFetchMode在接口中Fetchable
-
setCollectionPersisterClass
public void setCollectionPersisterClass(Class persister)
-
getCollectionPersisterClass
public Class getCollectionPersisterClass()
-
validate
public void validate(Mapping mapping) throws MappingException
- 抛出:
MappingException
-
getColumnIterator
public Iterator<Selectable> getColumnIterator()
- 指定者:
getColumnIterator在接口中Value
-
getColumnSpan
public int getColumnSpan()
- 指定者:
getColumnSpan在接口中Value
-
getType
public Type getType() throws MappingException
- 指定者:
getType在接口中Value- 抛出:
MappingException
-
getCollectionType
public CollectionType getCollectionType()
-
isNullable
public boolean isNullable()
- 指定者:
isNullable在接口中Value
-
isAlternateUniqueKey
public boolean isAlternateUniqueKey()
- 指定者:
isAlternateUniqueKey在接口中Value
-
createForeignKey
public void createForeignKey()
- 指定者:
createForeignKey在接口中Value
-
isSimpleValue
public boolean isSimpleValue()
- 指定者:
isSimpleValue在接口中Value
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- 指定者:
isValid在接口中Value- 抛出:
MappingException
-
isSame
public boolean isSame(Collection other)
-
createAllKeys
public void createAllKeys() throws MappingException- 抛出:
MappingException
-
getCacheConcurrencyStrategy
public String getCacheConcurrencyStrategy()
-
setCacheConcurrencyStrategy
public void setCacheConcurrencyStrategy(String cacheConcurrencyStrategy)
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName)
- 指定者:
setTypeUsingReflection在接口中Value
-
getCacheRegionName
public String getCacheRegionName()
-
setCacheRegionName
public void setCacheRegionName(String cacheRegionName)
-
setCustomSQLInsert
public void setCustomSQLInsert(String customSQLInsert, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
-
getCustomSQLInsert
public String getCustomSQLInsert()
-
isCustomInsertCallable
public boolean isCustomInsertCallable()
-
getCustomSQLInsertCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLInsertCheckStyle()
-
setCustomSQLUpdate
public void setCustomSQLUpdate(String customSQLUpdate, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
-
getCustomSQLUpdate
public String getCustomSQLUpdate()
-
isCustomUpdateCallable
public boolean isCustomUpdateCallable()
-
getCustomSQLUpdateCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLUpdateCheckStyle()
-
setCustomSQLDelete
public void setCustomSQLDelete(String customSQLDelete, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
-
getCustomSQLDelete
public String getCustomSQLDelete()
-
isCustomDeleteCallable
public boolean isCustomDeleteCallable()
-
getCustomSQLDeleteCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteCheckStyle()
-
setCustomSQLDeleteAll
public void setCustomSQLDeleteAll(String customSQLDeleteAll, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
-
getCustomSQLDeleteAll
public String getCustomSQLDeleteAll()
-
isCustomDeleteAllCallable
public boolean isCustomDeleteAllCallable()
-
getCustomSQLDeleteAllCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteAllCheckStyle()
-
addFilter
public void addFilter(String name, String condition, boolean autoAliasInjection, Map<String,String> aliasTableMap, Map<String,String> aliasEntityMap)
- 指定者:
addFilter在接口中Filterable
-
getFilters
public List getFilters()
- 指定者:
getFilters在接口中Filterable
-
addManyToManyFilter
public void addManyToManyFilter(String name, String condition, boolean autoAliasInjection, Map<String,String> aliasTableMap, Map<String,String> aliasEntityMap)
-
getManyToManyFilters
public List getManyToManyFilters()
-
getLoaderName
public String getLoaderName()
-
setLoaderName
public void setLoaderName(String name)
-
getReferencedPropertyName
public String getReferencedPropertyName()
-
setReferencedPropertyName
public void setReferencedPropertyName(String propertyRef)
-
isOptimisticLocked
public boolean isOptimisticLocked()
-
setOptimisticLocked
public void setOptimisticLocked(boolean optimisticLocked)
-
isMap
public boolean isMap()
-
getTypeName
public String getTypeName()
-
setTypeName
public void setTypeName(String typeName)
-
getTypeParameters
public Properties getTypeParameters()
-
setTypeParameters
public void setTypeParameters(Properties parameterMap)
-
setTypeParameters
public void setTypeParameters(Map parameterMap)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- 指定者:
getColumnInsertability在接口中Value
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- 指定者:
getColumnUpdateability在接口中Value
-
isSubselectLoadable
public boolean isSubselectLoadable()
-
setSubselectLoadable
public void setSubselectLoadable(boolean subqueryLoadable)
-
isMutable
public boolean isMutable()
-
setMutable
public void setMutable(boolean mutable)
-
isExtraLazy
public boolean isExtraLazy()
-
setExtraLazy
public void setExtraLazy(boolean extraLazy)
-
hasOrder
public boolean hasOrder()
-
setComparatorClassName
public void setComparatorClassName(String comparatorClassName)
-
getComparatorClassName
public String getComparatorClassName()
-
getMappedByProperty
public String getMappedByProperty()
-
setMappedByProperty
public void setMappedByProperty(String mappedByProperty)
-
-