Enum Class JPASearchStrategy
java.lang.Object
java.lang.Enum<JPASearchStrategy>
com.peterphi.std.guice.hibernate.webquery.impl.jpa.JPASearchStrategy
- All Implemented Interfaces:
Serializable
,Comparable<JPASearchStrategy>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRun the query, returning a sorted list of entities that match.Run a query that returns a count of the number of results (the same as count on ID)Run a query that returns a custom projection based on the fetch value of the WebQuery
The result from the database will be an Object[] with the first few elements the same as fetch.Run the query, returning a sorted list of entities that matchRun the query, returning a sorted list of entities having only the ID field(s) populatedRun the query, returning a sorted list of IDs that matchRun an ID query, then run a query to fetch back all the entity data for those IDs -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this strategy will output full entities at the end of the processstatic JPASearchStrategy
Returns the enum constant of this class with the specified name.static JPASearchStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Run the query, returning a sorted list of entities that match. The actual underlying strategy may change betweenENTITY
andID_THEN_QUERY_ENTITY
depending on the query and entity configuration -
ID
Run the query, returning a sorted list of IDs that match -
ENTITY
Run the query, returning a sorted list of entities that match -
ENTITY_WRAPPED_ID
Run the query, returning a sorted list of entities having only the ID field(s) populated -
ID_THEN_QUERY_ENTITY
Run an ID query, then run a query to fetch back all the entity data for those IDs -
CUSTOM_PROJECTION
Run a query that returns a custom projection based on the fetch value of the WebQuery
The result from the database will be an Object[] with the first few elements the same as fetch. N.B. the Object[] may be larger than the number of fetched columns (if, for example, the system had to add selections to satisfy SQL limitations - the most obvious case being for ORDER BYs) -
COUNT_ONLY
Run a query that returns a count of the number of results (the same as count on ID)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isReturningFullEntity
public boolean isReturningFullEntity()Returns true if this strategy will output full entities at the end of the process- Returns:
-