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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
checkForeignKeyName
(String foreignKeyName, Set<String> foreignNameConstraints) Checks if a foreign key name already exists in the set of foreign key constraints.void
handleField
(DDLFieldMetadataHolder metadataHolder, Map<Integer, List<String>> ddlMetadata) Handles the resolution of a field, generating and adding DDL queries to the metadata holder.boolean
hasFieldToResolve
(EntityColumnDetails entityColumnDetails) Determines whether the given entity column requires field resolution.
-
Field Details
-
NAME_DATA_PATTERN
- See Also:
-
CREATE_CONSTRAINT
- See Also:
-
DROP_CONSTRAINT
- See Also:
-
-
Method Details
-
hasFieldToResolve
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
Handles the resolution of a field, generating and adding DDL queries to the metadata holder.- Parameters:
metadataHolder
- the holder containing metadata for DDL query generationddlMetadata
- the metadata for DDL queries
-
checkForeignKeyName
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 checkforeignNameConstraints
- the set of existing foreign key constraints- Throws:
MappingException
- if a duplicate foreign key name is encountered
-