|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogicCriteria
Used to create a hierarchical representation of a criteria (e.g., similar to a parse tree). Criteria can be generated through a series of method calls; each method call returns another criteria object containing the prior criteria and the newly added criteria. This class has two purposes:
LogicService.eval(myPatient, "CD4 COUNT");
LogicService.eval(myPatient, new LogicCriteria("CD4 COUNT"));
new LogicCriteriaImpl("CD4 COUNT").lt(200).within(Duration.months(6))
Method Summary | |
---|---|
LogicCriteria |
after(java.util.Date value)
Add a In expression to the current LogicCriteria |
LogicCriteria |
and(LogicCriteria logicCriteria)
Append the LogicCriteria using the And operator |
LogicCriteria |
appendCriteria(Operator operator,
LogicCriteria logicCriteria)
Append a LogicCriteria with another LogicCriteria using an operator |
LogicCriteria |
appendExpression(Operator operator,
double operand)
|
LogicCriteria |
appendExpression(Operator operator,
Operand operand)
Create a new LogicExpression using the operand and operator and then append them
to the current LogicCriteria |
LogicCriteria |
appendExpression(Operator operator,
java.lang.String operand)
|
LogicCriteria |
applyTransform(Operator operator)
Apply a transformation operator to a logic expression |
LogicCriteria |
asOf(java.util.Date value)
Add a AsOf expression to the current LogicCriteria |
LogicCriteria |
average()
Apply the Average operator to the LogicCriteria |
LogicCriteria |
before(java.util.Date value)
Add a Before expression to the current LogicCriteria |
LogicCriteria |
contains(double value)
|
LogicCriteria |
contains(float value)
|
LogicCriteria |
contains(int value)
|
LogicCriteria |
contains(Operand value)
|
LogicCriteria |
contains(java.lang.String value)
Add a Contains expression to the current LogicCriteria |
LogicCriteria |
count()
Apply the Count operator to the LogicCriteria |
LogicCriteria |
distinct()
Apply the Distinct operator to the LogicCriteria |
LogicCriteria |
equalTo(double value)
|
LogicCriteria |
equalTo(float value)
|
LogicCriteria |
equalTo(int value)
|
LogicCriteria |
equalTo(Operand value)
|
LogicCriteria |
equalTo(java.lang.String value)
Add a Equals expression to the current LogicCriteria |
LogicCriteria |
exists()
|
LogicCriteria |
first()
Apply the First operator to the LogicCriteria |
LogicCriteria |
first(java.lang.Integer numResults)
|
LogicCriteria |
first(java.lang.Integer numResults,
java.lang.String sortComponent)
|
LogicCriteria |
first(java.lang.String sortComponent)
|
LogicExpression |
getExpression()
Method to get the LogicExpression backing the current LogicCriteria |
java.util.Map<java.lang.String,java.lang.Object> |
getLogicParameters()
|
java.lang.String |
getRootToken()
Method to get the root token of the current LogicCriteria. |
LogicCriteria |
gt(double value)
Add a GreaterThan expression to the current LogicCriteria |
LogicCriteria |
gt(float value)
|
LogicCriteria |
gt(int value)
|
LogicCriteria |
gt(Operand value)
|
LogicCriteria |
gte(double value)
Add a GreaterThanEquals expression to the current LogicCriteria |
LogicCriteria |
gte(float value)
|
LogicCriteria |
gte(int value)
|
LogicCriteria |
gte(Operand value)
|
LogicCriteria |
in(java.util.Collection<?> value)
Add a After expression to the current LogicCriteria |
LogicCriteria |
last()
Apply the Last operator to the LogicCriteria |
LogicCriteria |
last(java.lang.Integer numResults)
|
LogicCriteria |
lt(double value)
Add a LessThan expression to the current LogicCriteria |
LogicCriteria |
lt(float value)
|
LogicCriteria |
lt(int value)
|
LogicCriteria |
lt(Operand value)
|
LogicCriteria |
lte(double value)
Add a LessThanEquals expression to the current LogicCriteria |
LogicCriteria |
lte(float value)
|
LogicCriteria |
lte(int value)
|
LogicCriteria |
lte(Operand value)
|
LogicCriteria |
not()
|
LogicCriteria |
notExists()
|
LogicCriteria |
or(LogicCriteria logicCriteria)
Append the LogicCriteria using the Or operator |
void |
setLogicParameters(java.util.Map<java.lang.String,java.lang.Object> logicParameters)
|
LogicCriteria |
within(Duration duration)
Add a duration expression to the current LogicCriteria |
Method Detail |
---|
LogicCriteria appendExpression(Operator operator, Operand operand)
operand
and operator
and then append them
to the current LogicCriteria
operator
- one of the Operator object to be appended to the current LogicCriteriaoperand
- one of the Operand object
LogicCriteria appendExpression(Operator operator, java.lang.String operand)
appendExpression(Operator, Operand)
LogicCriteria appendExpression(Operator operator, double operand)
appendExpression(Operator, Operand)
LogicCriteria applyTransform(Operator operator)
operator
- type of the TransformOperator
TransformOperator
LogicCriteria appendCriteria(Operator operator, LogicCriteria logicCriteria)
operator
- one type of Operator
logicCriteria
- LogicCriteria
to be appended
LogicCriteria
containing existing and the new LogicCriteria
LogicCriteria and(LogicCriteria logicCriteria)
And
operator
logicCriteria
- LogicCriteria to be appended
And
LogicCriteria or(LogicCriteria logicCriteria)
Or
operator
logicCriteria
- LogicCriteria to be appended
Or
LogicCriteria not()
LogicCriteria count()
Count
operator to the LogicCriteria
Count
LogicCriteria average()
Average
operator to the LogicCriteria
Average
LogicCriteria last()
Last
operator to the LogicCriteria
Last
LogicCriteria last(java.lang.Integer numResults)
last()
LogicCriteria first()
First
operator to the LogicCriteria
First
LogicCriteria first(java.lang.Integer numResults)
first()
LogicCriteria first(java.lang.String sortComponent)
first()
LogicCriteria first(java.lang.Integer numResults, java.lang.String sortComponent)
first()
LogicCriteria distinct()
Distinct
operator to the LogicCriteria
Distinct
LogicCriteria exists()
LogicCriteria notExists()
LogicCriteria asOf(java.util.Date value)
AsOf
expression to the current LogicCriteria
value
- the operand for the AsOf operator
AsOf
LogicCriteria before(java.util.Date value)
Before
expression to the current LogicCriteria
value
- the operand for the Before operator
Before
LogicCriteria after(java.util.Date value)
In
expression to the current LogicCriteria
value
- the operand for the In operator
In
LogicCriteria in(java.util.Collection<?> value)
After
expression to the current LogicCriteria
value
- the operand for the After operator
After
LogicCriteria contains(Operand value)
contains(String)
LogicCriteria contains(int value)
contains(String)
LogicCriteria contains(float value)
contains(String)
LogicCriteria contains(double value)
contains(String)
LogicCriteria contains(java.lang.String value)
Contains
expression to the current LogicCriteria
value
- the operand for the Contains operator
Contains
LogicCriteria equalTo(Operand value)
equalTo(String)
LogicCriteria equalTo(int value)
equalTo(String)
LogicCriteria equalTo(float value)
equalTo(String)
LogicCriteria equalTo(double value)
equalTo(String)
LogicCriteria equalTo(java.lang.String value)
Equals
expression to the current LogicCriteria
value
- the operand for the Equals operator
Equals
LogicCriteria gte(Operand value)
gte(double)
LogicCriteria gte(int value)
gte(double)
LogicCriteria gte(float value)
gte(double)
LogicCriteria gte(double value)
GreaterThanEquals
expression to the current LogicCriteria
value
- the operand for the GreaterThanEquals operator
GreaterThanEquals
LogicCriteria gt(Operand value)
gt(double)
LogicCriteria gt(int value)
gt(double)
LogicCriteria gt(float value)
gt(double)
LogicCriteria gt(double value)
GreaterThan
expression to the current LogicCriteria
value
- the operand for the GreaterThan operator
GreaterThan
LogicCriteria lt(Operand value)
lt(double)
LogicCriteria lt(int value)
lt(double)
LogicCriteria lt(float value)
lt(double)
LogicCriteria lt(double value)
LessThan
expression to the current LogicCriteria
value
- the operand for the LessThan operator
LessThan
LogicCriteria lte(Operand value)
lte(double)
LogicCriteria lte(int value)
lte(double)
LogicCriteria lte(float value)
lte(double)
LogicCriteria lte(double value)
LessThanEquals
expression to the current LogicCriteria
value
- the operand for the LessThanEquals operator
LessThanEquals
LogicCriteria within(Duration duration)
duration
- the Duration
object
Within
java.util.Map<java.lang.String,java.lang.Object> getLogicParameters()
void setLogicParameters(java.util.Map<java.lang.String,java.lang.Object> logicParameters)
logicParameters
- java.lang.String getRootToken()
logicService.parseString("'CD4 COUNT'").getRootToken().equals("CD4 COUNT");
LogicExpression getExpression()
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |