org.hibernate.mapping

Class OneToMany

Implemented Interfaces:
Serializable, Value

public class OneToMany
extends java.lang.Object
implements Value

A mapping for a one-to-many association
Author:
Gavin King

Constructor Summary

OneToMany(PersistentClass owner)

Method Summary

Object
accept(ValueVisitor visitor)
void
createForeignKey()
PersistentClass
getAssociatedClass()
boolean[]
getColumnInsertability()
Iterator
getColumnIterator()
int
getColumnSpan()
boolean[]
getColumnUpdateability()
FetchMode
getFetchMode()
String
getReferencedEntityName()
Table
getTable()
Table of the owner entity (the "one" side)
Type
getType()
boolean
hasFormula()
boolean
isAlternateUniqueKey()
boolean
isEmbedded()
boolean
isIgnoreNotFound()
boolean
isNullable()
boolean
isSimpleValue()
boolean
isValid(Mapping mapping)
void
setAssociatedClass(PersistentClass associatedClass)
Associated entity on the many side
void
setEmbedded(boolean embedded)
void
setIgnoreNotFound(boolean ignoreNotFound)
void
setReferencedEntityName(String referencedEntityName)
Associated entity on the "many" side
void
setTypeUsingReflection(String className, String propertyName)

Constructor Details

OneToMany

public OneToMany(PersistentClass owner)
            throws MappingException

Method Details

accept

public Object accept(ValueVisitor visitor)
Specified by:
accept in interface Value

createForeignKey

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

getAssociatedClass

public PersistentClass getAssociatedClass()

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

getFetchMode

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

getReferencedEntityName

public String getReferencedEntityName()

getTable

public Table getTable()
Table of the owner entity (the "one" side)
Specified by:
getTable in interface Value

getType

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

hasFormula

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

isAlternateUniqueKey

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

isEmbedded

public boolean isEmbedded()

isIgnoreNotFound

public boolean isIgnoreNotFound()

isNullable

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

setAssociatedClass

public void setAssociatedClass(PersistentClass associatedClass)
Associated entity on the many side

setEmbedded

public void setEmbedded(boolean embedded)

setIgnoreNotFound

public void setIgnoreNotFound(boolean ignoreNotFound)

setReferencedEntityName

public void setReferencedEntityName(String referencedEntityName)
Associated entity on the "many" side

setTypeUsingReflection

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