Interface FindStaticAttribute


public interface FindStaticAttribute
Interface defining methods to locate and validate static attributes within DynO objects.

This interface provides functionality to find static attribute names and fields from various contexts including mapping contexts, type maps, and DynO objects. It helps in resolving attribute references during object mapping and validation operations.

  • Method Details

    • findStaticAttributeNameFromMappingContext

      String findStaticAttributeNameFromMappingContext(MappingContext<?,?> context, String fieldName)
      Finds a static attribute name from a ModelMapper mapping context.

      This method extracts the static attribute name corresponding to the given field name from the provided mapping context.

      Parameters:
      context - the ModelMapper mapping context containing source and destination information
      fieldName - the field name to find the corresponding static attribute for
      Returns:
      the name of the static attribute, or null if not found
    • findStaticAttributeNameFromMapping

      String findStaticAttributeNameFromMapping(TypeMap<?,?> typeMap, String fieldName)
      Finds a static attribute name from a ModelMapper type map.

      This method extracts the static attribute name corresponding to the given field name from the provided type map.

      Parameters:
      typeMap - the ModelMapper type map containing mapping definitions
      fieldName - the field name to find the corresponding static attribute for
      Returns:
      the name of the static attribute, or null if not found
    • findStaticAttributeNameFromDynO

      String findStaticAttributeNameFromDynO(DynO sourceDynO, String fieldName)
      Finds a static attribute name from a DynO object.

      This method extracts the static attribute name corresponding to the given field name from the provided DynO object.

      Parameters:
      sourceDynO - the DynO object to search within
      fieldName - the field name to find the corresponding static attribute for
      Returns:
      the name of the static attribute, or null if not found
    • findStaticAttributeFieldFromDynOClass

      Field findStaticAttributeFieldFromDynOClass(Class<? extends DynO> clazz, String fieldName)
      Finds a static attribute field from a DynO class.

      This method locates the Field object corresponding to the given field name within the specified DynO class.

      Parameters:
      clazz - the DynO class to search within
      fieldName - the name of the field to find
      Returns:
      the Field object representing the static attribute, or null if not found
    • checkIfFieldExists

      boolean checkIfFieldExists(DynO dynO, String fieldName)
      Checks if a field exists in a DynO object.

      This method verifies whether the specified field name corresponds to an existing field within the provided DynO object.

      Parameters:
      dynO - the DynO object to check
      fieldName - the name of the field to check for existence
      Returns:
      true if the field exists, false otherwise