站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

Collection (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.mapping
Class Collection

java.lang.Object
  extended bynet.sf.hibernate.mapping.Collection
All Implemented Interfaces:
Fetchable, Value
Direct Known Subclasses:
Bag, IdentifierCollection, IndexedCollection, Set

public abstract class Collection
extends Object
implements Fetchable, Value

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
protected Collection(PersistentClass owner)
           
 
Method Summary
 void createAllKeys()
           
 void createForeignKey()
           
 int getBatchSize()
           
 CacheConcurrencyStrategy getCache()
           
 Class getCollectionPersisterClass()
           
 Table getCollectionTable()
           
abstract  PersistentCollectionType getCollectionType()
           
 Iterator getColumnIterator()
           
 int getColumnSpan()
           
 Comparator getComparator()
           
 Value getElement()
           
 Formula getFormula()
           
 SimpleValue getKey()
           
 String getOrderBy()
          Returns the orderBy.
 int getOuterJoinFetchSetting()
           
 PersistentClass getOwner()
          Returns the owner.
 Class getOwnerClass()
           
 String getRole()
           
 Table getTable()
           
 Type getType()
           
 String getWhere()
          Returns the where.
 boolean hasOrphanDelete()
           
 boolean isArray()
           
 boolean isIdentified()
           
 boolean isIndexed()
           
 boolean isInverse()
           
 boolean isLazy()
           
 boolean isNullable()
           
 boolean isOneToMany()
           
 boolean isPrimitiveArray()
           
 boolean isSet()
           
 boolean isSimpleValue()
           
 boolean isSorted()
           
 boolean isUnique()
           
 boolean isValid(Mapping mapping)
           
 void setBatchSize(int i)
           
 void setCache(CacheConcurrencyStrategy cache)
          Sets the cache.
 void setCollectionPersisterClass(Class persister)
           
 void setCollectionTable(Table table)
           
 void setComparator(Comparator comparator)
          Sets the comparator.
 void setElement(Value element)
          Sets the element.
 void setInverse(boolean inverse)
          Sets the inverse.
 void setKey(SimpleValue key)
          Sets the key.
 void setLazy(boolean lazy)
           
 void setOrderBy(String orderBy)
          Sets the orderBy.
 void setOrphanDelete(boolean orphanDelete)
           
 void setOuterJoinFetchSetting(int joinedFetch)
           
 void setOwner(PersistentClass owner)
          Sets the owner.
 void setRole(String role)
          Sets the role.
 void setSorted(boolean sorted)
          Sets the sorted.
 void setWhere(String where)
          Sets the where.
 void validate(Mapping mapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ELEMENT_COLUMN_NAME

public static final String DEFAULT_ELEMENT_COLUMN_NAME
See Also:
Constant Field Values

DEFAULT_KEY_COLUMN_NAME

public static final String DEFAULT_KEY_COLUMN_NAME
See Also:
Constant Field Values
Constructor Detail

Collection

protected Collection(PersistentClass owner)
Method Detail

isSet

public boolean isSet()

getKey

public SimpleValue 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()

isLazy

public boolean isLazy()

setLazy

public void setLazy(boolean lazy)

getRole

public String getRole()

getCollectionType

public abstract PersistentCollectionType getCollectionType()

isPrimitiveArray

public boolean isPrimitiveArray()

isArray

public boolean isArray()

isOneToMany

public boolean isOneToMany()

getCache

public CacheConcurrencyStrategy getCache()

isInverse

public boolean isInverse()

getOwnerClass

public Class getOwnerClass()

getOrderBy

public String getOrderBy()
Returns the orderBy.

Returns:
String

setCache

public void setCache(CacheConcurrencyStrategy cache)
Sets the cache.

Parameters:
cache - The cache to set

setComparator

public void setComparator(Comparator comparator)
Sets the comparator.

Parameters:
comparator - The comparator to set

setElement

public void setElement(Value element)
Sets the element.

Parameters:
element - The element to set

setKey

public void setKey(SimpleValue key)
Sets the key.

Parameters:
key - The key to set

setOrderBy

public void setOrderBy(String orderBy)
Sets the orderBy.

Parameters:
orderBy - The orderBy to set

setRole

public void setRole(String role)
Sets the role.

Parameters:
role - The role to set

setSorted

public void setSorted(boolean sorted)
Sets the sorted.

Parameters:
sorted - The sorted to set

setInverse

public void setInverse(boolean inverse)
Sets the inverse.

Parameters:
inverse - The inverse to set

getOwner

public PersistentClass getOwner()
Returns the owner.

Returns:
PersistentClass

setOwner

public void setOwner(PersistentClass owner)
Sets the owner.

Parameters:
owner - The owner to set

getWhere

public String getWhere()
Returns the where.

Returns:
String

setWhere

public void setWhere(String where)
Sets the where.

Parameters:
where - The where to set

isIdentified

public boolean isIdentified()

hasOrphanDelete

public boolean hasOrphanDelete()

setOrphanDelete

public void setOrphanDelete(boolean orphanDelete)

getBatchSize

public int getBatchSize()

setBatchSize

public void setBatchSize(int i)

getOuterJoinFetchSetting

public int getOuterJoinFetchSetting()
Specified by:
getOuterJoinFetchSetting in interface Fetchable

setOuterJoinFetchSetting

public void setOuterJoinFetchSetting(int joinedFetch)
Specified by:
setOuterJoinFetchSetting in interface Fetchable

setCollectionPersisterClass

public void setCollectionPersisterClass(Class persister)

getCollectionPersisterClass

public Class getCollectionPersisterClass()

validate

public void validate(Mapping mapping)
              throws MappingException
Throws:
MappingException

getColumnIterator

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

getColumnSpan

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

getFormula

public Formula getFormula()
Specified by:
getFormula in interface Value

getType

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

isNullable

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

isUnique

public boolean isUnique()
Specified by:
isUnique 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()