public class FetchingAllEntityJoinHandler<T> implements EntityJoinHandler<T>
interface EntityJoinHandler
implementation to fetch all fields (entity fields and nested fields included) with any Join Annotation.
Technically, it creates a LEFT JOIN FETCH
in JPQL.
Example: A
has a relationship with B
and B
has a relationship with C
.When we search for A
, we retrieve A
with data from B
and C
.
interface EntityJoinHandler
public FetchingAllEntityJoinHandler()
interface EntityJoinHandler
implementation to fetch all fields (entity fields and nested fields included) with any Join Annotation.
Technically, it creates a LEFT JOIN FETCH
in JPQL.
Example: A
has a relationship with B
and B
has a relationship with C
.When we search for A
, we retrieve A
with data from B
and C
.
interface EntityJoinHandler
public boolean supports(@NotNull java.lang.Class<?> entityClass, @NotNull java.lang.Class<?> fieldClass, @NotNull java.lang.String fieldName, @NotNull java.lang.annotation.Annotation joinAnnotation)
Checks if the given arguments are supported by this EntityJoinHandler.
@NotNull public JoinInfo handle(@NotNull java.lang.Class<?> entityClass, @NotNull java.lang.Class<?> fieldClass, @NotNull java.lang.String fieldName, @NotNull java.lang.annotation.Annotation joinAnnotation)
Handles the join type for the given arguments.
entityClass
- Class of the Entity beanfieldClass
- Class of the Field present on the EntityfieldName
- Name of the FieldjoinAnnotation
- Join Annotation present on the Entity Fieldclass JoinInfo