Package org.hibernate.mapping
Class SimpleValue
- java.lang.Object
-
- org.hibernate.mapping.SimpleValue
-
- Direct Known Subclasses:
Any
,Component
,DependantValue
,ToOne
public class SimpleValue extends java.lang.Object implements KeyValue
Any value that maps to columns.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_ID_GEN_STRATEGY
-
Constructor Summary
Constructors Constructor Description SimpleValue(MetadataBuildingContext buildingContext)
SimpleValue(MetadataBuildingContext buildingContext, Table table)
SimpleValue(MetadataImplementor metadata)
Deprecated.UseSimpleValue(MetadataBuildingContext)
instead.SimpleValue(MetadataImplementor metadata, Table table)
Deprecated.UseSimpleValue(MetadataBuildingContext, Table)
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
accept(ValueVisitor visitor)
void
addColumn(Column column)
void
addColumn(Column column, boolean isInsertable, boolean isUpdatable)
void
addFormula(Formula formula)
void
copyTypeFrom(SimpleValue sourceValue)
void
createForeignKey()
void
createForeignKeyOfEntity(java.lang.String entityName)
IdentifierGenerator
createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, java.lang.String defaultCatalog, java.lang.String defaultSchema, RootClass rootClass)
boolean[]
getColumnInsertability()
java.util.Iterator<Selectable>
getColumnIterator()
int
getColumnSpan()
boolean[]
getColumnUpdateability()
java.util.List
getConstraintColumns()
FetchMode
getFetchMode()
java.lang.String
getForeignKeyDefinition()
java.lang.String
getForeignKeyName()
java.util.Properties
getIdentifierGeneratorProperties()
java.lang.String
getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.MetadataImplementor
getMetadata()
java.lang.String
getNullValue()
ServiceRegistry
getServiceRegistry()
Table
getTable()
Type
getType()
java.lang.String
getTypeName()
java.util.Properties
getTypeParameters()
boolean
hasFormula()
boolean
isAlternateUniqueKey()
boolean
isCascadeDeleteEnabled()
boolean
isIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect)
boolean
isLob()
boolean
isNationalized()
boolean
isNullable()
boolean
isSame(SimpleValue other)
boolean
isSame(Value other)
protected static boolean
isSame(Value v1, Value v2)
boolean
isSimpleValue()
boolean
isTypeSpecified()
boolean
isUpdateable()
boolean
isValid(Mapping mapping)
boolean
isVersion()
void
makeLob()
void
makeNationalized()
void
makeVersion()
void
setAlternateUniqueKey(boolean unique)
void
setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
void
setForeignKeyDefinition(java.lang.String foreignKeyDefinition)
void
setForeignKeyName(java.lang.String foreignKeyName)
void
setIdentifierGeneratorProperties(java.util.Properties identifierGeneratorProperties)
Sets the identifierGeneratorProperties.void
setIdentifierGeneratorStrategy(java.lang.String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.void
setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
void
setNullValue(java.lang.String nullValue)
Sets the nullValue.void
setTable(Table table)
void
setTypeName(java.lang.String typeName)
void
setTypeParameters(java.util.Properties parameterMap)
void
setTypeUsingReflection(java.lang.String className, java.lang.String propertyName)
java.lang.String
toString()
-
-
-
Field Detail
-
DEFAULT_ID_GEN_STRATEGY
public static final java.lang.String DEFAULT_ID_GEN_STRATEGY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleValue
@Deprecated public SimpleValue(MetadataImplementor metadata)
Deprecated.UseSimpleValue(MetadataBuildingContext)
instead.
-
SimpleValue
@Deprecated public SimpleValue(MetadataImplementor metadata, Table table)
Deprecated.UseSimpleValue(MetadataBuildingContext, Table)
instead.
-
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext)
-
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext, Table table)
-
-
Method Detail
-
getMetadata
public MetadataImplementor getMetadata()
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistry
in interfaceValue
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
- Specified by:
isCascadeDeleteEnabled
in interfaceKeyValue
-
setCascadeDeleteEnabled
public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
-
addColumn
public void addColumn(Column column)
-
addColumn
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
-
addFormula
public void addFormula(Formula formula)
-
hasFormula
public boolean hasFormula()
- Specified by:
hasFormula
in interfaceValue
-
getColumnSpan
public int getColumnSpan()
- Specified by:
getColumnSpan
in interfaceValue
-
getColumnIterator
public java.util.Iterator<Selectable> getColumnIterator()
- Specified by:
getColumnIterator
in interfaceValue
-
getConstraintColumns
public java.util.List getConstraintColumns()
-
getTypeName
public java.lang.String getTypeName()
-
setTypeName
public void setTypeName(java.lang.String typeName)
-
makeVersion
public void makeVersion()
-
isVersion
public boolean isVersion()
-
makeNationalized
public void makeNationalized()
-
isNationalized
public boolean isNationalized()
-
makeLob
public void makeLob()
-
isLob
public boolean isLob()
-
setTable
public void setTable(Table table)
-
createForeignKey
public void createForeignKey() throws MappingException
- Specified by:
createForeignKey
in interfaceValue
- Throws:
MappingException
-
createForeignKeyOfEntity
public void createForeignKeyOfEntity(java.lang.String entityName)
- Specified by:
createForeignKeyOfEntity
in interfaceKeyValue
-
createIdentifierGenerator
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, java.lang.String defaultCatalog, java.lang.String defaultSchema, RootClass rootClass) throws MappingException
- Specified by:
createIdentifierGenerator
in interfaceKeyValue
- Throws:
MappingException
-
isUpdateable
public boolean isUpdateable()
- Specified by:
isUpdateable
in interfaceKeyValue
-
getFetchMode
public FetchMode getFetchMode()
- Specified by:
getFetchMode
in interfaceValue
-
getIdentifierGeneratorProperties
public java.util.Properties getIdentifierGeneratorProperties()
-
getNullValue
public java.lang.String getNullValue()
- Specified by:
getNullValue
in interfaceKeyValue
-
getIdentifierGeneratorStrategy
public java.lang.String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.- Returns:
- String
-
isIdentityColumn
public boolean isIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect)
- Specified by:
isIdentityColumn
in interfaceKeyValue
-
setIdentifierGeneratorProperties
public void setIdentifierGeneratorProperties(java.util.Properties identifierGeneratorProperties)
Sets the identifierGeneratorProperties.- Parameters:
identifierGeneratorProperties
- The identifierGeneratorProperties to set
-
setIdentifierGeneratorStrategy
public void setIdentifierGeneratorStrategy(java.lang.String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.- Parameters:
identifierGeneratorStrategy
- The identifierGeneratorStrategy to set
-
setNullValue
public void setNullValue(java.lang.String nullValue)
Sets the nullValue.- Parameters:
nullValue
- The nullValue to set
-
getForeignKeyName
public java.lang.String getForeignKeyName()
-
setForeignKeyName
public void setForeignKeyName(java.lang.String foreignKeyName)
-
getForeignKeyDefinition
public java.lang.String getForeignKeyDefinition()
-
setForeignKeyDefinition
public void setForeignKeyDefinition(java.lang.String foreignKeyDefinition)
-
isAlternateUniqueKey
public boolean isAlternateUniqueKey()
- Specified by:
isAlternateUniqueKey
in interfaceValue
-
setAlternateUniqueKey
public void setAlternateUniqueKey(boolean unique)
-
isNullable
public boolean isNullable()
- Specified by:
isNullable
in interfaceValue
-
isSimpleValue
public boolean isSimpleValue()
- Specified by:
isSimpleValue
in interfaceValue
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValid
in interfaceValue
- Throws:
MappingException
-
getType
public Type getType() throws MappingException
- Specified by:
getType
in interfaceValue
- Throws:
MappingException
-
setTypeUsingReflection
public void setTypeUsingReflection(java.lang.String className, java.lang.String propertyName) throws MappingException
- Specified by:
setTypeUsingReflection
in interfaceValue
- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()
-
setTypeParameters
public void setTypeParameters(java.util.Properties parameterMap)
-
getTypeParameters
public java.util.Properties getTypeParameters()
-
copyTypeFrom
public void copyTypeFrom(SimpleValue sourceValue)
-
isSame
public boolean isSame(SimpleValue other)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
accept
public java.lang.Object accept(ValueVisitor visitor)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertability
in interfaceValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateability
in interfaceValue
-
setJpaAttributeConverterDescriptor
public void setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
-
-