Package org.hibernate.mapping
Class SimpleValue
java.lang.Object
org.hibernate.mapping.SimpleValue
- All Implemented Interfaces:
Serializable
,KeyValue
,Value
- Direct Known Subclasses:
Any
,Any.KeyValue
,Any.MetaValue
,BasicValue
,Component
,DependantValue
,ToOne
A mapping model object that represents any value that maps to columns.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.mapping.KeyValue
KeyValue.NullValueSemantic
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsModifierConstructorDescriptionSimpleValue
(MetadataBuildingContext buildingContext) SimpleValue
(MetadataBuildingContext buildingContext, Table table) protected
SimpleValue
(SimpleValue original) -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ValueVisitor visitor) void
void
void
addFormula
(Formula formula) void
copyTypeFrom
(SimpleValue sourceValue) void
void
createForeignKey
(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns) createForeignKeyOfEntity
(String entityName) createGenerator
(Dialect dialect, RootClass rootClass) Deprecated, for removal: This API element is subject to removal in a future version.createGenerator
(Dialect dialect, RootClass rootClass, Property property, GeneratorSettings defaults) protected void
void
createUniqueKey
(MetadataBuildingContext context) void
protected ConverterDescriptor
protected Selectable
getColumn
(int position) boolean[]
If the mapping involves only columns, return them.int
The number of columns and formulas in the mapping.boolean[]
The property or field value which indicates that field or property has never been set.The rule for determining if the field or property has been set.The mapping to columns and formulas.getTable()
boolean
boolean
boolean
boolean
boolean
boolean
isColumnInsertable
(int index) boolean
isColumnUpdateable
(int index) boolean
boolean
boolean
isLob()
boolean
boolean
boolean
boolean
isSame
(SimpleValue other) boolean
protected static boolean
boolean
boolean
boolean
boolean
isValid
(MappingContext mappingContext) boolean
protected void
justAddColumn
(Column column) protected void
justAddColumn
(Column column, boolean insertable, boolean updatable) protected void
justAddFormula
(Formula formula) void
makeLob()
void
void
void
setAlternateUniqueKey
(boolean unique) protected void
setAttributeConverterDescriptor
(ConverterDescriptor descriptor) void
void
setCustomIdGeneratorCreator
(GeneratorCreator customIdGeneratorCreator) void
setForeignKeyDefinition
(String foreignKeyDefinition) void
setForeignKeyName
(String foreignKeyName) void
setForeignKeyOptions
(String foreignKeyOptions) void
void
setNullValue
(String nullValue) Set the property or field value indicating that field or property has never been set.void
setNullValueSemantic
(KeyValue.NullValueSemantic nullValueSemantic) Specifies the rule for determining if the field or property has been set.void
Specifies that there is no well-defined property or field value indicating that field or property has never been set.void
setOnDeleteAction
(OnDeleteAction onDeleteAction) void
setPartitionKey
(boolean partitionColumn) void
void
setTypeName
(String typeName) void
setTypeParameters
(Map<String, ?> parameters) void
setTypeParameters
(Properties parameterMap) void
setTypeUsingReflection
(String className, String propertyName) void
sortColumns
(int[] originalOrder) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, copy, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getSelectableType, getType, getVirtualSelectables, isValid
-
Field Details
-
DEFAULT_ID_GEN_STRATEGY
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Constructor Details
-
SimpleValue
-
SimpleValue
-
SimpleValue
-
-
Method Details
-
getBuildingContext
- Specified by:
getBuildingContext
in interfaceValue
-
getMetadata
-
getServiceRegistry
- Specified by:
getServiceRegistry
in interfaceValue
-
getTypeConfiguration
-
setOnDeleteAction
-
getOnDeleteAction
-
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()- Specified by:
isCascadeDeleteEnabled
in interfaceKeyValue
-
addColumn
-
addColumn
-
addFormula
-
justAddColumn
-
justAddColumn
-
justAddFormula
-
sortColumns
public void sortColumns(int[] originalOrder) -
hasFormula
public boolean hasFormula()- Specified by:
hasFormula
in interfaceValue
-
getColumnSpan
public int getColumnSpan()Description copied from interface:Value
The number of columns and formulas in the mapping.- Specified by:
getColumnSpan
in interfaceValue
-
getColumn
-
getSelectables
Description copied from interface:Value
The mapping to columns and formulas.- Specified by:
getSelectables
in interfaceValue
-
getColumns
Description copied from interface:Value
If the mapping involves only columns, return them.- Specified by:
getColumns
in interfaceValue
-
getTypeName
-
setTypeName
-
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
-
createForeignKey
- Specified by:
createForeignKey
in interfaceValue
- Throws:
MappingException
-
createForeignKey
public void createForeignKey(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns) throws MappingException - Throws:
MappingException
-
createForeignKeyOfEntity
- Specified by:
createForeignKeyOfEntity
in interfaceKeyValue
-
createUniqueKey
- Specified by:
createUniqueKey
in interfaceValue
-
setCustomIdGeneratorCreator
-
getCustomIdGeneratorCreator
-
createGenerator
@Deprecated(since="7.0", forRemoval=true) public Generator createGenerator(Dialect dialect, RootClass rootClass) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
createGenerator
in interfaceKeyValue
-
createGenerator
public Generator createGenerator(Dialect dialect, RootClass rootClass, Property property, GeneratorSettings defaults) - Specified by:
createGenerator
in interfaceKeyValue
-
setColumnToIdentity
-
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateable
in interfaceKeyValue
-
getFetchMode
- Specified by:
getFetchMode
in interfaceValue
-
getTable
-
getNullValue
The property or field value which indicates that field or property has never been set.- Specified by:
getNullValue
in interfaceKeyValue
- See Also:
-
setNullValue
Set the property or field value indicating that field or property has never been set.- See Also:
-
getNullValueSemantic
The rule for determining if the field or property has been set.- Specified by:
getNullValueSemantic
in interfaceKeyValue
- See Also:
-
setNullValueSemantic
Specifies the rule for determining if the field or property has been set.- See Also:
-
setNullValueUndefined
public void setNullValueUndefined()Specifies that there is no well-defined property or field value indicating that field or property has never been set. -
getForeignKeyName
-
setForeignKeyName
-
isForeignKeyEnabled
public boolean isForeignKeyEnabled() -
disableForeignKey
public void disableForeignKey() -
isConstrained
public boolean isConstrained() -
getForeignKeyOptions
-
setForeignKeyOptions
-
getForeignKeyDefinition
-
setForeignKeyDefinition
-
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
- Specified by:
isValid
in interfaceValue
- Throws:
MappingException
-
setAttributeConverterDescriptor
-
getAttributeConverterDescriptor
-
setTypeUsingReflection
- Specified by:
setTypeUsingReflection
in interfaceValue
- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified() -
setTypeParameters
-
setTypeParameters
-
getTypeParameters
-
copyTypeFrom
-
isSame
-
isSame
-
isSame
-
toString
-
accept
-
getColumnInsertability
public boolean[] getColumnInsertability()- Specified by:
getColumnInsertability
in interfaceValue
-
hasAnyInsertableColumns
public boolean hasAnyInsertableColumns()- Specified by:
hasAnyInsertableColumns
in interfaceValue
-
getColumnUpdateability
public boolean[] getColumnUpdateability()- Specified by:
getColumnUpdateability
in interfaceValue
-
hasAnyUpdatableColumns
public boolean hasAnyUpdatableColumns()- Specified by:
hasAnyUpdatableColumns
in interfaceValue
-
isColumnInsertable
public boolean isColumnInsertable(int index) - Specified by:
isColumnInsertable
in interfaceValue
-
isColumnUpdateable
public boolean isColumnUpdateable(int index) - Specified by:
isColumnUpdateable
in interfaceValue
-
isPartitionKey
public boolean isPartitionKey() -
setPartitionKey
public void setPartitionKey(boolean partitionColumn) -
getJpaAttributeConverterDescriptor
-
setJpaAttributeConverterDescriptor
-
createParameterImpl
protected void createParameterImpl() -
makeParameterImpl
-