Module is.codion.framework.db.core
Package is.codion.framework.db.condition
Interface SelectCondition
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SelectCondition.Builder
Builds aSelectCondition
.-
Nested classes/interfaces inherited from interface is.codion.framework.db.condition.Condition
Condition.Combination
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_QUERY_TIMEOUT_SECONDS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SelectCondition.Builder
builder(Condition condition)
Returns aSelectCondition.Builder
instance based on the given conditionCondition
condition()
Optional<Integer>
fetchDepth()
Optional<Integer>
fetchDepth(ForeignKey foreignKey)
Returns the number of levels of foreign key values to fetch, with 0 meaning no referenced entities should be fetched, -1 no limit and an empty Optional if unspecified (use default).boolean
forUpdate()
int
limit()
int
offset()
Optional<OrderBy>
orderBy()
int
queryTimeout()
Collection<Attribute<?>>
selectAttributes()
-
Methods inherited from interface is.codion.framework.db.condition.Condition
and, attributes, entityType, or, selectBuilder, toString, updateBuilder, values
-
-
-
-
Field Detail
-
DEFAULT_QUERY_TIMEOUT_SECONDS
static final int DEFAULT_QUERY_TIMEOUT_SECONDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
condition
Condition condition()
- Returns:
- the underlying condition
-
orderBy
Optional<OrderBy> orderBy()
- Returns:
- the OrderBy for this condition, an empty Optional if none is specified
-
limit
int limit()
- Returns:
- the limit to use for the given condition, -1 for no limit
-
offset
int offset()
- Returns:
- the offset to use for the given condition, -1 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
Optional<Integer> fetchDepth()
- Returns:
- the global fetch depth limit for this condition, an empty Optional if none has been specified
-
fetchDepth
Optional<Integer> fetchDepth(ForeignKey foreignKey)
Returns the number of levels of foreign key values to fetch, with 0 meaning no referenced entities should be fetched, -1 no limit and an empty Optional if unspecified (use default).- Parameters:
foreignKey
- the foreign key- Returns:
- the number of levels of foreign key values to fetch
-
selectAttributes
Collection<Attribute<?>> selectAttributes()
- Returns:
- the attributes to include in the query result, an empty Collection if all should be included
-
builder
static SelectCondition.Builder builder(Condition condition)
Returns aSelectCondition.Builder
instance based on the given condition- Parameters:
condition
- the condition- Returns:
- a
SelectCondition.Builder
instance
-
-