public abstract class Query extends Object implements Serializable
Query
class provides a simplified API for generating criteria when searching for items. This is a
convenient approach for functionality such as "search" user interfaces where ad-hoc queries are built and constrained
on the fly.Constructor and Description |
---|
Query()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Query |
constrain(Constraint c)
Sets the constraint to be used when executing the query.
|
List<Column> |
getColumns()
Gets the column(s) to be included in the query output.
|
Constraint |
getConstraint()
Gets the constraint to be used when executing the query.
|
List<Order> |
getOrder()
Gets the order to be used in the query output.
|
Query |
includeColumnNames(boolean includeColumnNames)
Sets whether to include column names in the query output.
|
boolean |
isIncludeColumnNames()
Indicates whether to include column names in the query output.
|
Query |
order(Column... columns)
Sets the order for the specified columns to be ordered according to the default sort order which is descending
and case-sensitive.
|
Query |
order(Order... orders)
Sets the order(s) to be used in the query output.
|
Query |
select(Column... columns)
Sets the column(s) to be included in the query output.
|
Query |
select(List<Column> columns)
Sets the list of columns to be included in the query output.
|
void |
setColumns(List<Column> columns)
Sets the column(s) to be included in the query output.
|
void |
setConstraint(Constraint constraint)
Sets the constraint to be used when executing the query.
|
void |
setIncludeColumnNames(boolean includeColumnNames)
Sets whether to include column names in the query output.
|
void |
setOrder(List<Order> order)
Sets the order to be used in the query output.
|
String |
toString() |
public List<Column> getColumns()
public void setColumns(List<Column> columns)
columns
- The columns to be included in the query output.public Constraint getConstraint()
public void setConstraint(Constraint constraint)
constraint
- The constraint to be used when executing the query.public List<Order> getOrder()
public void setOrder(List<Order> order)
order
- The order to be used in the query output.public boolean isIncludeColumnNames()
public void setIncludeColumnNames(boolean includeColumnNames)
includeColumnNames
- Whether to include column names in the query output.public Query select(Column... columns)
public Query select(List<Column> columns)
public Query constrain(Constraint c)
public final Query order(Column... columns)
public final Query order(Order... orders)
public final Query includeColumnNames(boolean includeColumnNames)
Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA