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.StringDEFAULT_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.Objectaccept(ValueVisitor visitor)voidaddColumn(Column column)voidaddColumn(Column column, boolean isInsertable, boolean isUpdatable)voidaddFormula(Formula formula)voidcopyTypeFrom(SimpleValue sourceValue)voidcreateForeignKey()voidcreateForeignKeyOfEntity(java.lang.String entityName)IdentifierGeneratorcreateIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, java.lang.String defaultCatalog, java.lang.String defaultSchema, RootClass rootClass)boolean[]getColumnInsertability()java.util.Iterator<Selectable>getColumnIterator()intgetColumnSpan()boolean[]getColumnUpdateability()java.util.ListgetConstraintColumns()FetchModegetFetchMode()java.lang.StringgetForeignKeyDefinition()java.lang.StringgetForeignKeyName()java.util.PropertiesgetIdentifierGeneratorProperties()java.lang.StringgetIdentifierGeneratorStrategy()Returns the identifierGeneratorStrategy.MetadataImplementorgetMetadata()java.lang.StringgetNullValue()ServiceRegistrygetServiceRegistry()TablegetTable()TypegetType()java.lang.StringgetTypeName()java.util.PropertiesgetTypeParameters()booleanhasFormula()booleanisAlternateUniqueKey()booleanisCascadeDeleteEnabled()booleanisIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect)booleanisLob()booleanisNationalized()booleanisNullable()booleanisSame(SimpleValue other)booleanisSame(Value other)protected static booleanisSame(Value v1, Value v2)booleanisSimpleValue()booleanisTypeSpecified()booleanisUpdateable()booleanisValid(Mapping mapping)booleanisVersion()voidmakeLob()voidmakeNationalized()voidmakeVersion()voidsetAlternateUniqueKey(boolean unique)voidsetCascadeDeleteEnabled(boolean cascadeDeleteEnabled)voidsetForeignKeyDefinition(java.lang.String foreignKeyDefinition)voidsetForeignKeyName(java.lang.String foreignKeyName)voidsetIdentifierGeneratorProperties(java.util.Properties identifierGeneratorProperties)Sets the identifierGeneratorProperties.voidsetIdentifierGeneratorStrategy(java.lang.String identifierGeneratorStrategy)Sets the identifierGeneratorStrategy.voidsetJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)voidsetNullValue(java.lang.String nullValue)Sets the nullValue.voidsetTable(Table table)voidsetTypeName(java.lang.String typeName)voidsetTypeParameters(java.util.Properties parameterMap)voidsetTypeUsingReflection(java.lang.String className, java.lang.String propertyName)java.lang.StringtoString()
-
-
-
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:
getServiceRegistryin interfaceValue
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()
- Specified by:
isCascadeDeleteEnabledin 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:
hasFormulain interfaceValue
-
getColumnSpan
public int getColumnSpan()
- Specified by:
getColumnSpanin interfaceValue
-
getColumnIterator
public java.util.Iterator<Selectable> getColumnIterator()
- Specified by:
getColumnIteratorin 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:
createForeignKeyin interfaceValue- Throws:
MappingException
-
createForeignKeyOfEntity
public void createForeignKeyOfEntity(java.lang.String entityName)
- Specified by:
createForeignKeyOfEntityin interfaceKeyValue
-
createIdentifierGenerator
public IdentifierGenerator createIdentifierGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, java.lang.String defaultCatalog, java.lang.String defaultSchema, RootClass rootClass) throws MappingException
- Specified by:
createIdentifierGeneratorin interfaceKeyValue- Throws:
MappingException
-
isUpdateable
public boolean isUpdateable()
- Specified by:
isUpdateablein interfaceKeyValue
-
getFetchMode
public FetchMode getFetchMode()
- Specified by:
getFetchModein interfaceValue
-
getIdentifierGeneratorProperties
public java.util.Properties getIdentifierGeneratorProperties()
-
getNullValue
public java.lang.String getNullValue()
- Specified by:
getNullValuein interfaceKeyValue
-
getIdentifierGeneratorStrategy
public java.lang.String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.- Returns:
- String
-
isIdentityColumn
public boolean isIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect)
- Specified by:
isIdentityColumnin 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:
isAlternateUniqueKeyin interfaceValue
-
setAlternateUniqueKey
public void setAlternateUniqueKey(boolean unique)
-
isNullable
public boolean isNullable()
- Specified by:
isNullablein interfaceValue
-
isSimpleValue
public boolean isSimpleValue()
- Specified by:
isSimpleValuein interfaceValue
-
isValid
public boolean isValid(Mapping mapping) throws MappingException
- Specified by:
isValidin interfaceValue- Throws:
MappingException
-
getType
public Type getType() throws MappingException
- Specified by:
getTypein interfaceValue- Throws:
MappingException
-
setTypeUsingReflection
public void setTypeUsingReflection(java.lang.String className, java.lang.String propertyName) throws MappingException- Specified by:
setTypeUsingReflectionin 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:
toStringin classjava.lang.Object
-
accept
public java.lang.Object accept(ValueVisitor visitor)
-
getColumnInsertability
public boolean[] getColumnInsertability()
- Specified by:
getColumnInsertabilityin interfaceValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()
- Specified by:
getColumnUpdateabilityin interfaceValue
-
setJpaAttributeConverterDescriptor
public void setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
-
-