Class ToOneRelationFieldResolver
java.lang.Object
io.github.blyznytsiaorg.bibernate.ddl.field.ToOneRelationFieldResolver
- All Implemented Interfaces:
FieldResolver
Resolves fields representing one-to-one or many-to-one relationships in entity columns.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
- See Also:
-
Field Summary
Fields inherited from interface io.github.blyznytsiaorg.bibernate.ddl.field.FieldResolver
CREATE_CONSTRAINT, DROP_CONSTRAINT, NAME_DATA_PATTERN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkIfRelationExists
(Class<?> entityClass, Class<?> fieldType, EntityMetadata metadataOfRelation) void
handleField
(DDLFieldMetadataHolder metadataHolder, Map<Integer, List<String>> ddlMetadata) Handles the resolution of the given entity column details by generating database type information and adding it to the list of column name and database type.boolean
hasFieldToResolve
(EntityColumnDetails entityColumnDetails) Determines if there is a field to resolve based on the provided entity column details.private void
processForeignKeyConstraint
(String foreignKey, Set<String> foreignNameConstraints, String tableName, EntityMetadata metadataOfRelation, String joinColumnName, Map<Integer, List<String>> ddlMetadata) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.blyznytsiaorg.bibernate.ddl.field.FieldResolver
checkForeignKeyName
-
Constructor Details
-
ToOneRelationFieldResolver
public ToOneRelationFieldResolver()
-
-
Method Details
-
hasFieldToResolve
Determines if there is a field to resolve based on the provided entity column details.- Specified by:
hasFieldToResolve
in interfaceFieldResolver
- Parameters:
entityColumnDetails
- The entity column details to check.- Returns:
- True if there is a field to resolve, false otherwise.
-
handleField
public void handleField(DDLFieldMetadataHolder metadataHolder, Map<Integer, List<String>> ddlMetadata) Handles the resolution of the given entity column details by generating database type information and adding it to the list of column name and database type.- Specified by:
handleField
in interfaceFieldResolver
- Parameters:
metadataHolder
- The holder containing metadata related to the field.ddlMetadata
- The map storing DDL metadata.
-
processForeignKeyConstraint
-
checkIfRelationExists
private void checkIfRelationExists(Class<?> entityClass, Class<?> fieldType, EntityMetadata metadataOfRelation)
-