|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cumulus4j.store.query.eval.ResultDescriptor
public class ResultDescriptor
Descriptor specifying what kind of result is expected when a query is executed.
This contains the information what candidates a query should search
(usually "this" or a variable) as well as modifiers affecting the query
(e.g. negation
).
Constructor Summary | |
---|---|
ResultDescriptor(Symbol symbol,
Class<?> resultType)
Create a ResultDescriptor . |
|
ResultDescriptor(Symbol symbol,
Class<?> resultType,
FieldMeta fieldMeta)
Create a ResultDescriptor . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
FieldMeta |
getFieldMeta()
Get the FieldMeta to query, if there is no FCO candidate. |
Class<?> |
getResultType()
Get the type of the searched candidates. |
Symbol |
getSymbol()
Get the symbol specifying what candidates are searched. |
int |
hashCode()
|
boolean |
isNegated()
Whether the result is the negation of the actual criteria. |
ResultDescriptor |
negate()
Create a negation of this ResultDescriptor . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultDescriptor(Symbol symbol, Class<?> resultType)
ResultDescriptor
.
symbol
- the symbol; must not be null
.resultType
- the type of the searched candidates. This can be null
,
if Symbol.getValueType()
is not null
. If Symbol.getValueType()
is not null
, this argument is ignored.public ResultDescriptor(Symbol symbol, Class<?> resultType, FieldMeta fieldMeta)
ResultDescriptor
.
symbol
- the symbol; must not be null
.resultType
- the type of the searched candidates. This can be null
,
if Symbol.getValueType()
is not null
. If Symbol.getValueType()
is not null
, this argument is ignored.fieldMeta
- the field to be queried, if there is no FCO candidate. Must be
null
, if an FCO is searched.Method Detail |
---|
public Symbol getSymbol()
null
.public Class<?> getResultType()
null
.public FieldMeta getFieldMeta()
FieldMeta
to query, if there is no FCO candidate. For example, when
querying for a joined Set<String>.contains(variable)
.
This is null
when querying for an FCO (then the context is clear from the symbol).
FieldMeta
to query or null
.public boolean isNegated()
Whether the result is the negation of the actual criteria.
It is quite expensive to evaluate a negation (JDOQL "!") by first querying the normal (non-negated)
result and then negating it by querying ALL candidates and finally filtering the normal result
out. Therefore, we instead push the negation down the expression-evaluator-tree into the leafs.
Thus NotExpressionEvaluator
simply calls negate()
and passes the negated
ResultDescriptor
down the evaluator-tree.
All nodes in the tree therefore have to take this flag into account.
public ResultDescriptor negate()
ResultDescriptor
. The result will be a copy of this
instance with all fields having the same value except for the negated
flag
which will have the opposite value.
ResultDescriptor
.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |