Class AssociatedEntityQueryExecutor<T>
java.lang.Object
com.foreach.across.modules.entity.query.AssociatedEntityQueryExecutor<T>
Applies a default filter to an
EntityQuery
: scopes the query to all entities
of a given associated (linked to a parent entity).- Since:
- 2.0.0
- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorDescriptionAssociatedEntityQueryExecutor
(EntityPropertyDescriptor property, EntityQueryExecutor<T> entityQueryExecutor) -
Method Summary
Modifier and TypeMethodDescriptionprotected EntityQueryCondition
findAll
(Object parent, EntityQuery query) org.springframework.data.domain.Page<T>
findAll
(Object parent, EntityQuery query, org.springframework.data.domain.Pageable pageable) static AssociatedEntityQueryExecutor<?>
forBeanProperty
(EntityPropertyDescriptor property) Create a fixed query executor that does not support any parameters but will always return the value of the property on the parent entity.
-
Constructor Details
-
AssociatedEntityQueryExecutor
public AssociatedEntityQueryExecutor(EntityPropertyDescriptor property, EntityQueryExecutor<T> entityQueryExecutor)
-
-
Method Details
-
findAll
-
findAll
public org.springframework.data.domain.Page<T> findAll(Object parent, EntityQuery query, org.springframework.data.domain.Pageable pageable) -
buildEqualsOrContainsCondition
-
forBeanProperty
Create a fixed query executor that does not support any parameters but will always return the value of the property on the parent entity.- Parameters:
property
- on the parent that contains the result- Returns:
- items
-