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.NullValueSemanticField Summary
FieldsModifier and TypeFieldDescriptionstatic finalStringDeprecated, for removal: This API element is subject to removal in a future version.Constructor Summary
ConstructorsModifierConstructorDescriptionSimpleValue(MetadataBuildingContext buildingContext) SimpleValue(MetadataBuildingContext buildingContext,Table table) protectedSimpleValue(SimpleValue original) Method Summary
Modifier and TypeMethodDescriptionaccept(ValueVisitor visitor) voidvoidvoidaddFormula(Formula formula) voidcopyTypeFrom(SimpleValue sourceValue) voidvoidcreateForeignKey(PersistentClass referencedEntity,AnnotatedJoinColumns joinColumns) createForeignKeyOfEntity(String entityName) createForeignKeyOfEntity(String entityName,List<Column> referencedColumns) 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) voidcreateUniqueKey(MetadataBuildingContext context) voidprotectedConverterDescriptor<?,?> protectedSelectablegetColumn(int position) boolean[]If the mapping involves only columns, return them.intThe number of columns and formulas in the mapping.boolean[]ConverterDescriptor<?,?> 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()booleanbooleanbooleanbooleanbooleanbooleanisColumnInsertable(int index) booleanisColumnUpdateable(int index) booleanbooleanbooleanisLob()booleanbooleanbooleanbooleanisSame(SimpleValue other) booleanprotected static booleanbooleanbooleanbooleanbooleanisValid(MappingContext mappingContext) booleanprotected voidjustAddColumn(Column column) protected voidjustAddColumn(Column column, boolean insertable, boolean updatable) protected voidjustAddFormula(Formula formula) voidmakeLob()voidvoidvoidsetAlternateUniqueKey(boolean unique) protected voidsetAttributeConverterDescriptor(ConverterDescriptor descriptor) voidvoidsetCustomIdGeneratorCreator(GeneratorCreator customIdGeneratorCreator) voidsetForeignKeyDefinition(String foreignKeyDefinition) voidsetForeignKeyName(String foreignKeyName) voidsetForeignKeyOptions(String foreignKeyOptions) voidsetJpaAttributeConverterDescriptor(ConverterDescriptor<?, ?> descriptor) voidsetNullValue(String nullValue) Set the property or field value indicating that field or property has never been set.voidsetNullValueSemantic(KeyValue.NullValueSemantic nullValueSemantic) Specifies the rule for determining if the field or property has been set.voidSpecifies that there is no well-defined property or field value indicating that field or property has never been set.voidsetOnDeleteAction(OnDeleteAction onDeleteAction) voidsetPartitionKey(boolean partitionColumn) voidvoidsetTypeName(String typeName) voidsetTypeParameters(Map<String, ?> parameters) voidsetTypeParameters(Properties parameterMap) voidsetTypeUsingReflection(String className,String propertyName) voidsortColumns(int[] originalOrder) toString()Methods inherited from class java.lang.Object
clone,equals,finalize,getClass,hashCode,notify,notifyAll,wait,wait,waitMethods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication,copy,getConstraintColumns,getExtraCreateTableInfo,getSelectableType,getType,getVirtualSelectables
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:
getBuildingContextin interfaceValue
getMetadata
getServiceRegistry
- Specified by:
getServiceRegistryin interfaceValue
getTypeConfiguration
setOnDeleteAction
getOnDeleteAction
isCascadeDeleteEnabled
public boolean isCascadeDeleteEnabled()- Specified by:
isCascadeDeleteEnabledin interfaceKeyValue
addColumn
addColumn
addFormula
justAddColumn
justAddColumn
justAddFormula
sortColumns
public void sortColumns(int[] originalOrder) hasFormula
public boolean hasFormula()- Specified by:
hasFormulain interfaceValue
getColumnSpan
public int getColumnSpan()Description copied from interface:ValueThe number of columns and formulas in the mapping.- Specified by:
getColumnSpanin interfaceValue
getColumn
getSelectables
Description copied from interface:ValueThe mapping to columns and formulas.- Specified by:
getSelectablesin interfaceValue
getColumns
Description copied from interface:ValueIf the mapping involves only columns, return them.- Specified by:
getColumnsin 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:
createForeignKeyin interfaceValue- Throws:
MappingException
createForeignKey
public void createForeignKey(PersistentClass referencedEntity,AnnotatedJoinColumns joinColumns) throwsMappingException - Throws:
MappingException
createForeignKeyOfEntity
- Specified by:
createForeignKeyOfEntityin interfaceKeyValue
createForeignKeyOfEntity
- Specified by:
createForeignKeyOfEntityin interfaceKeyValue
createUniqueKey
- Specified by:
createUniqueKeyin 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:
createGeneratorin interfaceKeyValue
createGenerator
public Generator createGenerator(Dialect dialect,RootClass rootClass,Property property,GeneratorSettings defaults) - Specified by:
createGeneratorin interfaceKeyValue
setColumnToIdentity
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateablein interfaceKeyValue
getFetchMode
- Specified by:
getFetchModein interfaceValue
getTable
getNullValue
The property or field value which indicates that field or property has never been set.- Specified by:
getNullValuein interfaceKeyValue- See Also:
setNullValue
Set the property or field value indicating that field or property has never been set.getNullValueSemantic
The rule for determining if the field or property has been set.- Specified by:
getNullValueSemanticin 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:
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
- Specified by:
isValidin interfaceValue- Throws:
MappingException
setAttributeConverterDescriptor
getAttributeConverterDescriptor
setTypeUsingReflection
- Specified by:
setTypeUsingReflectionin interfaceValue- Throws:
MappingException
isTypeSpecified
public boolean isTypeSpecified()setTypeParameters
setTypeParameters
getTypeParameters
copyTypeFrom
isSame
isSame
isSame
toString
accept
getColumnInsertability
public boolean[] getColumnInsertability()- Specified by:
getColumnInsertabilityin interfaceValue
hasAnyInsertableColumns
public boolean hasAnyInsertableColumns()- Specified by:
hasAnyInsertableColumnsin interfaceValue
getColumnUpdateability
public boolean[] getColumnUpdateability()- Specified by:
getColumnUpdateabilityin interfaceValue
hasAnyUpdatableColumns
public boolean hasAnyUpdatableColumns()- Specified by:
hasAnyUpdatableColumnsin interfaceValue
isColumnInsertable
public boolean isColumnInsertable(int index) - Specified by:
isColumnInsertablein interfaceValue
isColumnUpdateable
public boolean isColumnUpdateable(int index) - Specified by:
isColumnUpdateablein interfaceValue
isPartitionKey
public boolean isPartitionKey()setPartitionKey
public void setPartitionKey(boolean partitionColumn) getJpaAttributeConverterDescriptor
setJpaAttributeConverterDescriptor
createParameterType