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:
  • Field Details

  • Constructor Details

  • Method Details

    • getBuildingContext

      public MetadataBuildingContext getBuildingContext()
      Specified by:
      getBuildingContext in interface Value
    • getMetadata

      public MetadataImplementor getMetadata()
    • getServiceRegistry

      public ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in interface Value
    • getTypeConfiguration

      public TypeConfiguration getTypeConfiguration()
    • setOnDeleteAction

      public void setOnDeleteAction(OnDeleteAction onDeleteAction)
    • getOnDeleteAction

      public OnDeleteAction getOnDeleteAction()
    • isCascadeDeleteEnabled

      public boolean isCascadeDeleteEnabled()
      Specified by:
      isCascadeDeleteEnabled in interface KeyValue
    • 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 interface Value
    • getColumnSpan

      public int getColumnSpan()
      Description copied from interface: Value
      The number of columns and formulas in the mapping.
      Specified by:
      getColumnSpan in interface Value
    • 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 interface Value
    • getColumns

      public List<Column> getColumns()
      Description copied from interface: Value
      If the mapping involves only columns, return them.
      Specified by:
      getColumns in interface Value
    • 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 interface Value
      Throws:
      MappingException
    • createForeignKey

      public void createForeignKey(PersistentClass referencedEntity, org.hibernate.boot.model.internal.AnnotatedJoinColumns joinColumns) throws MappingException
      Throws:
      MappingException
    • createForeignKeyOfEntity

      public ForeignKey createForeignKeyOfEntity(String entityName)
      Specified by:
      createForeignKeyOfEntity in interface KeyValue
    • createUniqueKey

      public void createUniqueKey(MetadataBuildingContext context)
      Specified by:
      createUniqueKey in interface Value
    • setCustomIdGeneratorCreator

      @Internal public void setCustomIdGeneratorCreator(GeneratorCreator customIdGeneratorCreator)
    • getCustomIdGeneratorCreator

      @Internal public GeneratorCreator 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 interface KeyValue
    • createGenerator

      public Generator createGenerator(Dialect dialect, RootClass rootClass, Property property, GeneratorSettings defaults)
      Specified by:
      createGenerator in interface KeyValue
    • setColumnToIdentity

      @Internal public void setColumnToIdentity()
    • isUpdateable

      public boolean isUpdateable()
      Specified by:
      isUpdateable in interface KeyValue
    • getFetchMode

      public FetchMode getFetchMode()
      Specified by:
      getFetchMode in interface Value
    • getTable

      public Table getTable()
      Specified by:
      getTable in interface Value
    • getNullValue

      public String getNullValue()
      The property or field value which indicates that field or property has never been set.
      Specified by:
      getNullValue in interface KeyValue
      See Also:
    • setNullValue

      public void setNullValue(String nullValue)
      Set the property or field value indicating that field or property has never been set.
      See Also:
    • getNullValueSemantic

      public KeyValue.NullValueSemantic getNullValueSemantic()
      The rule for determining if the field or property has been set.
      Specified by:
      getNullValueSemantic in interface KeyValue
      See Also:
      • UnsavedValueFactory
    • setNullValueSemantic

      public void setNullValueSemantic(KeyValue.NullValueSemantic nullValueSemantic)
      Specifies the rule for determining if the field or property has been set.
      See Also:
      • UnsavedValueFactory
    • setNullValueUndefined

      public void setNullValueUndefined()
      Specifies that there is no well-defined property or field value indicating that field or property has never been set.
      See Also:
    • getForeignKeyName

      public String getForeignKeyName()
    • setForeignKeyName

      public void setForeignKeyName(String foreignKeyName)
    • isForeignKeyEnabled

      public boolean isForeignKeyEnabled()
    • disableForeignKey

      public void disableForeignKey()
    • isConstrained

      public boolean isConstrained()
    • getForeignKeyOptions

      public String getForeignKeyOptions()
    • setForeignKeyOptions

      public void setForeignKeyOptions(String foreignKeyOptions)
    • getForeignKeyDefinition

      public String getForeignKeyDefinition()
    • setForeignKeyDefinition

      public void setForeignKeyDefinition(String foreignKeyDefinition)
    • isAlternateUniqueKey

      public boolean isAlternateUniqueKey()
      Specified by:
      isAlternateUniqueKey in interface Value
    • setAlternateUniqueKey

      public void setAlternateUniqueKey(boolean unique)
    • isNullable

      public boolean isNullable()
      Specified by:
      isNullable in interface Value
    • isSimpleValue

      public boolean isSimpleValue()
      Specified by:
      isSimpleValue in interface Value
    • isValid

      public boolean isValid(MappingContext mappingContext) throws MappingException
      Specified by:
      isValid in interface Value
      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 interface Value
      Throws:
      MappingException
    • isTypeSpecified

      public boolean isTypeSpecified()
    • setTypeParameters

      public void setTypeParameters(Properties parameterMap)
    • setTypeParameters

      public void setTypeParameters(Map<String,?> parameters)
    • getTypeParameters

      public Properties getTypeParameters()
    • copyTypeFrom

      public void copyTypeFrom(SimpleValue sourceValue)
    • isSame

      public boolean isSame(Value other)
      Specified by:
      isSame in interface Value
    • isSame

      protected static boolean isSame(Value v1, Value v2)
    • isSame

      public boolean isSame(SimpleValue other)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accept

      public Object accept(ValueVisitor visitor)
      Specified by:
      accept in interface Value
    • getColumnInsertability

      public boolean[] getColumnInsertability()
      Specified by:
      getColumnInsertability in interface Value
    • hasAnyInsertableColumns

      public boolean hasAnyInsertableColumns()
      Specified by:
      hasAnyInsertableColumns in interface Value
    • getColumnUpdateability

      public boolean[] getColumnUpdateability()
      Specified by:
      getColumnUpdateability in interface Value
    • hasAnyUpdatableColumns

      public boolean hasAnyUpdatableColumns()
      Specified by:
      hasAnyUpdatableColumns in interface Value
    • isColumnInsertable

      public boolean isColumnInsertable(int index)
      Specified by:
      isColumnInsertable in interface Value
    • isColumnUpdateable

      public boolean isColumnUpdateable(int index)
      Specified by:
      isColumnUpdateable in interface Value
    • isPartitionKey

      public boolean isPartitionKey()
    • setPartitionKey

      public void setPartitionKey(boolean partitionColumn)
    • getJpaAttributeConverterDescriptor

      public ConverterDescriptor<?,?> getJpaAttributeConverterDescriptor()
    • setJpaAttributeConverterDescriptor

      public void setJpaAttributeConverterDescriptor(ConverterDescriptor<?,?> descriptor)
    • createParameterType

      protected DynamicParameterizedType.ParameterType createParameterType()