|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.azzyzt.jee.runtime.dto.query.QuerySpec
public class QuerySpec
For each entity class Azzyzt JEE Tools create two type-specific service beans
with, among others, a list
operation. List takes a QuerySpec
as parameter and delivers a list of DTOs, according to the result of the query.
A query specification contains an expression that selects what objects are in the result,
and a list of OrderByClause
that determines the order ther result list.
Both are optional. The result of the empty query specification is a list of all objects
in a database table in unspecified order.
Query specifications can either be constructed as a tree of objects or as XML text. The latter is the only way to submit a query via the generated REST interface.
QuerySpec
implements Node
, because this way the parser can
directly use the QuerySpec
as root of the expression tree.
Expression
,
Node
,
AttributedTags2QuerySpec
,
OrderByClause
,
Serialized FormConstructor Summary | |
---|---|
QuerySpec()
|
|
QuerySpec(Expression e,
java.util.List<OrderByClause> orderByList)
Programmatically construct a query specification from an expression and a list of order-by clauses |
Method Summary | |
---|---|
void |
add(Expression expression)
Adds an expression to the current Node . |
void |
addOrderBy(OrderByClause orderBy)
|
static QuerySpec |
fromXML(java.lang.String querySpecXml)
Factory method that constructs a query specification from an XML representation. |
Expression |
getExpression()
|
java.util.List<OrderByClause> |
getOrderByList()
|
Expression |
getReplaceableBy()
|
boolean |
isValid()
|
void |
setExpression(Expression expression)
|
void |
setOrderByList(java.util.List<OrderByClause> orderByList)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QuerySpec()
public QuerySpec(Expression e, java.util.List<OrderByClause> orderByList)
e
- an expressionorderByList
- a list of order-by clausesMethod Detail |
---|
public static QuerySpec fromXML(java.lang.String querySpecXml) throws QuerySyntaxException
querySpecXml
- an XML representation as it is used by REST clients
QuerySyntaxException
public Expression getExpression()
public void setExpression(Expression expression)
public void add(Expression expression) throws QuerySyntaxException
Node
Node
. Invalid XML can
cause a QuerySyntaxExpression
.
add
in interface Node
expression
- the expression to be added
QuerySyntaxException
public java.util.List<OrderByClause> getOrderByList()
public void setOrderByList(java.util.List<OrderByClause> orderByList)
public void addOrderBy(OrderByClause orderBy)
public java.lang.String toString()
toString
in class java.lang.Object
public Expression getReplaceableBy()
getReplaceableBy
in interface Node
null
.public boolean isValid()
isValid
in interface Node
true
if the expression is valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |