Record Class ForeignKeyMetadataPolicy
java.lang.Object
java.lang.Record
org.hibernate.tool.schema.extract.spi.ForeignKeyMetadataPolicy
@SPI(USE)
public record ForeignKeyMetadataPolicy(ForeignKeyMetadataPolicy.Mode mode, @Nullable String crossReferenceParentTableFilter)
extends Record
Selects the JDBC metadata calls used for per-table foreign-key discovery.
Use importedKeysOnly() for the portable JDBC path. Use
importedKeysAndCrossReference(String) only when the driver requires
cross-reference rows to complete imported-key metadata, preserving the
parent-table filter exactly as required by that driver.
- Since:
- 8.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumJDBC foreign-key metadata modes. -
Constructor Summary
ConstructorsConstructorDescriptionForeignKeyMetadataPolicy(ForeignKeyMetadataPolicy.Mode mode, String crossReferenceParentTableFilter) Creates an instance of aForeignKeyMetadataPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecrossReferenceParentTableFilterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ForeignKeyMetadataPolicyimportedKeysAndCrossReference(String parentTableFilter) Return a policy which supplements imported keys with cross-reference rows.static ForeignKeyMetadataPolicyReturn the stable portable imported-keys-only policy.mode()Returns the value of themoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ForeignKeyMetadataPolicy
public ForeignKeyMetadataPolicy(ForeignKeyMetadataPolicy.Mode mode, @Nullable String crossReferenceParentTableFilter) Creates an instance of aForeignKeyMetadataPolicyrecord class.- Parameters:
mode- the value for themoderecord componentcrossReferenceParentTableFilter- the value for thecrossReferenceParentTableFilterrecord component
-
-
Method Details
-
importedKeysOnly
Return the stable portable imported-keys-only policy. -
importedKeysAndCrossReference
public static ForeignKeyMetadataPolicy importedKeysAndCrossReference(@Nullable String parentTableFilter) Return a policy which supplements imported keys with cross-reference rows. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
crossReferenceParentTableFilter
-