Record Class ColumnDescriptor
java.lang.Object
java.lang.Record
org.hibernate.action.queue.spi.meta.ColumnDescriptor
- Record Components:
name- Column name from the mapping model.selectionExpression- The SQL selection expression for this column.tableName- Table name containing this column.jdbcMapping- Details about the JDBC type of the column.
- All Implemented Interfaces:
Serializable, SelectableMapping, SqlTypedMapping
@Incubating
public record ColumnDescriptor(String name, String selectionExpression, String tableName, JdbcMapping jdbcMapping, String writeFragment, boolean isFormula, boolean nullable, boolean insertable, boolean updatable, boolean isPartitioned)
extends Record
implements SelectableMapping, Serializable
Immutable descriptor for a column involved in a mutation.
Extends existing ColumnDetails with additional mutation context.
- Since:
- 8.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionColumnDescriptor(String name, String selectionExpression, String tableName, JdbcMapping jdbcMapping, String writeFragment, boolean isFormula, boolean nullable, boolean insertable, boolean updatable, boolean isPartitioned) Creates an instance of aColumnDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateValueDescriptor(ParameterUsage parameterUsage, int parameterIndex) final booleanIndicates whether some other object is "equal to" this one.static ColumnDescriptorfrom(SelectableMapping selectable) The name of the table to which this selectable is mappedThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()The selection's write expression accountingColumnTransformer.write()getScale()The selection's expression.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinsertablerecord component.booleanReturns the value of theisFormularecord component.booleanbooleanIs the mapping considered nullable?booleanReturns the value of theisPartitionedrecord component.booleanReturns the value of thejdbcMappingrecord component.name()Returns the value of thenamerecord component.booleannullable()Returns the value of thenullablerecord component.Returns the value of theselectionExpressionrecord component.Returns the value of thetableNamerecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theupdatablerecord component.Returns the value of thewriteFragmentrecord component.Methods inherited from interface SelectableMapping
getSelectablePath, getWriteExpressionMethods inherited from interface SqlTypedMapping
isLob, toSize
-
Constructor Details
-
ColumnDescriptor
public ColumnDescriptor(String name, String selectionExpression, String tableName, JdbcMapping jdbcMapping, String writeFragment, boolean isFormula, boolean nullable, boolean insertable, boolean updatable, boolean isPartitioned) Creates an instance of aColumnDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentselectionExpression- the value for theselectionExpressionrecord componenttableName- the value for thetableNamerecord componentjdbcMapping- the value for thejdbcMappingrecord componentwriteFragment- the value for thewriteFragmentrecord componentisFormula- the value for theisFormularecord componentnullable- the value for thenullablerecord componentinsertable- the value for theinsertablerecord componentupdatable- the value for theupdatablerecord componentisPartitioned- the value for theisPartitionedrecord component
-
-
Method Details
-
from
-
createValueDescriptor
-
getContainingTableExpression
Description copied from interface:SelectableMappingThe name of the table to which this selectable is mapped- Specified by:
getContainingTableExpressionin interfaceSelectableMapping
-
getSelectionExpression
Description copied from interface:SelectableMappingThe selection's expression. This is the column name or formula- Specified by:
getSelectionExpressionin interfaceSelectableMapping
-
getSelectableName
- Specified by:
getSelectableNamein interfaceSelectableMapping
-
getCustomReadExpression
Description copied from interface:SelectableMappingThe selection's read expression accounting for formula treatment as well asColumnTransformer.read()- Specified by:
getCustomReadExpressionin interfaceSelectableMapping
-
getCustomWriteExpression
Description copied from interface:SelectableMappingThe selection's write expression accountingColumnTransformer.write()- Specified by:
getCustomWriteExpressionin interfaceSelectableMapping
-
isNullable
public boolean isNullable()Description copied from interface:SelectableMappingIs the mapping considered nullable?- Specified by:
isNullablein interfaceSelectableMapping
-
isInsertable
public boolean isInsertable()- Specified by:
isInsertablein interfaceSelectableMapping
-
isUpdateable
public boolean isUpdateable()- Specified by:
isUpdateablein interfaceSelectableMapping
-
getLength
- Specified by:
getLengthin interfaceSqlTypedMapping
-
getArrayLength
- Specified by:
getArrayLengthin interfaceSqlTypedMapping
-
getPrecision
- Specified by:
getPrecisionin interfaceSqlTypedMapping
-
getScale
- Specified by:
getScalein interfaceSqlTypedMapping
-
getTemporalPrecision
- Specified by:
getTemporalPrecisionin interfaceSqlTypedMapping
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceSqlTypedMapping
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
selectionExpression
Returns the value of theselectionExpressionrecord component.- Returns:
- the value of the
selectionExpressionrecord component
-
tableName
-
jdbcMapping
Returns the value of thejdbcMappingrecord component.- Returns:
- the value of the
jdbcMappingrecord component
-
writeFragment
Returns the value of thewriteFragmentrecord component.- Returns:
- the value of the
writeFragmentrecord component
-
isFormula
public boolean isFormula()Returns the value of theisFormularecord component.- Specified by:
isFormulain interfaceSelectableMapping- Returns:
- the value of the
isFormularecord component
-
nullable
public boolean nullable()Returns the value of thenullablerecord component.- Returns:
- the value of the
nullablerecord component
-
insertable
public boolean insertable()Returns the value of theinsertablerecord component.- Returns:
- the value of the
insertablerecord component
-
updatable
public boolean updatable()Returns the value of theupdatablerecord component.- Returns:
- the value of the
updatablerecord component
-
isPartitioned
public boolean isPartitioned()Returns the value of theisPartitionedrecord component.- Specified by:
isPartitionedin interfaceSelectableMapping- Returns:
- the value of the
isPartitionedrecord component
-