org.hibernate.mapping
Class SimpleValue

java.lang.Object
  extended by org.hibernate.mapping.SimpleValue
All Implemented Interfaces:
Serializable, KeyValue, Value
Direct Known Subclasses:
Any, Component, DependantValue, ToOne

public class SimpleValue
extends Object
implements KeyValue

Any value that maps to columns.

Author:
Gavin King
See Also:
Serialized Form

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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleValue

public SimpleValue(Table table)

SimpleValue

public SimpleValue()
Method Detail

isCascadeDeleteEnabled

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

setCascadeDeleteEnabled

public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)

addColumn

public void addColumn(Column column)

addFormula

public void addFormula(Formula formula)

hasFormula

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

getColumnSpan

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

getColumnIterator

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

getConstraintColumns

public List getConstraintColumns()

getTypeName

public String getTypeName()

setTypeName

public void setTypeName(String type)

setTable

public void setTable(Table table)

createForeignKey

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

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
Throws:
MappingException

isUpdateable

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

getFetchMode

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

getIdentifierGeneratorProperties

public Properties getIdentifierGeneratorProperties()

getNullValue

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

getTable

public Table getTable()
Specified by:
getTable in interface Value

getIdentifierGeneratorStrategy

public String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.

Returns:
String

isIdentityColumn

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

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

getForeignKeyName

public String getForeignKeyName()

setForeignKeyName

public void setForeignKeyName(String foreignKeyName)

isAlternateUniqueKey

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

setAlternateUniqueKey

public void setAlternateUniqueKey(boolean unique)

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
Throws:
MappingException

getType

public Type getType()
             throws MappingException
Specified by:
getType in interface Value
Throws:
MappingException

setTypeUsingReflection

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

isTypeSpecified

public boolean isTypeSpecified()

setTypeParameters

public void setTypeParameters(Properties parameterMap)

getTypeParameters

public Properties getTypeParameters()

toString

public String toString()
Overrides:
toString in class Object

accept

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

getColumnInsertability

public boolean[] getColumnInsertability()
Specified by:
getColumnInsertability in interface Value

getColumnUpdateability

public boolean[] getColumnUpdateability()
Specified by:
getColumnUpdateability in interface Value


Copyright © null-null Red Hat Middleware, LLC. All Rights Reserved