org.hibernate.mapping

Class SimpleValue

Implemented Interfaces:
KeyValue, Serializable, Value
Known Direct Subclasses:
Any, Component, DependantValue, ToOne

public class SimpleValue
extends java.lang.Object
implements KeyValue

Any value that maps to columns.
Author:
Gavin King

Constructor Summary

SimpleValue()
SimpleValue(Table table)

Method Summary

Object
accept(ValueVisitor visitor)
void
addColumn(Column column)
void
addFormula(Formula formula)
void
createForeignKey()
void
createForeignKeyOfEntity(String entityName)
IdentifierGenerator
createIdentifierGenerator(Dialect dialect, String defaultCatalog, String defaultSchema, RootClass rootClass)
boolean[]
getColumnInsertability()
Iterator
getColumnIterator()
int
getColumnSpan()
boolean[]
getColumnUpdateability()
List
getConstraintColumns()
FetchMode
getFetchMode()
String
getForeignKeyName()
Properties
getIdentifierGeneratorProperties()
String
getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.
String
getNullValue()
Table
getTable()
Type
getType()
String
getTypeName()
Properties
getTypeParameters()
boolean
hasFormula()
boolean
isAlternateUniqueKey()
boolean
isCascadeDeleteEnabled()
boolean
isIdentityColumn(Dialect dialect)
boolean
isNullable()
boolean
isSimpleValue()
boolean
isTypeSpecified()
boolean
isUpdateable()
boolean
isValid(Mapping mapping)
void
setAlternateUniqueKey(boolean unique)
void
setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
void
setForeignKeyName(String foreignKeyName)
void
setIdentifierGeneratorProperties(Properties identifierGeneratorProperties)
Sets the identifierGeneratorProperties.
void
setIdentifierGeneratorStrategy(String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.
void
setNullValue(String nullValue)
Sets the nullValue.
void
setTable(Table table)
void
setTypeName(String type)
void
setTypeParameters(Properties parameterMap)
void
setTypeUsingReflection(String className, String propertyName)
String
toString()

Constructor Details

SimpleValue

public SimpleValue()

SimpleValue

public SimpleValue(Table table)

Method Details

accept

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

addColumn

public void addColumn(Column column)

addFormula

public void addFormula(Formula formula)

createForeignKey

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

createForeignKeyOfEntity

public void createForeignKeyOfEntity(String entityName)
Specified by:
createForeignKeyOfEntity in interface KeyValue

createIdentifierGenerator

public IdentifierGenerator createIdentifierGenerator(Dialect dialect,
                                                     String defaultCatalog,
                                                     String defaultSchema,
                                                     RootClass rootClass)
            throws MappingException
Specified by:
createIdentifierGenerator in interface KeyValue

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

getConstraintColumns

public List getConstraintColumns()

getFetchMode

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

getForeignKeyName

public String getForeignKeyName()

getIdentifierGeneratorProperties

public Properties getIdentifierGeneratorProperties()

getIdentifierGeneratorStrategy

public String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.
Returns:
String

getNullValue

public String getNullValue()
Specified by:
getNullValue in interface KeyValue

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

hasFormula

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

isAlternateUniqueKey

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

isCascadeDeleteEnabled

public boolean isCascadeDeleteEnabled()
Specified by:
isCascadeDeleteEnabled in interface KeyValue

isIdentityColumn

public boolean isIdentityColumn(Dialect dialect)
Specified by:
isIdentityColumn in interface KeyValue

isNullable

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

isSimpleValue

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

isTypeSpecified

public boolean isTypeSpecified()

isUpdateable

public boolean isUpdateable()
Specified by:
isUpdateable in interface KeyValue

isValid

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

setAlternateUniqueKey

public void setAlternateUniqueKey(boolean unique)

setCascadeDeleteEnabled

public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)

setForeignKeyName

public void setForeignKeyName(String foreignKeyName)

setIdentifierGeneratorProperties

public void setIdentifierGeneratorProperties(Properties identifierGeneratorProperties)
Sets the identifierGeneratorProperties.
Parameters:
identifierGeneratorProperties - The identifierGeneratorProperties to set

setIdentifierGeneratorStrategy

public void setIdentifierGeneratorStrategy(String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.
Parameters:
identifierGeneratorStrategy - The identifierGeneratorStrategy to set

setNullValue

public void setNullValue(String nullValue)
Sets the nullValue.
Parameters:
nullValue - The nullValue to set

setTable

public void setTable(Table table)

setTypeName

public void setTypeName(String type)

setTypeParameters

public void setTypeParameters(Properties parameterMap)

setTypeUsingReflection

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

toString

public String toString()