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 Summary
Modifier and TypeMethodDescriptionboolean
isAppropriate
(Field field) Determines if the resolver is appropriate for the given field.prepareValueForFieldInjection
(Field field, ResultSet resultSet, Object entity, EntityPersistent entityPersistent) Prepares the value to be injected into the specified field of the entity.
-
Method Details
-
isAppropriate
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 valueresultSet
- the result set containing the data from which the value will be extractedentity
- the entity object to which the field belongsentityPersistent
- the persistent metadata associated with the entity- Returns:
- the value to be injected into the field
-