org.hibernate.mapping
Class Collection
java.lang.Object
org.hibernate.mapping.Collection
- All Implemented Interfaces:
- java.io.Serializable, Fetchable, Filterable, Value
- Direct Known Subclasses:
- Bag, IdentifierCollection, IndexedCollection, Set
public abstract class Collection
- extends java.lang.Object
- implements Fetchable, Value, Filterable
Mapping for a collection. Subclasses specialize to particular collection styles.
- Author:
- Gavin King
- See Also:
- Serialized Form
Method Summary |
void |
addFilter(java.lang.String name,
java.lang.String condition)
|
void |
addManyToManyFilter(java.lang.String name,
java.lang.String condition)
|
void |
createAllKeys()
|
void |
createForeignKey()
|
int |
getBatchSize()
|
java.lang.String |
getCacheConcurrencyStrategy()
|
java.lang.String |
getCacheRegionName()
|
java.lang.Class |
getCollectionPersisterClass()
|
Table |
getCollectionTable()
|
CollectionType |
getCollectionType()
|
boolean[] |
getColumnInsertability()
|
java.util.Iterator |
getColumnIterator()
|
int |
getColumnSpan()
|
boolean[] |
getColumnUpdateability()
|
java.util.Comparator |
getComparator()
|
java.lang.String |
getComparatorClassName()
|
java.lang.String |
getCustomSQLDelete()
|
java.lang.String |
getCustomSQLDeleteAll()
|
ExecuteUpdateResultCheckStyle |
getCustomSQLDeleteAllCheckStyle()
|
ExecuteUpdateResultCheckStyle |
getCustomSQLDeleteCheckStyle()
|
java.lang.String |
getCustomSQLInsert()
|
ExecuteUpdateResultCheckStyle |
getCustomSQLInsertCheckStyle()
|
java.lang.String |
getCustomSQLUpdate()
|
ExecuteUpdateResultCheckStyle |
getCustomSQLUpdateCheckStyle()
|
abstract CollectionType |
getDefaultCollectionType()
|
Value |
getElement()
|
java.lang.String |
getElementNodeName()
|
FetchMode |
getFetchMode()
|
java.util.Map |
getFilterMap()
|
KeyValue |
getKey()
|
java.lang.String |
getLoaderName()
|
java.util.Map |
getManyToManyFilterMap()
|
java.lang.String |
getManyToManyOrdering()
|
java.lang.String |
getManyToManyWhere()
|
java.lang.String |
getNodeName()
|
java.lang.String |
getOrderBy()
|
PersistentClass |
getOwner()
|
java.lang.String |
getOwnerEntityName()
|
java.lang.String |
getReferencedPropertyName()
|
java.lang.String |
getRole()
|
java.util.Set |
getSynchronizedTables()
|
Table |
getTable()
|
Type |
getType()
|
java.lang.String |
getTypeName()
|
java.util.Properties |
getTypeParameters()
|
java.lang.String |
getWhere()
|
boolean |
hasFormula()
|
boolean |
hasOrder()
|
boolean |
hasOrphanDelete()
|
boolean |
isAlternateUniqueKey()
|
boolean |
isArray()
|
boolean |
isCustomDeleteAllCallable()
|
boolean |
isCustomDeleteCallable()
|
boolean |
isCustomInsertCallable()
|
boolean |
isCustomUpdateCallable()
|
boolean |
isEmbedded()
|
boolean |
isExtraLazy()
|
boolean |
isIdentified()
|
boolean |
isIndexed()
|
boolean |
isInverse()
|
boolean |
isLazy()
|
boolean |
isMap()
|
boolean |
isMutable()
|
boolean |
isNullable()
|
boolean |
isOneToMany()
|
boolean |
isOptimisticLocked()
|
boolean |
isPrimitiveArray()
|
boolean |
isSet()
|
boolean |
isSimpleValue()
|
boolean |
isSorted()
|
boolean |
isSubselectLoadable()
|
boolean |
isValid(Mapping mapping)
|
void |
setBatchSize(int i)
|
void |
setCacheConcurrencyStrategy(java.lang.String cacheConcurrencyStrategy)
|
void |
setCacheRegionName(java.lang.String cacheRegionName)
|
void |
setCollectionPersisterClass(java.lang.Class persister)
|
void |
setCollectionTable(Table table)
|
void |
setComparator(java.util.Comparator comparator)
|
void |
setComparatorClassName(java.lang.String comparatorClassName)
|
void |
setCustomSQLDelete(java.lang.String customSQLDelete,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
|
void |
setCustomSQLDeleteAll(java.lang.String customSQLDeleteAll,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
|
void |
setCustomSQLInsert(java.lang.String customSQLInsert,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
|
void |
setCustomSQLUpdate(java.lang.String customSQLUpdate,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
|
void |
setElement(Value element)
|
void |
setElementNodeName(java.lang.String elementNodeName)
|
void |
setEmbedded(boolean embedded)
|
void |
setExtraLazy(boolean extraLazy)
|
void |
setFetchMode(FetchMode fetchMode)
|
void |
setInverse(boolean inverse)
|
void |
setKey(KeyValue key)
|
void |
setLazy(boolean lazy)
|
void |
setLoaderName(java.lang.String name)
|
void |
setManyToManyOrdering(java.lang.String orderFragment)
|
void |
setManyToManyWhere(java.lang.String manyToManyWhere)
|
void |
setMutable(boolean mutable)
|
void |
setNodeName(java.lang.String nodeName)
|
void |
setOptimisticLocked(boolean optimisticLocked)
|
void |
setOrderBy(java.lang.String orderBy)
|
void |
setOrphanDelete(boolean orphanDelete)
|
void |
setOwner(PersistentClass owner)
|
void |
setReferencedPropertyName(java.lang.String propertyRef)
|
void |
setRole(java.lang.String role)
|
void |
setSorted(boolean sorted)
|
void |
setSubselectLoadable(boolean subqueryLoadable)
|
void |
setTypeName(java.lang.String typeName)
|
void |
setTypeParameters(java.util.Properties parameterMap)
|
void |
setTypeUsingReflection(java.lang.String className,
java.lang.String propertyName)
|
void |
setWhere(java.lang.String where)
|
java.lang.String |
toString()
|
void |
validate(Mapping mapping)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.hibernate.mapping.Value |
accept |
DEFAULT_ELEMENT_COLUMN_NAME
public static final java.lang.String DEFAULT_ELEMENT_COLUMN_NAME
- See Also:
- Constant Field Values
DEFAULT_KEY_COLUMN_NAME
public static final java.lang.String DEFAULT_KEY_COLUMN_NAME
- See Also:
- Constant Field Values
Collection
protected Collection(PersistentClass owner)
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 java.util.Comparator getComparator()
isLazy
public boolean isLazy()
- Specified by:
isLazy
in interface Fetchable
setLazy
public void setLazy(boolean lazy)
- Specified by:
setLazy
in interface Fetchable
getRole
public java.lang.String getRole()
getDefaultCollectionType
public abstract CollectionType getDefaultCollectionType()
throws MappingException
- Throws:
MappingException
isPrimitiveArray
public boolean isPrimitiveArray()
isArray
public boolean isArray()
hasFormula
public boolean hasFormula()
- Specified by:
hasFormula
in interface Value
isOneToMany
public boolean isOneToMany()
isInverse
public boolean isInverse()
getOwnerEntityName
public java.lang.String getOwnerEntityName()
getOrderBy
public java.lang.String getOrderBy()
setComparator
public void setComparator(java.util.Comparator comparator)
setElement
public void setElement(Value element)
setKey
public void setKey(KeyValue key)
setOrderBy
public void setOrderBy(java.lang.String orderBy)
setRole
public void setRole(java.lang.String role)
setSorted
public void setSorted(boolean sorted)
setInverse
public void setInverse(boolean inverse)
getOwner
public PersistentClass getOwner()
setOwner
public void setOwner(PersistentClass owner)
getWhere
public java.lang.String getWhere()
setWhere
public void setWhere(java.lang.String where)
getManyToManyWhere
public java.lang.String getManyToManyWhere()
setManyToManyWhere
public void setManyToManyWhere(java.lang.String manyToManyWhere)
getManyToManyOrdering
public java.lang.String getManyToManyOrdering()
setManyToManyOrdering
public void setManyToManyOrdering(java.lang.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()
- Specified by:
getFetchMode
in interface Fetchable
- Specified by:
getFetchMode
in interface Value
setFetchMode
public void setFetchMode(FetchMode fetchMode)
- Specified by:
setFetchMode
in interface Fetchable
setCollectionPersisterClass
public void setCollectionPersisterClass(java.lang.Class persister)
getCollectionPersisterClass
public java.lang.Class getCollectionPersisterClass()
validate
public void validate(Mapping mapping)
throws MappingException
- Throws:
MappingException
getColumnIterator
public java.util.Iterator getColumnIterator()
- Specified by:
getColumnIterator
in interface Value
getColumnSpan
public int getColumnSpan()
- Specified by:
getColumnSpan
in interface Value
getType
public Type getType()
throws MappingException
- Specified by:
getType
in interface Value
- Throws:
MappingException
getCollectionType
public CollectionType getCollectionType()
isNullable
public boolean isNullable()
- Specified by:
isNullable
in interface Value
isAlternateUniqueKey
public boolean isAlternateUniqueKey()
- Specified by:
isAlternateUniqueKey
in interface Value
getTable
public Table getTable()
- Specified by:
getTable
in interface Value
createForeignKey
public void createForeignKey()
- Specified by:
createForeignKey
in interface Value
isSimpleValue
public boolean isSimpleValue()
- Specified by:
isSimpleValue
in interface Value
isValid
public boolean isValid(Mapping mapping)
throws MappingException
- Specified by:
isValid
in interface Value
- Throws:
MappingException
createAllKeys
public void createAllKeys()
throws MappingException
- Throws:
MappingException
getCacheConcurrencyStrategy
public java.lang.String getCacheConcurrencyStrategy()
setCacheConcurrencyStrategy
public void setCacheConcurrencyStrategy(java.lang.String cacheConcurrencyStrategy)
setTypeUsingReflection
public void setTypeUsingReflection(java.lang.String className,
java.lang.String propertyName)
- Specified by:
setTypeUsingReflection
in interface Value
getCacheRegionName
public java.lang.String getCacheRegionName()
setCacheRegionName
public void setCacheRegionName(java.lang.String cacheRegionName)
setCustomSQLInsert
public void setCustomSQLInsert(java.lang.String customSQLInsert,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
getCustomSQLInsert
public java.lang.String getCustomSQLInsert()
isCustomInsertCallable
public boolean isCustomInsertCallable()
getCustomSQLInsertCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLInsertCheckStyle()
setCustomSQLUpdate
public void setCustomSQLUpdate(java.lang.String customSQLUpdate,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
getCustomSQLUpdate
public java.lang.String getCustomSQLUpdate()
isCustomUpdateCallable
public boolean isCustomUpdateCallable()
getCustomSQLUpdateCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLUpdateCheckStyle()
setCustomSQLDelete
public void setCustomSQLDelete(java.lang.String customSQLDelete,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
getCustomSQLDelete
public java.lang.String getCustomSQLDelete()
isCustomDeleteCallable
public boolean isCustomDeleteCallable()
getCustomSQLDeleteCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteCheckStyle()
setCustomSQLDeleteAll
public void setCustomSQLDeleteAll(java.lang.String customSQLDeleteAll,
boolean callable,
ExecuteUpdateResultCheckStyle checkStyle)
getCustomSQLDeleteAll
public java.lang.String getCustomSQLDeleteAll()
isCustomDeleteAllCallable
public boolean isCustomDeleteAllCallable()
getCustomSQLDeleteAllCheckStyle
public ExecuteUpdateResultCheckStyle getCustomSQLDeleteAllCheckStyle()
addFilter
public void addFilter(java.lang.String name,
java.lang.String condition)
- Specified by:
addFilter
in interface Filterable
getFilterMap
public java.util.Map getFilterMap()
- Specified by:
getFilterMap
in interface Filterable
addManyToManyFilter
public void addManyToManyFilter(java.lang.String name,
java.lang.String condition)
getManyToManyFilterMap
public java.util.Map getManyToManyFilterMap()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getSynchronizedTables
public java.util.Set getSynchronizedTables()
getLoaderName
public java.lang.String getLoaderName()
setLoaderName
public void setLoaderName(java.lang.String name)
getReferencedPropertyName
public java.lang.String getReferencedPropertyName()
setReferencedPropertyName
public void setReferencedPropertyName(java.lang.String propertyRef)
isOptimisticLocked
public boolean isOptimisticLocked()
setOptimisticLocked
public void setOptimisticLocked(boolean optimisticLocked)
isMap
public boolean isMap()
getTypeName
public java.lang.String getTypeName()
setTypeName
public void setTypeName(java.lang.String typeName)
getTypeParameters
public java.util.Properties getTypeParameters()
setTypeParameters
public void setTypeParameters(java.util.Properties parameterMap)
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertability
in interface Value
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateability
in interface Value
getNodeName
public java.lang.String getNodeName()
setNodeName
public void setNodeName(java.lang.String nodeName)
getElementNodeName
public java.lang.String getElementNodeName()
setElementNodeName
public void setElementNodeName(java.lang.String elementNodeName)
isEmbedded
public boolean isEmbedded()
setEmbedded
public void setEmbedded(boolean embedded)
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(java.lang.String comparatorClassName)
getComparatorClassName
public java.lang.String getComparatorClassName()
Copyright © 2008 Hibernate.org. All Rights Reserved.