Class JPASearchExecutor
java.lang.Object
com.peterphi.std.guice.hibernate.webquery.impl.jpa.JPASearchExecutor
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
If true, will treat all WebQuery instances as if they had set computeSize to true
This is mainly present to allow unit tests to check that computeSize works with various different WebQuery calls without having to duplicate -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> ConstrainedResultSet<T>
find
(QEntity entity, WebQuery query, JPASearchStrategy strategy, Function<?, ?> serialiser) Execute a search, returning a ConstrainedResultSet populated with the desired data (ID or Entity) with each piece of data optionally serialised using the supplied serialiser
-
Field Details
-
ALWAYS_COMPUTE_SIZE
public static boolean ALWAYS_COMPUTE_SIZEIf true, will treat all WebQuery instances as if they had set computeSize to true
This is mainly present to allow unit tests to check that computeSize works with various different WebQuery calls without having to duplicate
-
-
Constructor Details
-
JPASearchExecutor
public JPASearchExecutor()
-
-
Method Details
-
find
public <T> ConstrainedResultSet<T> find(QEntity entity, WebQuery query, JPASearchStrategy strategy, Function<?, ?> serialiser) Execute a search, returning a ConstrainedResultSet populated with the desired data (ID or Entity) with each piece of data optionally serialised using the supplied serialiser- Type Parameters:
T
-- Parameters:
query
- the query to execute (including options like offset/limit, )strategy
-serialiser
-- Returns:
-