Record Class EntityTableDescriptor
java.lang.Object
java.lang.Record
org.hibernate.action.queue.spi.meta.EntityTableDescriptor
- Record Components:
name- Table name from the mapping model.relativePosition- Position within the target's grouping of tables.columns- The columns contained on this table.attributes- The attributes mapped to this table.attributeColumnIndexes- A mapping of attribute to the indices (relative tocolumns()) for the columns that attribute maps to.
- All Implemented Interfaces:
Serializable, TableDescriptor
@Incubating
public record EntityTableDescriptor(String name, int relativePosition, boolean isIdentifierTable, boolean isOptional, boolean isInverse, boolean isSelfReferential, boolean hasUniqueConstraints, boolean cascadeDeleteEnabled, TableMapping.MutationDetails insertDetails, TableMapping.MutationDetails updateDetails, TableMapping.MutationDetails deleteDetails, List<ColumnDescriptor> columns, List<AttributeMapping> attributes, Map<AttributeMapping, List<Integer>> attributeColumnIndexes, TableKeyDescriptor keyDescriptor)
extends Record
implements TableDescriptor, Serializable
Immutable descriptor for a table involved in a mutation.
Provides metadata needed for mutation execution.
- Since:
- 8.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityTableDescriptor(String name, int relativePosition, boolean isIdentifierTable, boolean isOptional, boolean isInverse, boolean isSelfReferential, boolean hasUniqueConstraints, boolean cascadeDeleteEnabled, TableMapping.MutationDetails insertDetails, TableMapping.MutationDetails updateDetails, TableMapping.MutationDetails deleteDetails, List<ColumnDescriptor> columns, List<AttributeMapping> attributes, Map<AttributeMapping, List<Integer>> attributeColumnIndexes, TableKeyDescriptor keyDescriptor) Creates an instance of aEntityTableDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributeColumnIndexesrecord component.Returns the value of theattributesrecord component.booleanReturns the value of thecascadeDeleteEnabledrecord component.columns()Returns the value of thecolumnsrecord component.Returns the value of thedeleteDetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.findColumn(String columnName) Find column by name.findColumns(String... columnNames) Find columns by names.findColumns(Collection<String> columnNames) Find columns by names.voidforAllColumns(Consumer<ColumnDescriptor> consumer) voidforEachAttributeColumn(AttributeMapping attribute, Consumer<ColumnDescriptor> consumer) intThis table's relative position within its "table group".final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasUniqueConstraintsrecord component.Returns the value of theinsertDetailsrecord component.booleanReturns the value of theisIdentifierTablerecord component.booleanReturns the value of theisInverserecord component.booleanReturns the value of theisOptionalrecord component.booleanReturns the value of theisSelfReferentialrecord component.Returns the value of thekeyDescriptorrecord component.name()Returns the value of thenamerecord component.intReturns the value of therelativePositionrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateDetailsrecord component.
-
Constructor Details
-
EntityTableDescriptor
public EntityTableDescriptor(String name, int relativePosition, boolean isIdentifierTable, boolean isOptional, boolean isInverse, boolean isSelfReferential, boolean hasUniqueConstraints, boolean cascadeDeleteEnabled, TableMapping.MutationDetails insertDetails, TableMapping.MutationDetails updateDetails, TableMapping.MutationDetails deleteDetails, List<ColumnDescriptor> columns, List<AttributeMapping> attributes, Map<AttributeMapping, List<Integer>> attributeColumnIndexes, TableKeyDescriptor keyDescriptor) Creates an instance of aEntityTableDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentrelativePosition- the value for therelativePositionrecord componentisIdentifierTable- the value for theisIdentifierTablerecord componentisOptional- the value for theisOptionalrecord componentisInverse- the value for theisInverserecord componentisSelfReferential- the value for theisSelfReferentialrecord componenthasUniqueConstraints- the value for thehasUniqueConstraintsrecord componentcascadeDeleteEnabled- the value for thecascadeDeleteEnabledrecord componentinsertDetails- the value for theinsertDetailsrecord componentupdateDetails- the value for theupdateDetailsrecord componentdeleteDetails- the value for thedeleteDetailsrecord componentcolumns- the value for thecolumnsrecord componentattributes- the value for theattributesrecord componentattributeColumnIndexes- the value for theattributeColumnIndexesrecord componentkeyDescriptor- the value for thekeyDescriptorrecord component
-
-
Method Details
-
forEachAttributeColumn
-
forAllColumns
-
findColumn
Find column by name. Returns null if not found. -
findColumns
Find columns by names. Returns empty if none found. -
findColumns
Find columns by names. Returns empty if none found. -
getRelativePosition
public int getRelativePosition()Description copied from interface:TableDescriptorThis table's relative position within its "table group".- Specified by:
getRelativePositionin interfaceTableDescriptor
-
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
Returns the value of thenamerecord component.- Specified by:
namein interfaceTableDescriptor- Returns:
- the value of the
namerecord component
-
relativePosition
public int relativePosition()Returns the value of therelativePositionrecord component.- Returns:
- the value of the
relativePositionrecord component
-
isIdentifierTable
public boolean isIdentifierTable()Returns the value of theisIdentifierTablerecord component.- Returns:
- the value of the
isIdentifierTablerecord component
-
isOptional
public boolean isOptional()Returns the value of theisOptionalrecord component.- Specified by:
isOptionalin interfaceTableDescriptor- Returns:
- the value of the
isOptionalrecord component - See Also:
-
isInverse
public boolean isInverse()Returns the value of theisInverserecord component.- Returns:
- the value of the
isInverserecord component
-
isSelfReferential
public boolean isSelfReferential()Returns the value of theisSelfReferentialrecord component.- Specified by:
isSelfReferentialin interfaceTableDescriptor- Returns:
- the value of the
isSelfReferentialrecord component
-
hasUniqueConstraints
public boolean hasUniqueConstraints()Returns the value of thehasUniqueConstraintsrecord component.- Specified by:
hasUniqueConstraintsin interfaceTableDescriptor- Returns:
- the value of the
hasUniqueConstraintsrecord component
-
cascadeDeleteEnabled
public boolean cascadeDeleteEnabled()Returns the value of thecascadeDeleteEnabledrecord component.- Specified by:
cascadeDeleteEnabledin interfaceTableDescriptor- Returns:
- the value of the
cascadeDeleteEnabledrecord component
-
insertDetails
Returns the value of theinsertDetailsrecord component.- Specified by:
insertDetailsin interfaceTableDescriptor- Returns:
- the value of the
insertDetailsrecord component
-
updateDetails
Returns the value of theupdateDetailsrecord component.- Specified by:
updateDetailsin interfaceTableDescriptor- Returns:
- the value of the
updateDetailsrecord component
-
deleteDetails
Returns the value of thedeleteDetailsrecord component.- Specified by:
deleteDetailsin interfaceTableDescriptor- Returns:
- the value of the
deleteDetailsrecord component
-
columns
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-
attributeColumnIndexes
Returns the value of theattributeColumnIndexesrecord component.- Returns:
- the value of the
attributeColumnIndexesrecord component
-
keyDescriptor
Returns the value of thekeyDescriptorrecord component.- Specified by:
keyDescriptorin interfaceTableDescriptor- Returns:
- the value of the
keyDescriptorrecord component
-