org.hibernate.mapping

Class Collection

Implemented Interfaces:
Fetchable, Serializable, Filterable, Value
Known Direct 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

Field Summary

static String
DEFAULT_ELEMENT_COLUMN_NAME
static String
DEFAULT_KEY_COLUMN_NAME

Constructor Summary

Collection(PersistentClass owner)

Method Summary

void
addFilter(String name, String condition)
void
addManyToManyFilter(String name, String condition)
void
createAllKeys()
void
createForeignKey()
int
getBatchSize()
String
getCacheConcurrencyStrategy()
String
getCacheRegionName()
Class
getCollectionPersisterClass()
Table
getCollectionTable()
CollectionType
getCollectionType()
boolean[]
getColumnInsertability()
Iterator
getColumnIterator()
int
getColumnSpan()
boolean[]
getColumnUpdateability()
Comparator
getComparator()
String
getComparatorClassName()
String
getCustomSQLDelete()
String
getCustomSQLDeleteAll()
ExecuteUpdateResultCheckStyle
getCustomSQLDeleteAllCheckStyle()
ExecuteUpdateResultCheckStyle
getCustomSQLDeleteCheckStyle()
String
getCustomSQLInsert()
ExecuteUpdateResultCheckStyle
getCustomSQLInsertCheckStyle()
String
getCustomSQLUpdate()
ExecuteUpdateResultCheckStyle
getCustomSQLUpdateCheckStyle()
abstract CollectionType
getDefaultCollectionType()
Value
getElement()
String
getElementNodeName()
FetchMode
getFetchMode()
java.util.Map
getFilterMap()
KeyValue
getKey()
String
getLoaderName()
java.util.Map
getManyToManyFilterMap()
String
getManyToManyOrdering()
String
getManyToManyWhere()
String
getNodeName()
String
getOrderBy()
PersistentClass
getOwner()
String
getOwnerEntityName()
String
getReferencedPropertyName()
String
getRole()
java.util.Set
getSynchronizedTables()
Table
getTable()
Type
getType()
String
getTypeName()
Properties
getTypeParameters()
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(String cacheConcurrencyStrategy)
void
setCacheRegionName(String cacheRegionName)
void
setCollectionPersisterClass(Class persister)
void
setCollectionTable(Table table)
void
setComparator(Comparator comparator)
void
setComparatorClassName(String comparatorClassName)
void
setCustomSQLDelete(String customSQLDelete, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
void
setCustomSQLDeleteAll(String customSQLDeleteAll, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
void
setCustomSQLInsert(String customSQLInsert, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
void
setCustomSQLUpdate(String customSQLUpdate, boolean callable, ExecuteUpdateResultCheckStyle checkStyle)
void
setElement(Value element)
void
setElementNodeName(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(String name)
void
setManyToManyOrdering(String orderFragment)
void
setManyToManyWhere(String manyToManyWhere)
void
setMutable(boolean mutable)
void
setNodeName(String nodeName)
void
setOptimisticLocked(boolean optimisticLocked)
void
setOrderBy(String orderBy)
void
setOrphanDelete(boolean orphanDelete)
void
setOwner(PersistentClass owner)
void
setReferencedPropertyName(String propertyRef)
void
setRole(String role)
void
setSorted(boolean sorted)
void
setSubselectLoadable(boolean subqueryLoadable)
void
setTypeName(String typeName)
void
setTypeParameters(Properties parameterMap)
void
setTypeUsingReflection(String className, String propertyName)
void
setWhere(String where)
String
toString()
void
validate(Mapping mapping)

Field Details

DEFAULT_ELEMENT_COLUMN_NAME

public static final String DEFAULT_ELEMENT_COLUMN_NAME

DEFAULT_KEY_COLUMN_NAME

public static final String DEFAULT_KEY_COLUMN_NAME

Constructor Details

Collection

protected Collection(PersistentClass owner)

Method Details

addFilter

public void addFilter(String name,
                      String condition)
Specified by:
addFilter in interface Filterable

addManyToManyFilter

public void addManyToManyFilter(String name,
                                String condition)

createAllKeys

public void createAllKeys()
            throws MappingException

createForeignKey

public void createForeignKey()
Specified by:
createForeignKey in interface Value

getBatchSize

public int getBatchSize()

getCacheConcurrencyStrategy

public String getCacheConcurrencyStrategy()

getCacheRegionName

public String getCacheRegionName()

getCollectionPersisterClass

public Class getCollectionPersisterClass()

getCollectionTable

public Table getCollectionTable()

getCollectionType

public CollectionType getCollectionType()

getColumnInsertability

public boolean[] getColumnInsertability()
Specified by:
getColumnInsertability in interface Value

getColumnIterator

public Iterator getColumnIterator()
Specified by:
getColumnIterator in interface Value

getColumnSpan

public int getColumnSpan()
Specified by:
getColumnSpan in interface Value

getColumnUpdateability

public boolean[] getColumnUpdateability()
Specified by:
getColumnUpdateability in interface Value

getComparator

public Comparator getComparator()

getComparatorClassName

public String getComparatorClassName()

getCustomSQLDelete

public String getCustomSQLDelete()

getCustomSQLDeleteAll

public String getCustomSQLDeleteAll()

getCustomSQLDeleteAllCheckStyle

public ExecuteUpdateResultCheckStyle getCustomSQLDeleteAllCheckStyle()

getCustomSQLDeleteCheckStyle

public ExecuteUpdateResultCheckStyle getCustomSQLDeleteCheckStyle()

getCustomSQLInsert

public String getCustomSQLInsert()

getCustomSQLInsertCheckStyle

public ExecuteUpdateResultCheckStyle getCustomSQLInsertCheckStyle()

getCustomSQLUpdate

public String getCustomSQLUpdate()

getCustomSQLUpdateCheckStyle

public ExecuteUpdateResultCheckStyle getCustomSQLUpdateCheckStyle()

getDefaultCollectionType

public abstract CollectionType getDefaultCollectionType()
            throws MappingException

getElement

public Value getElement()

getElementNodeName

public String getElementNodeName()

getFetchMode

public FetchMode getFetchMode()
Specified by:
getFetchMode in interface Fetchable
getFetchMode in interface Value

getFilterMap

public java.util.Map getFilterMap()
Specified by:
getFilterMap in interface Filterable

getKey

public KeyValue getKey()

getLoaderName

public String getLoaderName()

getManyToManyFilterMap

public java.util.Map getManyToManyFilterMap()

getManyToManyOrdering

public String getManyToManyOrdering()

getManyToManyWhere

public String getManyToManyWhere()

getNodeName

public String getNodeName()

getOrderBy

public String getOrderBy()

getOwner

public PersistentClass getOwner()

getOwnerEntityName

public String getOwnerEntityName()

getReferencedPropertyName

public String getReferencedPropertyName()

getRole

public String getRole()

getSynchronizedTables

public java.util.Set getSynchronizedTables()

getTable

public Table getTable()
Specified by:
getTable in interface Value

getType

public Type getType()
            throws MappingException
Specified by:
getType in interface Value

getTypeName

public String getTypeName()

getTypeParameters

public Properties getTypeParameters()

getWhere

public String getWhere()

hasFormula

public boolean hasFormula()
Specified by:
hasFormula in interface Value

hasOrder

public boolean hasOrder()

hasOrphanDelete

public boolean hasOrphanDelete()

isAlternateUniqueKey

public boolean isAlternateUniqueKey()
Specified by:
isAlternateUniqueKey in interface Value

isArray

public boolean isArray()

isCustomDeleteAllCallable

public boolean isCustomDeleteAllCallable()

isCustomDeleteCallable

public boolean isCustomDeleteCallable()

isCustomInsertCallable

public boolean isCustomInsertCallable()

isCustomUpdateCallable

public boolean isCustomUpdateCallable()

isEmbedded

public boolean isEmbedded()

isExtraLazy

public boolean isExtraLazy()

isIdentified

public boolean isIdentified()

isIndexed

public boolean isIndexed()

isInverse

public boolean isInverse()

isLazy

public boolean isLazy()
Specified by:
isLazy in interface Fetchable

isMap

public boolean isMap()

isMutable

public boolean isMutable()

isNullable

public boolean isNullable()
Specified by:
isNullable in interface Value

isOneToMany

public boolean isOneToMany()

isOptimisticLocked

public boolean isOptimisticLocked()

isPrimitiveArray

public boolean isPrimitiveArray()

isSet

public boolean isSet()

isSimpleValue

public boolean isSimpleValue()
Specified by:
isSimpleValue in interface Value

isSorted

public boolean isSorted()

isSubselectLoadable

public boolean isSubselectLoadable()

isValid

public boolean isValid(Mapping mapping)
            throws MappingException
Specified by:
isValid in interface Value

setBatchSize

public void setBatchSize(int i)

setCacheConcurrencyStrategy

public void setCacheConcurrencyStrategy(String cacheConcurrencyStrategy)

setCacheRegionName

public void setCacheRegionName(String cacheRegionName)

setCollectionPersisterClass

public void setCollectionPersisterClass(Class persister)

setCollectionTable

public void setCollectionTable(Table table)

setComparator

public void setComparator(Comparator comparator)

setComparatorClassName

public void setComparatorClassName(String comparatorClassName)

setCustomSQLDelete

public void setCustomSQLDelete(String customSQLDelete,
                               boolean callable,
                               ExecuteUpdateResultCheckStyle checkStyle)

setCustomSQLDeleteAll

public void setCustomSQLDeleteAll(String customSQLDeleteAll,
                                  boolean callable,
                                  ExecuteUpdateResultCheckStyle checkStyle)

setCustomSQLInsert

public void setCustomSQLInsert(String customSQLInsert,
                               boolean callable,
                               ExecuteUpdateResultCheckStyle checkStyle)

setCustomSQLUpdate

public void setCustomSQLUpdate(String customSQLUpdate,
                               boolean callable,
                               ExecuteUpdateResultCheckStyle checkStyle)

setElement

public void setElement(Value element)

setElementNodeName

public void setElementNodeName(String elementNodeName)

setEmbedded

public void setEmbedded(boolean embedded)

setExtraLazy

public void setExtraLazy(boolean extraLazy)

setFetchMode

public void setFetchMode(FetchMode fetchMode)
Specified by:
setFetchMode in interface Fetchable

setInverse

public void setInverse(boolean inverse)

setKey

public void setKey(KeyValue key)

setLazy

public void setLazy(boolean lazy)
Specified by:
setLazy in interface Fetchable

setLoaderName

public void setLoaderName(String name)

setManyToManyOrdering

public void setManyToManyOrdering(String orderFragment)

setManyToManyWhere

public void setManyToManyWhere(String manyToManyWhere)

setMutable

public void setMutable(boolean mutable)

setNodeName

public void setNodeName(String nodeName)

setOptimisticLocked

public void setOptimisticLocked(boolean optimisticLocked)

setOrderBy

public void setOrderBy(String orderBy)

setOrphanDelete

public void setOrphanDelete(boolean orphanDelete)

setOwner

public void setOwner(PersistentClass owner)

setReferencedPropertyName

public void setReferencedPropertyName(String propertyRef)

setRole

public void setRole(String role)

setSorted

public void setSorted(boolean sorted)

setSubselectLoadable

public void setSubselectLoadable(boolean subqueryLoadable)

setTypeName

public void setTypeName(String typeName)

setTypeParameters

public void setTypeParameters(Properties parameterMap)

setTypeUsingReflection

public void setTypeUsingReflection(String className,
                                   String propertyName)
Specified by:
setTypeUsingReflection in interface Value

setWhere

public void setWhere(String where)

toString

public String toString()

validate

public void validate(Mapping mapping)
            throws MappingException