Interface FieldResolver

All Known Implementing Classes:
ManyToManyFieldResolver, NoRelationFieldResolver, ToOneRelationFieldResolver

public interface FieldResolver
The FieldResolver interface defines methods for resolving fields during DDL query creation.

Implementing classes must provide functionality to check if a field needs resolution and to handle the resolution process.

Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Field Details

  • Method Details

    • hasFieldToResolve

      boolean hasFieldToResolve(EntityColumnDetails entityColumnDetails)
      Determines whether the given entity column requires field resolution.
      Parameters:
      entityColumnDetails - the details of the entity column
      Returns:
      true if the field needs resolution, otherwise false
    • handleField

      void handleField(DDLFieldMetadataHolder metadataHolder, Map<Integer,List<String>> ddlMetadata)
      Handles the resolution of a field, generating and adding DDL queries to the metadata holder.
      Parameters:
      metadataHolder - the holder containing metadata for DDL query generation
      ddlMetadata - the metadata for DDL queries
    • checkForeignKeyName

      default void checkForeignKeyName(String foreignKeyName, Set<String> foreignNameConstraints)
      Checks if a foreign key name already exists in the set of foreign key constraints. If a duplicate name is found it throws a MappingException.
      Parameters:
      foreignKeyName - the name of the foreign key constraint to check
      foreignNameConstraints - the set of existing foreign key constraints
      Throws:
      MappingException - if a duplicate foreign key name is encountered