org.hibernate.mapping

Class ToOne

Implemented Interfaces:
Fetchable, KeyValue, Serializable, Value
Known Direct Subclasses:
ManyToOne, OneToOne

public abstract class ToOne
extends SimpleValue
implements Fetchable

A simple-point association (ie. a reference to another entity).
Author:
Gavin King

Field Summary

protected String
referencedPropertyName
protected boolean
unwrapProxy

Constructor Summary

ToOne(Table table)

Method Summary

Object
accept(ValueVisitor visitor)
abstract void
createForeignKey()
FetchMode
getFetchMode()
String
getReferencedEntityName()
String
getReferencedPropertyName()
abstract Type
getType()
boolean
isEmbedded()
boolean
isLazy()
boolean
isTypeSpecified()
boolean
isUnwrapProxy()
boolean
isValid(Mapping mapping)
void
setEmbedded(boolean embedded)
void
setFetchMode(FetchMode fetchMode)
void
setLazy(boolean lazy)
void
setReferencedEntityName(String referencedEntityName)
void
setReferencedPropertyName(String name)
void
setTypeUsingReflection(String className, String propertyName)
void
setUnwrapProxy(boolean unwrapProxy)

Methods inherited from class org.hibernate.mapping.SimpleValue

accept, addColumn, addFormula, createForeignKey, createForeignKeyOfEntity, createIdentifierGenerator, getColumnInsertability, getColumnIterator, getColumnSpan, getColumnUpdateability, getConstraintColumns, getFetchMode, getForeignKeyName, getIdentifierGeneratorProperties, getIdentifierGeneratorStrategy, getNullValue, getTable, getType, getTypeName, getTypeParameters, hasFormula, isAlternateUniqueKey, isCascadeDeleteEnabled, isIdentityColumn, isNullable, isSimpleValue, isTypeSpecified, isUpdateable, isValid, setAlternateUniqueKey, setCascadeDeleteEnabled, setForeignKeyName, setIdentifierGeneratorProperties, setIdentifierGeneratorStrategy, setNullValue, setTable, setTypeName, setTypeParameters, setTypeUsingReflection, toString

Field Details

referencedPropertyName

protected String referencedPropertyName

unwrapProxy

protected boolean unwrapProxy

Constructor Details

ToOne

protected ToOne(Table table)

Method Details

accept

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

createForeignKey

public abstract void createForeignKey()
            throws MappingException
Specified by:
createForeignKey in interface Value
Overrides:
createForeignKey in interface SimpleValue

getFetchMode

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

getReferencedEntityName

public String getReferencedEntityName()

getReferencedPropertyName

public String getReferencedPropertyName()

getType

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

isEmbedded

public boolean isEmbedded()

isLazy

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

isTypeSpecified

public boolean isTypeSpecified()
Overrides:
isTypeSpecified in interface SimpleValue

isUnwrapProxy

public boolean isUnwrapProxy()

isValid

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

setEmbedded

public void setEmbedded(boolean embedded)

setFetchMode

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

setLazy

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

setReferencedEntityName

public void setReferencedEntityName(String referencedEntityName)

setReferencedPropertyName

public void setReferencedPropertyName(String name)

setTypeUsingReflection

public void setTypeUsingReflection(String className,
                                   String propertyName)
            throws MappingException
Specified by:
setTypeUsingReflection in interface Value
Overrides:
setTypeUsingReflection in interface SimpleValue

setUnwrapProxy

public void setUnwrapProxy(boolean unwrapProxy)