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:
-
Field Summary
Fields -
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, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns) createForeignKeyOfEntity
(String entityName) createGenerator
(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, RootClass rootClass) 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[]
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated.not used and no longer supported.Deprecated.Returns the identifierGeneratorStrategy.The mapping to columns and formulas.getTable()
boolean
boolean
boolean
boolean
boolean
Deprecated.boolean
isColumnInsertable
(int index) boolean
isColumnUpdateable
(int index) boolean
boolean
boolean
isIdentityColumn
(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect) Deprecated.boolean
isLob()
boolean
boolean
boolean
boolean
isSame
(SimpleValue other) boolean
protected static boolean
boolean
boolean
boolean
boolean
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
setCascadeDeleteEnabled
(boolean cascadeDeleteEnabled) Deprecated.void
setCustomIdGeneratorCreator
(IdentifierGeneratorCreator customIdGeneratorCreator) void
setForeignKeyDefinition
(String foreignKeyDefinition) void
setForeignKeyName
(String foreignKeyName) void
setIdentifierGeneratorParameters
(Map<String, Object> identifierGeneratorParameters) void
setIdentifierGeneratorProperties
(Map<String, Object> identifierGeneratorProperties) Deprecated.void
setIdentifierGeneratorProperties
(Properties identifierGeneratorProperties) Deprecated.void
setIdentifierGeneratorStrategy
(String identifierGeneratorStrategy) Sets the identifierGeneratorStrategy.void
void
setNullValue
(String nullValue) Sets the nullValue.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.KeyValue
createIdentifierGenerator, createIdentifierGenerator
Methods inherited from interface org.hibernate.mapping.Value
checkColumnDuplication, copy, getConstraintColumns, getExtraCreateTableInfo, getSelectableType, getType, getVirtualSelectables
-
Field Details
-
DEFAULT_ID_GEN_STRATEGY
- 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
Deprecated.- Specified by:
isCascadeDeleteEnabled
in interfaceKeyValue
-
setCascadeDeleteEnabled
Deprecated. -
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
-
getConstraintColumnIterator
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSelectables()
instead -
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, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns) throws MappingException - Throws:
MappingException
-
createForeignKeyOfEntity
- Specified by:
createForeignKeyOfEntity
in interfaceKeyValue
-
createUniqueKey
- Specified by:
createUniqueKey
in interfaceValue
-
getIdentifierGenerator
Deprecated.not used and no longer supported.Returns the cachedIdentifierGenerator
, or null ifKeyValue.createIdentifierGenerator(IdentifierGeneratorFactory, Dialect, String, String, RootClass)
was never completed. -
setCustomIdGeneratorCreator
@Internal public void setCustomIdGeneratorCreator(IdentifierGeneratorCreator customIdGeneratorCreator) -
getCustomIdGeneratorCreator
-
createGenerator
public Generator createGenerator(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect, RootClass rootClass) throws MappingException - Specified by:
createGenerator
in interfaceKeyValue
- Throws:
MappingException
-
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateable
in interfaceKeyValue
-
getFetchMode
- Specified by:
getFetchMode
in interfaceValue
-
getTable
-
getIdentifierGeneratorStrategy
Returns the identifierGeneratorStrategy.- Returns:
- String
-
setIdentifierGeneratorStrategy
Sets the identifierGeneratorStrategy.- Parameters:
identifierGeneratorStrategy
- The identifierGeneratorStrategy to set
-
isIdentityColumn
@Deprecated public boolean isIdentityColumn(IdentifierGeneratorFactory identifierGeneratorFactory, Dialect dialect) Deprecated.- Specified by:
isIdentityColumn
in interfaceKeyValue
-
getIdentifierGeneratorParameters
-
setIdentifierGeneratorParameters
-
getIdentifierGeneratorProperties
Deprecated. -
setIdentifierGeneratorProperties
@Deprecated @Remove public void setIdentifierGeneratorProperties(Properties identifierGeneratorProperties) Deprecated. -
setIdentifierGeneratorProperties
@Deprecated @Remove public void setIdentifierGeneratorProperties(Map<String, Object> identifierGeneratorProperties) Deprecated. -
getNullValue
- Specified by:
getNullValue
in interfaceKeyValue
-
setNullValue
Sets the nullValue.- Parameters:
nullValue
- The nullValue to set
-
getForeignKeyName
-
setForeignKeyName
-
isForeignKeyEnabled
public boolean isForeignKeyEnabled() -
disableForeignKey
public void disableForeignKey() -
isConstrained
public boolean isConstrained() -
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
-
getSelectables()
instead