Interface TypeFieldResolver

All Known Implementing Classes:
CollectionFieldResolver, EntityFieldResolver, LazyEntityFieldResolver, OneToOneEagerFieldResolver, RegularFieldFieldResolver

public interface TypeFieldResolver
Interface for resolving custom injection values for fields of an entity class.

Implementations of this interface are responsible for determining if a given field of an entity class is appropriate for custom injection and preparing the value to be injected into the field.

  • Method Details

    • isAppropriate

      boolean isAppropriate(Field field)
      Determines if the resolver is appropriate for the given field.
      Parameters:
      field - the field to be evaluated for custom injection
      Returns:
      true if the resolver is appropriate for the given field, false otherwise
    • prepareValueForFieldInjection

      Object prepareValueForFieldInjection(Field field, ResultSet resultSet, Object entity, EntityPersistent entityPersistent)
      Prepares the value to be injected into the specified field of the entity.
      Parameters:
      field - the field to receive the injected value
      resultSet - the result set containing the data from which the value will be extracted
      entity - the entity object to which the field belongs
      entityPersistent - the persistent metadata associated with the entity
      Returns:
      the value to be injected into the field