Package org.hibernate.mapping
Class OneToMany
- java.lang.Object
-
- org.hibernate.mapping.OneToMany
-
- All Implemented Interfaces:
Serializable
,Value
public class OneToMany extends Object implements Value
A mapping model object representing a many-to-one association.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OneToMany(MetadataBuildingContext buildingContext, PersistentClass owner)
-
Method Summary
-
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
checkColumnDuplication, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getVirtualSelectables
-
-
-
-
Constructor Detail
-
OneToMany
public OneToMany(MetadataBuildingContext buildingContext, PersistentClass owner) throws MappingException
- Throws:
MappingException
-
-
Method Detail
-
getBuildingContext
public MetadataBuildingContext getBuildingContext()
- Specified by:
getBuildingContext
in interfaceValue
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistry
in interfaceValue
-
getAssociatedClass
public PersistentClass getAssociatedClass()
-
setAssociatedClass
public void setAssociatedClass(PersistentClass associatedClass)
Associated entity on the many side
-
createForeignKey
public void createForeignKey()
- Specified by:
createForeignKey
in interfaceValue
-
createUniqueKey
public void createUniqueKey(MetadataBuildingContext context)
- Specified by:
createUniqueKey
in interfaceValue
-
getSelectables
public List<Selectable> getSelectables()
Description copied from interface:Value
The mapping to columns and formulas.- Specified by:
getSelectables
in interfaceValue
-
getColumns
public List<Column> getColumns()
Description copied from interface:Value
If the mapping involves only columns, return them.- Specified by:
getColumns
in interfaceValue
-
getColumnSpan
public int getColumnSpan()
Description copied from interface:Value
The number of columns and formulas in the mapping.- Specified by:
getColumnSpan
in interfaceValue
-
getFetchMode
public FetchMode getFetchMode()
- Specified by:
getFetchMode
in interfaceValue
-
getTable
public Table getTable()
Table of the owner entity (the "one" side)
-
isNullable
public boolean isNullable()
- Specified by:
isNullable
in interfaceValue
-
isSimpleValue
public boolean isSimpleValue()
- Specified by:
isSimpleValue
in interfaceValue
-
isAlternateUniqueKey
public boolean isAlternateUniqueKey()
- Specified by:
isAlternateUniqueKey
in interfaceValue
-
hasFormula
public boolean hasFormula()
- Specified by:
hasFormula
in interfaceValue
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValid
in interfaceValue
- Throws:
MappingException
-
getReferencedEntityName
public String getReferencedEntityName()
-
setReferencedEntityName
public void setReferencedEntityName(String referencedEntityName)
Associated entity on the "many" side
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName)
- Specified by:
setTypeUsingReflection
in interfaceValue
-
accept
public Object accept(ValueVisitor visitor)
-
isSame
public boolean isSame(OneToMany other)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertability
in interfaceValue
-
hasAnyInsertableColumns
public boolean hasAnyInsertableColumns()
- Specified by:
hasAnyInsertableColumns
in interfaceValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateability
in interfaceValue
-
hasAnyUpdatableColumns
public boolean hasAnyUpdatableColumns()
- Specified by:
hasAnyUpdatableColumns
in interfaceValue
-
getNotFoundAction
public NotFoundAction getNotFoundAction()
-
setNotFoundAction
public void setNotFoundAction(NotFoundAction notFoundAction)
-
isIgnoreNotFound
public boolean isIgnoreNotFound()
-
setIgnoreNotFound
public void setIgnoreNotFound(boolean ignoreNotFound)
-
isColumnInsertable
public boolean isColumnInsertable(int index)
- Specified by:
isColumnInsertable
in interfaceValue
-
isColumnUpdateable
public boolean isColumnUpdateable(int index)
- Specified by:
isColumnUpdateable
in interfaceValue
-
-