|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eobjects.metamodel.util.BaseObject
org.eobjects.metamodel.query.Query
public final class Query
Represents a query to retrieve data by. A query is made up of six clauses, equivalent to the SQL standard:
DataContext,
Serialized Form| Constructor Summary | |
|---|---|
Query()
|
|
| Method Summary | |
|---|---|
Query |
clone()
|
protected void |
decorateIdentity(List<Object> identifiers)
Subclasses should implement this method and add all fields to the list that are to be included in equals(...) and hashCode() evaluation |
Query |
from(FromItem... items)
|
Query |
from(String expression)
|
Query |
from(Table table)
|
Query |
from(Table table,
String alias)
|
Query |
from(Table leftTable,
Table rightTable,
JoinType joinType,
Column leftOnColumn,
Column rightOnColumn)
|
Integer |
getFirstRow()
Gets the first row (aka offset) of the query's result, or null if none is specified. |
FromClause |
getFromClause()
|
GroupByClause |
getGroupByClause()
|
FilterClause |
getHavingClause()
|
Integer |
getMaxRows()
|
OrderByClause |
getOrderByClause()
|
SelectClause |
getSelectClause()
|
FilterClause |
getWhereClause()
|
Query |
groupBy(Column... columns)
|
Query |
groupBy(GroupByItem... items)
|
Query |
groupBy(String... groupByTokens)
|
Query |
having(Column column,
OperatorType operatorType,
Object operand)
|
Query |
having(FilterItem... items)
|
Query |
having(FunctionType function,
Column column,
OperatorType operatorType,
Object operand)
|
Query |
having(String... havingItemTokens)
|
Query |
orderBy(Column column)
|
Query |
orderBy(Column column,
boolean ascending)
Deprecated. use orderBy(Column, Direction) instead |
Query |
orderBy(Column column,
OrderByItem.Direction direction)
|
Query |
orderBy(OrderByItem... items)
|
Query |
orderBy(String... orderByTokens)
|
Query |
select(Column... columns)
|
Query |
select(Column column,
FromItem fromItem)
|
Query |
select(FunctionType functionType,
Column column)
|
Query |
select(SelectItem... items)
|
Query |
select(String expression)
Adds a selection to this query. |
Query |
select(String expression,
String alias)
|
Query |
selectAll()
Select all available select items from all currently available FROM items. |
Query |
selectAll(FromItem fromItem)
|
Query |
selectCount()
|
Query |
selectDistinct()
|
Query |
setFirstRow(Integer firstRow)
Sets the first row (aka offset) of the query's result. |
Query |
setMaxRows(Integer maxRows)
Sets the maximum number of rows to be queried. |
String |
toSql()
|
protected String |
toSql(boolean includeSchemaInColumnPaths)
|
String |
toString()
|
Query |
where(Column column,
OperatorType operatorType,
Object operand)
|
Query |
where(FilterItem... items)
|
Query |
where(Iterable<FilterItem> items)
|
Query |
where(SelectItem selectItem,
OperatorType operatorType,
Object operand)
|
Query |
where(String... whereItemTokens)
|
| Methods inherited from class org.eobjects.metamodel.util.BaseObject |
|---|
classEquals, equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Query()
| Method Detail |
|---|
public Query select(Column column,
FromItem fromItem)
public Query select(Column... columns)
public Query select(SelectItem... items)
public Query select(FunctionType functionType,
Column column)
public Query select(String expression,
String alias)
public Query select(String expression)
expression -
public Query selectAll()
public Query selectAll(FromItem fromItem)
public Query selectDistinct()
public Query selectCount()
public Query from(FromItem... items)
public Query from(Table table)
public Query from(String expression)
public Query from(Table table,
String alias)
public Query from(Table leftTable,
Table rightTable,
JoinType joinType,
Column leftOnColumn,
Column rightOnColumn)
public Query groupBy(String... groupByTokens)
public Query groupBy(GroupByItem... items)
public Query groupBy(Column... columns)
public Query orderBy(OrderByItem... items)
public Query orderBy(String... orderByTokens)
public Query orderBy(Column column)
@Deprecated
public Query orderBy(Column column,
boolean ascending)
public Query orderBy(Column column,
OrderByItem.Direction direction)
public Query where(FilterItem... items)
public Query where(Iterable<FilterItem> items)
public Query where(String... whereItemTokens)
public Query where(SelectItem selectItem,
OperatorType operatorType,
Object operand)
public Query where(Column column,
OperatorType operatorType,
Object operand)
public Query having(FilterItem... items)
public Query having(FunctionType function,
Column column,
OperatorType operatorType,
Object operand)
public Query having(Column column,
OperatorType operatorType,
Object operand)
public Query having(String... havingItemTokens)
public String toString()
toString in class BaseObjectpublic String toSql()
protected String toSql(boolean includeSchemaInColumnPaths)
public SelectClause getSelectClause()
public FromClause getFromClause()
public FilterClause getWhereClause()
public GroupByClause getGroupByClause()
public FilterClause getHavingClause()
public OrderByClause getOrderByClause()
public Query setMaxRows(Integer maxRows)
maxRows - the number of desired maximum rows. Can be null (default) for
no limits
public Integer getMaxRows()
public Query setFirstRow(Integer firstRow)
firstRow - the first row, where 1 is the first row.
public Integer getFirstRow()
protected void decorateIdentity(List<Object> identifiers)
BaseObject
decorateIdentity in class BaseObjectpublic Query clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||