- Enclosing interface:
- EntityConnection
public static interface EntityConnection.Select
A class encapsulating select query parameters.
A factory for
EntityConnection.Select.Builder
instances via
all(EntityType)
, where(Condition)
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionall
(EntityType entityType) Collection<Attribute<?>>
fetchDepth
(ForeignKey foreignKey) Returns the number of levels of foreign key values to fetch, with 0 meaning the referenced entity should not be fetched, -1 no limit and an empty Optional if the global limit should be used (fetchDepth()
).Returns a map containing the number of levels of foreign key values to fetch per foreign key, with 0 meaning no referenced entities should be fetched, -1 no limit.boolean
having()
limit()
offset()
orderBy()
int
where()
-
Method Details
-
where
Condition where()- Returns:
- the WHERE condition
-
having
Condition having()- Returns:
- the HAVING condition
-
orderBy
- Returns:
- the
OrderBy
for this condition, an empty Optional if none is specified
-
limit
OptionalInt limit()- Returns:
- the LIMIT to use for the given condition, an empty Optional for no limit
-
offset
OptionalInt offset()- Returns:
- the OFFSET to use for the given condition, an empty Optional for no offset
-
forUpdate
boolean forUpdate()- Returns:
- true if this select should lock the result FOR UPDATE
-
queryTimeout
int queryTimeout()- Returns:
- the query timeout
-
fetchDepth
OptionalInt fetchDepth()- Returns:
- the global fetch depth limit for this condition, an empty Optional if none has been specified
-
fetchDepth
Returns the number of levels of foreign key values to fetch, with 0 meaning the referenced entity should not be fetched, -1 no limit and an empty Optional if the global limit should be used (fetchDepth()
).- Parameters:
foreignKey
- the foreign key- Returns:
- the number of levels of foreign key values to fetch
-
foreignKeyFetchDepths
Map<ForeignKey,Integer> foreignKeyFetchDepths()Returns a map containing the number of levels of foreign key values to fetch per foreign key, with 0 meaning no referenced entities should be fetched, -1 no limit.- Returns:
- a map containing the number of levels of foreign key values to fetch for each foreign key
-
attributes
Collection<Attribute<?>> attributes()- Returns:
- the attributes to include in the query result, an empty Collection if all should be included
-
all
- Parameters:
entityType
- the entity type- Returns:
- a new
EntityConnection.Select.Builder
instance
-
where
- Parameters:
condition
- the WHERE condition- Returns:
- a new
EntityConnection.Select.Builder
instance
-