|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TQLFunction
Interface class for a TQL function.
Copyright (c) 2013 Apelon, Inc. All rights reserved.
Method Summary | |
---|---|
java.lang.String[] |
extractValues(java.lang.Object[] objs,
TQLField field)
Return the result(s) of the function as applied to the argument objects. |
boolean |
forceFullSearch(java.lang.String op,
java.lang.String value)
Return whether this function, when used in a selector with the operator op and
argument value , should search all objects in the TQL Context . |
java.lang.String |
getName()
Return the base name of this user function (without the initial "%") |
boolean |
isAggregator()
Return whether this function returns one value for each extractValues argument object or
one value for all the arguments (an aggregator). |
java.lang.String |
validateArgument(TQLField field)
Test if the specified function argument is valid. |
Method Detail |
---|
java.lang.String getName()
boolean isAggregator()
extractValues
argument object or
one value for all the arguments (an aggregator). The value of this method is typically false.
Some functions, such as COUNT
, are aggregators and
must be handled as 'independent' export attributes. In this case, they
must return true to isAggregator()
and the length of the returned array will be one,
not the size of the argument array.
extractValues
argumentsboolean forceFullSearch(java.lang.String op, java.lang.String value)
op
and
argument value
, should search all objects in the TQL Context
.
This is typically false and search optimizers/accelerators can be used. The COUNT
function,
on the other hand, must search all concepts when a value of zero is acceptable: COUNT(MyProp) < 2
.
In this case, forceFullSearch
must return true to inhibit optimization.
Returning true generally has negative performance implications.
java.lang.String validateArgument(TQLField field)
field
- the TQLField
that defines the argument
java.lang.String[] extractValues(java.lang.Object[] objs, TQLField field)
objs
- the array of objects resulting from evaluating the function argumentfield
- the TQLField
object that defines the object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |