org.plasma.query.model
Class Expression

java.lang.Object
  extended by org.plasma.query.model.Expression
All Implemented Interfaces:
Expression, Term

public class Expression
extends Object
implements Expression

Java class for Expression complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="Expression">
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element ref="{http://www.servicelabs.org/plasma/query}Term" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </restriction>
   </complexContent>
 </complexType>
 


Field Summary
protected  String id
           
protected  Expression parent
           
protected  List<Term> terms
           
 
Constructor Summary
Expression()
           
Expression(ArithmeticOperator oper)
           
Expression(Entity entity)
           
Expression(Expression[] exprs)
           
Expression(Expression e1, Expression e2, Expression e3)
           
Expression(Expression left, RelationalOperator oper, Expression right)
           
Expression(GroupOperator oper)
           
Expression(GroupOperator right, Property prop, RelationalOperator oper, Literal lit)
           
Expression(GroupOperator right, Property prop, RelationalOperator oper, Literal lit, GroupOperator left)
           
Expression(LogicalOperatorValues oper)
           
Expression(Property prop)
           
Expression(Property prop, ArithmeticOperator oper, Literal lit)
           
Expression(Property prop, Literal min, Literal max)
           
Expression(Property prop, RelationalOperator oper, Literal lit)
           
Expression(Property prop, RelationalOperator oper, Literal lit, GroupOperator left)
           
Expression(Property prop, RelationalOperator oper, NullLiteral lit)
           
Expression(Property prop, RelationalOperator oper, Variable var)
           
Expression(Property prop, SubqueryOperator oper, Query query)
           
Expression(Property prop, WildcardOperator oper, Literal lit)
           
Expression(RelationalOperator oper)
           
Expression(Term term)
           
Expression(Term t1, Term t2, Term t3)
           
 
Method Summary
 void accept(QueryVisitor visitor)
           
static Expression and()
          Returns a simple 1-term expression containing a boolean operator, AND.
 Expression and(Expression other)
          Concatenates the given expression onto this expression using a logical 'and' operator.
static Expression between(Property prop, Literal min, Literal max)
          Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.
static Expression between(Property prop, Object min, Object max)
          Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.
static Expression between(String prop, Object min, Object max)
          Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.
static Expression between(String prop, String[] path, Object min, Object max)
          Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.
static Expression eq(Property prop, Literal literal)
          Returns an expression where the given property is equal to to the given literal.
static Expression eq(Property prop, NullLiteral literal)
          Returns an expression where the given property is equal to to the given null-literal.
static Expression eq(Property prop, Object literal)
          Returns an expression where the given property is equal to to the given literal.
static Expression eq(String prop, Object object)
          Returns an expression where the given property is equal to to the given literal object.
static Expression eq(String prop, String[] path, Object object)
          Returns an expression where the given property is equal to to the given literal object.
static Expression eq(String prop, String path, Object object)
          Returns an expression where the given property is equal to to the given literal object.
static Expression exists(Property prop, Query subquery)
           
static Expression ge(Property prop, Literal literal)
          Returns an expression where the given property is greater than or equal to to the given literal.
static Expression ge(Property prop, Object literal)
          Returns an expression where the given property is greater than or equal to to the given literal.
static Expression ge(String prop, Object literal)
          Returns an expression where the given property is greater than or equalt to to the given literal.
static Expression ge(String prop, String[] path, Object literal)
          Returns an expression where the given property is greater than or equal to to the given literal.
static Expression ge(String prop, String path, Object literal)
          Returns an expression where the given property is greater than or equal to to the given literal.
 Expression getParent()
           
 List<Term> getTerms()
          Gets the value of the terms property.
 Expression group()
          Places this expression within grouping operators and returns the grouped expression.
static Expression gt(Property prop, Literal literal)
          Returns an expression where the given property is greater than to the given literal.
static Expression gt(Property prop, Object literal)
          Returns an expression where the given property is greated than to the given literal.
static Expression gt(String prop, Object literal)
          Returns an expression where the given property is greated than to the given literal.
static Expression gt(String prop, String[] path, Object literal)
          Returns an expression where the given property is greated than to the given literal.
static Expression gt(String prop, String path, Object literal)
          Returns an expression where the given property is greated than to the given literal.
static Expression in(Property prop, Query subquery)
          Returns a subquery expression, where the given property is found within the given subquery results collection.
static Expression in(String prop, Query subquery)
          Returns a subquery expression, where the given property is found within the given subquery results collection.
static Expression in(String prop, String[] path, Query subquery)
          Returns a subquery expression, where the given property is found within the given subquery results collection.
static Expression le(Property prop, Literal literal)
          Returns an expression where the given property is less than or equal to to the given literal.
static Expression le(Property prop, Object literal)
          Returns an expression where the given property is less than or equal to to the given literal.
static Expression le(String prop, Object literal)
          Returns an expression where the given property is less than or equal to to the given literal.
static Expression le(String prop, String[] path, Object literal)
          Returns an expression where the given property is less than or equal to to the given literal.
static Expression le(String prop, String path, Object literal)
          Returns an expression where the given property is less than or equal to to the given literal.
static Expression left()
          Returns a simple 1-term expression containing a group operator, ).
static Expression like(Property prop, Literal literal)
          Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
static Expression like(Property prop, Object literal)
          Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
static Expression like(String prop, Object literal)
          Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
static Expression like(String prop, String[] path, Object literal)
          Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
static Expression like(String prop, String path, Object literal)
          Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'
static Expression lt(Property prop, Literal literal)
          Returns an expression where the given property is less than to the given literal.
static Expression lt(Property prop, Object literal)
          Returns an expression where the given property is less than to the given literal.
static Expression lt(String prop, Object literal)
          Returns an expression where the given property is less than to the given literal.
static Expression lt(String prop, String[] path, Object literal)
          Returns an expression where the given property is less than to the given literal.
static Expression lt(String prop, String path, Object literal)
          Returns an expression where the given property is less than to the given literal.
static Expression ne(Property prop, Literal literal)
          Returns an expression where the given property is not equal to to the given literal.
static Expression ne(Property prop, NullLiteral literal)
          Returns an expression where the given property is not equal to to the given null-literal.
static Expression ne(Property prop, Object literal)
          Returns an expression where the given property is not equal to to the given literal.
static Expression ne(String prop, Object literal)
          Returns an expression where the given property is not equal to to the given literal.
static Expression ne(String prop, String[] path, Object literal)
          Returns an expression where the given property is not equal to to the given literal.
static Expression ne(String prop, String path, Object literal)
          Returns an expression where the given property is not equal to to the given literal.
static Expression notIn(Property prop, Query subquery)
          Returns a subquery expression, where the given property is not found within the given subquery results collection.
static Expression or()
          Returns a simple 1-term expression containing a boolean operator, OR.
 Expression or(Expression other)
          Concatenates the given expression onto this expression using a logical 'or' operator.
static Expression right()
          Returns a simple 1-term expression containing a group operator, (.
static Expression valueOf(org.jaxen.expr.EqualityExpr expr)
           
static Expression valueOf(org.jaxen.expr.LogicalExpr expr)
          Factory method supporting Jaxen XAPTH logical expressions.
static Expression valueOf(org.jaxen.expr.RelationalExpr expr)
          Factory method supporting Jaxen XAPTH relational expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected transient Expression parent

id

protected String id

terms

protected List<Term> terms
Constructor Detail

Expression

public Expression()

Expression

public Expression(Term term)

Expression

public Expression(Term t1,
                  Term t2,
                  Term t3)

Expression

public Expression(Expression e1,
                  Expression e2,
                  Expression e3)

Expression

public Expression(Expression[] exprs)

Expression

public Expression(Property prop,
                  ArithmeticOperator oper,
                  Literal lit)

Expression

public Expression(Expression left,
                  RelationalOperator oper,
                  Expression right)

Expression

public Expression(GroupOperator right,
                  Property prop,
                  RelationalOperator oper,
                  Literal lit)

Expression

public Expression(Property prop,
                  RelationalOperator oper,
                  Literal lit,
                  GroupOperator left)

Expression

public Expression(GroupOperator right,
                  Property prop,
                  RelationalOperator oper,
                  Literal lit,
                  GroupOperator left)

Expression

public Expression(Property prop,
                  RelationalOperator oper,
                  Variable var)

Expression

public Expression(Property prop,
                  RelationalOperator oper,
                  Literal lit)

Expression

public Expression(Property prop,
                  WildcardOperator oper,
                  Literal lit)

Expression

public Expression(Property prop,
                  Literal min,
                  Literal max)

Expression

public Expression(Property prop,
                  RelationalOperator oper,
                  NullLiteral lit)

Expression

public Expression(Property prop,
                  SubqueryOperator oper,
                  Query query)

Expression

public Expression(RelationalOperator oper)

Expression

public Expression(ArithmeticOperator oper)

Expression

public Expression(LogicalOperatorValues oper)

Expression

public Expression(GroupOperator oper)

Expression

public Expression(Property prop)

Expression

public Expression(Entity entity)
Method Detail

getParent

public Expression getParent()

and

public Expression and(Expression other)
Description copied from interface: Expression
Concatenates the given expression onto this expression using a logical 'and' operator.

Specified by:
and in interface Expression
Parameters:
other - the expression
Returns:
the original expression

or

public Expression or(Expression other)
Description copied from interface: Expression
Concatenates the given expression onto this expression using a logical 'or' operator.

Specified by:
or in interface Expression
Parameters:
other - the expression
Returns:
the original expression

group

public Expression group()
Description copied from interface: Expression
Places this expression within grouping operators and returns the grouped expression.

Specified by:
group in interface Expression
Returns:
the grouped expression

eq

public static Expression eq(String prop,
                            Object object)
Returns an expression where the given property is equal to to the given literal object. The given object is assumed to be a string literal, or can be converted to a string literal.

Parameters:
prop - the property
object - the literal
Returns:
the boolean expression

eq

public static Expression eq(String prop,
                            String[] path,
                            Object object)
Returns an expression where the given property is equal to to the given literal object. The given object is assumed to be a string literal, or can be converted to a string literal.

Parameters:
prop - the property
path - the multi-element property path
object - the literal
Returns:
the boolean expression

eq

public static Expression eq(String prop,
                            String path,
                            Object object)
Returns an expression where the given property is equal to to the given literal object. The given object is assumed to be a string literal, or can be converted to a string literal.

Parameters:
prop - the property
path - the single-element property path
object - the literal
Returns:
the boolean expression

eq

public static Expression eq(Property prop,
                            Literal literal)
Returns an expression where the given property is equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

eq

public static Expression eq(Property prop,
                            Object literal)
Returns an expression where the given property is equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

eq

public static Expression eq(Property prop,
                            NullLiteral literal)
Returns an expression where the given property is equal to to the given null-literal.

Parameters:
prop - the property
object - the literal
Returns:
the boolean expression

ne

public static Expression ne(String prop,
                            Object literal)
Returns an expression where the given property is not equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

ne

public static Expression ne(Property prop,
                            Object literal)
Returns an expression where the given property is not equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

ne

public static Expression ne(String prop,
                            String path,
                            Object literal)
Returns an expression where the given property is not equal to to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

ne

public static Expression ne(String prop,
                            String[] path,
                            Object literal)
Returns an expression where the given property is not equal to to the given literal.

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the boolean expression

ne

public static Expression ne(Property prop,
                            Literal literal)
Returns an expression where the given property is not equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

ne

public static Expression ne(Property prop,
                            NullLiteral literal)
Returns an expression where the given property is not equal to to the given null-literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

gt

public static Expression gt(String prop,
                            Object literal)
Returns an expression where the given property is greated than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

gt

public static Expression gt(Property prop,
                            Object literal)
Returns an expression where the given property is greated than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

gt

public static Expression gt(String prop,
                            String path,
                            Object literal)
Returns an expression where the given property is greated than to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

gt

public static Expression gt(String prop,
                            String[] path,
                            Object literal)
Returns an expression where the given property is greated than to the given literal.

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the boolean expression

gt

public static Expression gt(Property prop,
                            Literal literal)
Returns an expression where the given property is greater than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

ge

public static Expression ge(String prop,
                            Object literal)
Returns an expression where the given property is greater than or equalt to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

ge

public static Expression ge(String prop,
                            String path,
                            Object literal)
Returns an expression where the given property is greater than or equal to to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

ge

public static Expression ge(String prop,
                            String[] path,
                            Object literal)
Returns an expression where the given property is greater than or equal to to the given literal.

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the boolean expression

ge

public static Expression ge(Property prop,
                            Literal literal)
Returns an expression where the given property is greater than or equal to to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

ge

public static Expression ge(Property prop,
                            Object literal)
Returns an expression where the given property is greater than or equal to to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

lt

public static Expression lt(Property prop,
                            Object literal)
Returns an expression where the given property is less than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

lt

public static Expression lt(String prop,
                            Object literal)
Returns an expression where the given property is less than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

lt

public static Expression lt(String prop,
                            String path,
                            Object literal)
Returns an expression where the given property is less than to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

lt

public static Expression lt(String prop,
                            String[] path,
                            Object literal)
Returns an expression where the given property is less than to the given literal.

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the boolean expression

lt

public static Expression lt(Property prop,
                            Literal literal)
Returns an expression where the given property is less than to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

le

public static Expression le(String prop,
                            Object literal)
Returns an expression where the given property is less than or equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

le

public static Expression le(Property prop,
                            Object literal)
Returns an expression where the given property is less than or equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

le

public static Expression le(String prop,
                            String path,
                            Object literal)
Returns an expression where the given property is less than or equal to to the given literal.

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the boolean expression

le

public static Expression le(String prop,
                            String[] path,
                            Object literal)
Returns an expression where the given property is less than or equal to to the given literal.

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the boolean expression

le

public static Expression le(Property prop,
                            Literal literal)
Returns an expression where the given property is less than or equal to to the given literal.

Parameters:
prop - the property
literal - the literal
Returns:
the boolean expression

like

public static Expression like(String prop,
                              Object literal)
Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Parameters:
prop - the property
literal - the literal
Returns:
the wildcard expression

like

public static Expression like(Property prop,
                              Object literal)
Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Parameters:
prop - the property
literal - the literal
Returns:
the wildcard expression

like

public static Expression like(String prop,
                              String path,
                              Object literal)
Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Parameters:
prop - the property
path - the single-element property path
literal - the literal
Returns:
the wildcard expression

like

public static Expression like(String prop,
                              String[] path,
                              Object literal)
Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Parameters:
prop - the property
path - the multi-element property path
literal - the literal
Returns:
the wildcard expression

like

public static Expression like(Property prop,
                              Literal literal)
Returns a wildcard expression "triad", where the given property is like the given literal, and the literal may contain any number of wildcards, the wildcard character being '*'

Parameters:
prop - the property
literal - the literal
Returns:
the wildcard expression

between

public static Expression between(Property prop,
                                 Literal min,
                                 Literal max)
Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.

Parameters:
prop - the property
min - the minimum literal
max - the maximum literal
Returns:
the expression

between

public static Expression between(String prop,
                                 Object min,
                                 Object max)
Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.

Parameters:
prop - the property
min - the minimum literal
max - the maximum literal
Returns:
the expression

between

public static Expression between(Property prop,
                                 Object min,
                                 Object max)
Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.

Parameters:
prop - the property
min - the minimum literal
max - the maximum literal
Returns:
the expression

between

public static Expression between(String prop,
                                 String[] path,
                                 Object min,
                                 Object max)
Returns a 6 term expression, where the given property is greater than or equal to the given 'min' literal, and is less than or equal tothe given 'max' literal.

Parameters:
prop - the property
path - the property path
min - the minimum literal
max - the maximum literal
Returns:
the expression

in

public static Expression in(Property prop,
                            Query subquery)
Returns a subquery expression, where the given property is found within the given subquery results collection.

Parameters:
prop - the property
subquery - the subquery
Returns:
the subquery expression

in

public static Expression in(String prop,
                            Query subquery)
Returns a subquery expression, where the given property is found within the given subquery results collection.

Parameters:
prop - the property
subquery - the subquery
Returns:
the subquery expression

in

public static Expression in(String prop,
                            String[] path,
                            Query subquery)
Returns a subquery expression, where the given property is found within the given subquery results collection.

Parameters:
prop - the property
path - the path
subquery - the subquery
Returns:
the subquery expression

notIn

public static Expression notIn(Property prop,
                               Query subquery)
Returns a subquery expression, where the given property is not found within the given subquery results collection.

Parameters:
prop - the property
subquery - the subquery
Returns:
the subquery expression

exists

public static Expression exists(Property prop,
                                Query subquery)

and

public static Expression and()
Returns a simple 1-term expression containing a boolean operator, AND.

Returns:
the simple expression

or

public static Expression or()
Returns a simple 1-term expression containing a boolean operator, OR.

Returns:
the simple expression

left

public static Expression left()
Returns a simple 1-term expression containing a group operator, ).

Returns:
the simple expression

right

public static Expression right()
Returns a simple 1-term expression containing a group operator, (.

Returns:
the simple expression

valueOf

public static Expression valueOf(org.jaxen.expr.RelationalExpr expr)
Factory method supporting Jaxen XAPTH relational expressions.

Parameters:
expr - a Jaxen XAPTH relational expression
Returns:

valueOf

public static Expression valueOf(org.jaxen.expr.LogicalExpr expr)
Factory method supporting Jaxen XAPTH logical expressions.

Parameters:
expr - a Jaxen XAPTH logical expression
Returns:

valueOf

public static Expression valueOf(org.jaxen.expr.EqualityExpr expr)

getTerms

public List<Term> getTerms()
Gets the value of the terms property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the terms property.

For example, to add a new item, do as follows:

    getTerms().add(newItem);
 

Objects of the following type(s) are allowed in the list Term


accept

public void accept(QueryVisitor visitor)


Copyright © 2013. All rights reserved.