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
public abstract class SimpleValue extends Object implements KeyValue
A mapping model object that represents any value that maps to columns.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ID_GEN_STRATEGY
-
Constructor Summary
Constructors Modifier Constructor Description SimpleValue(MetadataBuildingContext buildingContext)
SimpleValue(MetadataBuildingContext buildingContext, Table table)
protected
SimpleValue(SimpleValue original)
-
Method Summary
-
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 Detail
-
DEFAULT_ID_GEN_STRATEGY
public static final String DEFAULT_ID_GEN_STRATEGY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext)
-
SimpleValue
public SimpleValue(MetadataBuildingContext buildingContext, Table table)
-
SimpleValue
protected SimpleValue(SimpleValue original)
-
-
Method Detail
-
getBuildingContext
public MetadataBuildingContext getBuildingContext()
- Specified by:
getBuildingContext
in interfaceValue
-
getMetadata
public MetadataImplementor getMetadata()
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
- Specified by:
getServiceRegistry
in interfaceValue
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
-
setOnDeleteAction
public void setOnDeleteAction(OnDeleteAction onDeleteAction)
-
getOnDeleteAction
public OnDeleteAction getOnDeleteAction()
-
isCascadeDeleteEnabled
@Deprecated(since="6.2") public boolean isCascadeDeleteEnabled()
Deprecated.- Specified by:
isCascadeDeleteEnabled
in interfaceKeyValue
-
setCascadeDeleteEnabled
@Deprecated(since="6.2") public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
Deprecated.
-
addColumn
public void addColumn(Column column)
-
addColumn
public void addColumn(Column column, boolean isInsertable, boolean isUpdatable)
-
addFormula
public void addFormula(Formula formula)
-
justAddColumn
protected void justAddColumn(Column column)
-
justAddColumn
protected void justAddColumn(Column column, boolean insertable, boolean updatable)
-
justAddFormula
protected void justAddFormula(Formula formula)
-
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
protected Selectable getColumn(int position)
-
getSelectables
public List<Selectable> getSelectables()
Description copied from interface:Value
The mapping to columns and formulas.- Specified by:
getSelectables
in interfaceValue
-
getColumns
public List<Column> getColumns()
Description copied from interface:Value
If the mapping involves only columns, return them.- Specified by:
getColumns
in interfaceValue
-
getConstraintColumnIterator
@Deprecated(forRemoval=true, since="6.3") public Iterator<Selectable> getConstraintColumnIterator()
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSelectables()
instead
-
getTypeName
public String getTypeName()
-
setTypeName
public void setTypeName(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
-
createForeignKey
public void createForeignKey(PersistentClass referencedEntity, AnnotatedJoinColumns joinColumns) throws MappingException
- Throws:
MappingException
-
createForeignKeyOfEntity
public ForeignKey createForeignKeyOfEntity(String entityName)
- Specified by:
createForeignKeyOfEntity
in interfaceKeyValue
-
createUniqueKey
public void createUniqueKey(MetadataBuildingContext context)
- Specified by:
createUniqueKey
in interfaceValue
-
setCustomIdGeneratorCreator
@Internal public void setCustomIdGeneratorCreator(IdentifierGeneratorCreator customIdGeneratorCreator)
-
getCustomIdGeneratorCreator
@Internal public IdentifierGeneratorCreator 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
public FetchMode getFetchMode()
- Specified by:
getFetchMode
in interfaceValue
-
getIdentifierGeneratorStrategy
public String getIdentifierGeneratorStrategy()
Returns the identifierGeneratorStrategy.- Returns:
- String
-
setIdentifierGeneratorStrategy
public void setIdentifierGeneratorStrategy(String identifierGeneratorStrategy)
Sets the identifierGeneratorStrategy.- Parameters:
identifierGeneratorStrategy
- The identifierGeneratorStrategy to set
-
setIdentifierGeneratorParameters
public void setIdentifierGeneratorParameters(Map<String,Object> identifierGeneratorParameters)
-
getIdentifierGeneratorProperties
@Deprecated @Remove public @Remove Properties getIdentifierGeneratorProperties()
Deprecated.
-
setIdentifierGeneratorProperties
@Deprecated @Remove public void setIdentifierGeneratorProperties(Properties identifierGeneratorProperties)
Deprecated.
-
setIdentifierGeneratorProperties
@Deprecated @Remove public void setIdentifierGeneratorProperties(Map<String,Object> identifierGeneratorProperties)
Deprecated.
-
getNullValue
public String getNullValue()
- Specified by:
getNullValue
in interfaceKeyValue
-
setNullValue
public void setNullValue(String nullValue)
Sets the nullValue.- Parameters:
nullValue
- The nullValue to set
-
getForeignKeyName
public String getForeignKeyName()
-
setForeignKeyName
public void setForeignKeyName(String foreignKeyName)
-
isForeignKeyEnabled
public boolean isForeignKeyEnabled()
-
disableForeignKey
public void disableForeignKey()
-
isConstrained
public boolean isConstrained()
-
getForeignKeyDefinition
public String getForeignKeyDefinition()
-
setForeignKeyDefinition
public void setForeignKeyDefinition(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
-
setAttributeConverterDescriptor
protected void setAttributeConverterDescriptor(ConverterDescriptor descriptor)
-
getAttributeConverterDescriptor
protected ConverterDescriptor getAttributeConverterDescriptor()
-
setTypeUsingReflection
public void setTypeUsingReflection(String className, String propertyName) throws MappingException
- Specified by:
setTypeUsingReflection
in interfaceValue
- Throws:
MappingException
-
isTypeSpecified
public boolean isTypeSpecified()
-
setTypeParameters
public void setTypeParameters(Properties parameterMap)
-
getTypeParameters
public Properties getTypeParameters()
-
copyTypeFrom
public void copyTypeFrom(SimpleValue sourceValue)
-
isSame
public boolean isSame(SimpleValue other)
-
accept
public Object accept(ValueVisitor visitor)
-
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
public ConverterDescriptor getJpaAttributeConverterDescriptor()
-
setJpaAttributeConverterDescriptor
public void setJpaAttributeConverterDescriptor(ConverterDescriptor descriptor)
-
createParameterImpl
protected void createParameterImpl()
-
makeParameterImpl
public DynamicParameterizedType.ParameterType makeParameterImpl()
-
-