public class Expressions extends Object implements Serializable
Expression
instances.
Provides quick-access methods to create all possible expressions and provides typical parameter lists to each.
Note that only the typical parameter lists are provided and expressions can allow adding additional parameters.
Many expressions, for example logical AND and OR (conjunction and disjunction), allow adding an unlimited number of additional sub-expressions to an expression. For those expressions there are additional add methods provided.
Constructor and Description |
---|
Expressions() |
Modifier and Type | Method and Description |
---|---|
static Conjunction |
and()
Logical AND conjunction.
|
static Conjunction |
and(Expression first,
Expression second,
Expression... expressions)
Logical AND conjunction.
|
static ArrayExpression |
array()
Array expression, representing the syntax of "{1, 2, 3}" returning an integer array of 3 elements valued 1, 2, 3.
|
static AvedevProjectionExpression |
avedev(Expression expression)
Mean deviation aggregation function.
|
static AvedevProjectionExpression |
avedev(String propertyName)
Mean deviation aggregation function.
|
static AvedevProjectionExpression |
avedevDistinct(Expression expression)
Mean deviation function considering distinct values only.
|
static AvedevProjectionExpression |
avedevDistinct(String propertyName)
Mean deviation function considering distinct values only.
|
static AvgProjectionExpression |
avg(Expression expression)
Average aggregation function.
|
static AvgProjectionExpression |
avg(String propertyName)
Average aggregation function.
|
static AvgProjectionExpression |
avgDistinct(Expression expression)
Average aggregation function considering distinct values only.
|
static AvgProjectionExpression |
avgDistinct(String propertyName)
Average aggregation function considering distinct values only.
|
static BetweenExpression |
between(Expression datapoint,
Expression lowBoundary,
Expression highBoundary)
Between.
|
static BetweenExpression |
between(String property,
Object lowBoundary,
Object highBoundary)
Between.
|
static BetweenExpression |
betweenProperty(String property,
String lowBoundaryProperty,
String highBoundaryProperty)
Between.
|
static BitwiseOpExpression |
binaryAnd()
Bitwise (binary) AND.
|
static BitwiseOpExpression |
binaryOr()
Bitwise (binary) OR.
|
static BitwiseOpExpression |
binaryXor()
Bitwise (binary) XOR.
|
static CaseSwitchExpression |
caseSwitch(Expression valueToSwitchOn)
Case-switch expresssion.
|
static CaseSwitchExpression |
caseSwitch(String propertyName)
Case-switch expresssion.
|
static CaseWhenThenExpression |
caseWhenThen()
Case-when-then expression.
|
static CastExpression |
cast(Expression expression,
String typeName)
Cast function, casts the result on an expression to the desired type, or
returns null if the type cannot be casted to the type.
|
static CastExpression |
cast(String propertyName,
String typeName)
Cast function, casts the result on an expression to the desired type, or
returns null if the type cannot be casted to the type.
|
static CoalesceExpression |
coalesce(Expression exprOne,
Expression exprTwo,
Expression... moreExpressions)
Coalesce.
|
static CoalesceExpression |
coalesce(String propertyOne,
String propertyTwo,
String... moreProperties)
Coalesce.
|
static ConcatExpression |
concat(String property,
String... properties)
Concatenation.
|
static ConstantExpression |
constant(Object value)
Constant.
|
static ConstantExpression |
constant(Object value,
Class constantType)
Constant, use when the value is null.
|
static CountProjectionExpression |
count(Expression expression)
Count aggregation function.
|
static CountProjectionExpression |
count(String propertyName)
Count aggregation function.
|
static CountProjectionExpression |
countDistinct(Expression expression)
Count aggregation function considering distinct values only.
|
static CountProjectionExpression |
countDistinct(String propertyName)
Count aggregation function considering distinct values only.
|
static CountStarProjectionExpression |
countStar()
Count aggregation function not counting values, equivalent to "count(*)".
|
static CrontabFrequencyExpression |
crontabScheduleFrequency(int frequency)
Creates a frequency cron parameter.
|
static CrontabParameterExpression |
crontabScheduleItem(Integer parameter,
ScheduleItemType type)
Creates a parameter of the given type and parameterized by a number.
|
static CrontabRangeExpression |
crontabScheduleRange(int lowerBounds,
int upperBounds)
Creates a range cron parameter.
|
static CrontabParameterExpression |
crontabScheduleWildcard()
Creates a wildcard parameter.
|
static CurrentTimestampExpression |
currentTimestamp()
Current system time supplies internal-timer provided time or
the time provided by external timer events.
|
static ArithmaticExpression |
divide(Expression left,
Expression right)
Division.
|
static ArithmaticExpression |
divide(String propertyLeft,
String propertyRight)
Division.
|
static RelationalOpExpression |
eq(Expression left,
Expression right)
Equals between expression results.
|
static RelationalOpExpression |
eq(String propertyName,
Object value)
Equals between a property and a constant.
|
static RelationalOpExpression |
eqProperty(String propertyLeft,
String propertyRight)
Equals between properties.
|
static PropertyExistsExpression |
existsProperty(String propertyName)
Exists-function for use with dynamic properties to test property existence.
|
static FirstProjectionExpression |
first(Expression expression)
First-value (in window) aggregation function.
|
static FirstProjectionExpression |
first(String propertyName)
First-value (windowed) aggregation function.
|
static FirstEverProjectionExpression |
firstEver(Expression expression)
First-value (ever) aggregation function.
|
static FirstEverProjectionExpression |
firstEver(String propertyName)
First-value (ever) aggregation function.
|
static RelationalOpExpression |
ge(Expression left,
Expression right)
Greater-or-equals between expression results.
|
static RelationalOpExpression |
ge(String propertyName,
Object value)
Greater-or-equal between a property and a constant.
|
static RelationalOpExpression |
geProperty(String propertyLeft,
String propertyRight)
Greater-or-equal between properties.
|
protected static PropertyValueExpression |
getPropExpr(String propertyName)
Returns an expression returning the propertyName value for the propertyName name passed in.
|
static RelationalOpExpression |
gt(Expression left,
Expression right)
Greater-then between expression results.
|
static RelationalOpExpression |
gt(String propertyName,
Object value)
Greater-then between a property and a constant.
|
static RelationalOpExpression |
gtProperty(String propertyLeft,
String propertyRight)
Greater-then between properties.
|
static InExpression |
in(Expression value,
Expression... set)
In-expression that is equivalent to the syntax of "property in (value, value, ...
|
static InExpression |
in(String property,
Object... values)
In-expression that is equivalent to the syntax of "property in (value, value, ...
|
static InstanceOfExpression |
instanceOf(Expression expression,
String typeName,
String... typeNames)
Instance-of function, tests if the type of the return value of an expression is in a list of types.
|
static InstanceOfExpression |
instanceOf(String propertyName,
String typeName,
String... typeNames)
Instance-of function, tests if the type of the return value of a property is in a list of types.
|
static RelationalOpExpression |
isNotNull(Expression expression)
Not-null test.
|
static RelationalOpExpression |
isNotNull(String property)
Not-null test.
|
static RelationalOpExpression |
isNull(Expression expression)
Is-null test.
|
static RelationalOpExpression |
isNull(String property)
Is-null test.
|
static LastProjectionExpression |
last(Expression expression)
Lastever-value aggregation function.
|
static LastProjectionExpression |
last(String propertyName)
Lastever-value aggregation function.
|
static LastEverProjectionExpression |
lastEver(Expression expression)
Lastever-value aggregation function.
|
static LastEverProjectionExpression |
lastEver(String propertyName)
Lastever-value aggregation function.
|
static RelationalOpExpression |
le(Expression left,
Expression right)
Less-or-equal between expression results.
|
static RelationalOpExpression |
le(String propertyName,
Object value)
Less-or-equals between a property and a constant.
|
static RelationalOpExpression |
leProperty(String propertyLeft,
String propertyRight)
Less-or-equal between properties.
|
static LikeExpression |
like(Expression left,
Expression right)
SQL-Like.
|
static LikeExpression |
like(Expression left,
Expression right,
Expression escape)
SQL-Like.
|
static LikeExpression |
like(String propertyName,
Object value,
String escape)
SQL-Like.
|
static LikeExpression |
like(String propertyName,
String value)
SQL-Like.
|
static RelationalOpExpression |
lt(Expression left,
Expression right)
Less-then between expression results.
|
static RelationalOpExpression |
lt(String propertyName,
Object value)
Less-then between a property and a constant.
|
static RelationalOpExpression |
ltProperty(String propertyLeft,
String propertyRight)
Less-then between properties.
|
static MaxProjectionExpression |
max(Expression expression)
Maximum aggregation function.
|
static MaxRowExpression |
max(Expression exprOne,
Expression exprTwo,
Expression... moreExpressions)
Maximum value per-row function (not aggregating).
|
static MaxProjectionExpression |
max(String propertyName)
Maximum aggregation function.
|
static MaxRowExpression |
max(String propertyOne,
String propertyTwo,
String... moreProperties)
Maximum value per-row function (not aggregating).
|
static MaxProjectionExpression |
maxDistinct(Expression expression)
Maximum aggregation function considering distinct values only.
|
static MaxProjectionExpression |
maxDistinct(String propertyName)
Maximum aggregation function considering distinct values only.
|
static MedianProjectionExpression |
median(Expression expression)
Median aggregation function.
|
static MedianProjectionExpression |
median(String propertyName)
Median aggregation function.
|
static MedianProjectionExpression |
medianDistinct(Expression expression)
Median aggregation function considering distinct values only.
|
static MedianProjectionExpression |
medianDistinct(String propertyName)
Median aggregation function considering distinct values only.
|
static MinProjectionExpression |
min(Expression expression)
Minimum aggregation function.
|
static MinRowExpression |
min(Expression exprOne,
Expression exprTwo,
Expression... moreExpressions)
Minimum value per-row function (not aggregating).
|
static MinProjectionExpression |
min(String propertyName)
Minimum aggregation function.
|
static MinRowExpression |
min(String propertyOne,
String propertyTwo,
String... moreProperties)
Minimum value per-row function (not aggregating).
|
static MinProjectionExpression |
minDistinct(Expression expression)
Minimum aggregation function considering distinct values only.
|
static MinProjectionExpression |
minDistinct(String propertyName)
Minimum aggregation function considering distinct values only.
|
static ArithmaticExpression |
minus(Expression left,
Expression right)
Subtraction.
|
static ArithmaticExpression |
minus(String propertyLeft,
String propertyRight)
Subtraction.
|
static ArithmaticExpression |
modulo(Expression left,
Expression right)
Modulo.
|
static ArithmaticExpression |
modulo(String propertyLeft,
String propertyRight)
Modulo.
|
static ArithmaticExpression |
multiply(Expression left,
Expression right)
Multiplication.
|
static ArithmaticExpression |
multiply(String propertyLeft,
String propertyRight)
Multiplication.
|
static RelationalOpExpression |
neq(Expression left,
Expression right)
Not-Equals between expression results.
|
static RelationalOpExpression |
neq(String propertyName,
Object value)
Not-Equals between a property and a constant.
|
static RelationalOpExpression |
neqProperty(String propertyLeft,
String propertyRight)
Not-Equals between properties.
|
static NotExpression |
not(Expression inner)
Not expression negates the sub-expression to the not which is expected to return boolean-typed values.
|
static InExpression |
notIn(Expression value,
Expression... set)
Not-In-expression that is equivalent to the syntax of "property not in (value, value, ...
|
static InExpression |
notIn(String property,
Object... values)
Not-In-expression that is equivalent to the syntax of "property not in (value, value, ...
|
static LikeExpression |
notLike(Expression left,
Expression right)
SQL-Like negated (not like).
|
static LikeExpression |
notLike(Expression left,
Expression right,
Expression escape)
SQL-Like negated (not like).
|
static LikeExpression |
notLike(String propertyName,
Object value,
String escape)
SQL-Like negated (not like).
|
static LikeExpression |
notLike(String propertyName,
String value)
SQL-Like negated (not like).
|
static RegExpExpression |
notRegexp(Expression left,
Expression right)
Regular expression negated (not regexp).
|
static RegExpExpression |
notRegexp(Expression left,
Expression right,
String escape)
Regular expression negated (not regexp).
|
static RegExpExpression |
notRegexp(String property,
String regExExpression)
Regular expression negated (not regexp).
|
static RegExpExpression |
notRegexp(String property,
String regExExpression,
String escape)
Regular expression negated (not regexp).
|
static Disjunction |
or()
Logical OR disjunction.
|
static Disjunction |
or(Expression first,
Expression second,
Expression... expressions)
Logical OR disjunction.
|
static PlugInProjectionExpression |
plugInAggregation(String functionName,
Expression... moreExpressions)
Plug-in aggregation function.
|
static ArithmaticExpression |
plus(Expression left,
Expression right)
Addition.
|
static ArithmaticExpression |
plus(String propertyLeft,
String propertyRight)
Addition.
|
static PreviousExpression |
previous(Expression expression,
String property)
Previous function.
|
static PreviousExpression |
previous(int index,
String property)
Previous function.
|
static PreviousExpression |
previousCount(String property)
Previous count function.
|
static PreviousExpression |
previousTail(Expression expression,
String property)
Previous tail function.
|
static PreviousExpression |
previousTail(int index,
String property)
Previous tail function.
|
static PreviousExpression |
previousWindow(String property)
Previous window function.
|
static PriorExpression |
prior(int index,
String property)
Prior function.
|
static PropertyValueExpression |
property(String propertyName)
Property value.
|
static BetweenExpression |
range(Expression datapoint,
Expression lowBoundary,
Expression highBoundary,
boolean isLowIncluded,
boolean isHighIncluded)
Between (or range).
|
static RegExpExpression |
regexp(Expression left,
Expression right)
Regular expression.
|
static RegExpExpression |
regexp(Expression left,
Expression right,
String escape)
Regular expression.
|
static RegExpExpression |
regexp(String property,
String regExExpression)
Regular expression.
|
static RegExpExpression |
regexp(String property,
String regExExpression,
String escape)
Regular expression.
|
static StaticMethodExpression |
staticMethod(String className,
String method,
Expression... parameters)
Static method invocation.
|
static StaticMethodExpression |
staticMethod(String className,
String method,
Object... parameters)
Static method invocation.
|
static StddevProjectionExpression |
stddev(Expression expression)
Standard deviation aggregation function.
|
static StddevProjectionExpression |
stddev(String propertyName)
Standard deviation aggregation function.
|
static StddevProjectionExpression |
stddevDistinct(Expression expression)
Standard deviation function considering distinct values only.
|
static StddevProjectionExpression |
stddevDistinct(String propertyName)
Standard deviation function considering distinct values only.
|
static SubqueryExpression |
subquery(EPStatementObjectModel model)
Subquery.
|
static SubqueryExistsExpression |
subqueryExists(EPStatementObjectModel model)
Subquery with exists-clause, represents the syntax of "select * from ...
|
static SubqueryInExpression |
subqueryIn(Expression expression,
EPStatementObjectModel model)
Subquery with in-clause, represents the syntax of "value in (select ...
|
static SubqueryInExpression |
subqueryIn(String property,
EPStatementObjectModel model)
Subquery with in-clause, represents the syntax of "value in (select ...
|
static SubqueryInExpression |
subqueryNotIn(Expression expression,
EPStatementObjectModel model)
Subquery with not-in-clause, represents the syntax of "value not in (select ...
|
static SubqueryInExpression |
subqueryNotIn(String property,
EPStatementObjectModel model)
Subquery with not-in-clause, represents the syntax of "value not in (select ...
|
static SumProjectionExpression |
sum(Expression expression)
Sum aggregation function.
|
static SumProjectionExpression |
sum(String propertyName)
Sum aggregation function.
|
static SumProjectionExpression |
sumDistinct(Expression expression)
Sum aggregation function considering distinct values only.
|
static SumProjectionExpression |
sumDistinct(String propertyName)
Sum aggregation function considering distinct values only.
|
static TimePeriodExpression |
timePeriod(Double days,
Double hours,
Double minutes,
Double seconds,
Double milliseconds)
Returns a time period expression for the specified parts.
|
static TimePeriodExpression |
timePeriod(Object days,
Object hours,
Object minutes,
Object seconds,
Object milliseconds)
Returns a time period expression for the specified parts.
|
protected static List<PropertyValueExpression> |
toPropertyExpressions(String... properties)
Returns a list of expressions returning property values for the property names passed in.
|
static TypeOfExpression |
typeOf(Expression expression)
Type-of function, returns the event type name or result type as a string of a stream name, property or expression.
|
static TypeOfExpression |
typeOf(String propertyName)
Type-of function, returns the event type name or result type as a string of a stream name, property or expression.
|
public static CurrentTimestampExpression currentTimestamp()
public static PropertyExistsExpression existsProperty(String propertyName)
propertyName
- name of the property to test whether it exists or notpublic static CastExpression cast(Expression expression, String typeName)
The list of types can include fully-qualified class names plus any of the Java primitive type names: byte, char, short, int, long, float, double, boolean. Alternatively to "java.lang.String" the simple "string" is also permitted.
Type checks include all superclasses and interfaces of the value returned by the expression.
expression
- returns the value to casttypeName
- is type to cast topublic static CastExpression cast(String propertyName, String typeName)
The list of types can include fully-qualified class names plus any of the Java primitive type names: byte, char, short, int, long, float, double, boolean. Alternatively to "java.lang.String" the simple "string" is also permitted.
Type checks include all superclasses and interfaces of the value returned by the expression.
propertyName
- name of the property supplying the value to casttypeName
- is type to cast topublic static InstanceOfExpression instanceOf(Expression expression, String typeName, String... typeNames)
The list of types can include fully-qualified class names plus any of the Java primitive type names: byte, char, short, int, long, float, double, boolean. Alternatively to "java.lang.String" the simple "string" is also permitted.
Type checks include all superclasses and interfaces of the value returned by the expression.
expression
- returns the value to test whether the type returned is any of the is the function nametypeName
- is one type to check fortypeNames
- is optional additional types to check for in a listpublic static InstanceOfExpression instanceOf(String propertyName, String typeName, String... typeNames)
Useful with dynamic (unchecked) properties to check the type of property returned.
The list of types can include fully-qualified class names plus any of the Java primitive type names: byte, char, short, int, long, float, double, boolean. Alternatively to "java.lang.String" the simple "string" is also permitted.
Type checks include all superclasses and interfaces of the value returned by the expression.
propertyName
- name of the property supplying the value to testtypeName
- is one type to check fortypeNames
- is optional additional types to check for in a listpublic static TypeOfExpression typeOf(Expression expression)
expression
- to evaluate and return it's result type as a stringpublic static TypeOfExpression typeOf(String propertyName)
propertyName
- returns the property to evaluate and return its event type name or property class typepublic static PlugInProjectionExpression plugInAggregation(String functionName, Expression... moreExpressions)
functionName
- is the function namemoreExpressions
- provides the values to aggregatepublic static RegExpExpression regexp(Expression left, Expression right)
left
- returns the values to matchright
- returns the value to match againstpublic static RegExpExpression regexp(Expression left, Expression right, String escape)
left
- returns the values to matchright
- returns the value to match againstescape
- is the escape characterpublic static RegExpExpression regexp(String property, String regExExpression)
property
- the name of the property returning values to matchregExExpression
- a regular expression to match againstpublic static RegExpExpression regexp(String property, String regExExpression, String escape)
property
- the name of the property returning values to matchregExExpression
- a regular expression to match againstescape
- is the escape characterpublic static RegExpExpression notRegexp(Expression left, Expression right)
left
- returns the values to matchright
- returns the value to match againstpublic static RegExpExpression notRegexp(Expression left, Expression right, String escape)
left
- returns the values to matchright
- returns the value to match againstescape
- is the escape characterpublic static RegExpExpression notRegexp(String property, String regExExpression)
property
- the name of the property returning values to matchregExExpression
- a regular expression to match againstpublic static RegExpExpression notRegexp(String property, String regExExpression, String escape)
property
- the name of the property returning values to matchregExExpression
- a regular expression to match againstescape
- is the escape characterpublic static ArrayExpression array()
public static BitwiseOpExpression binaryAnd()
public static BitwiseOpExpression binaryOr()
public static BitwiseOpExpression binaryXor()
public static MinRowExpression min(String propertyOne, String propertyTwo, String... moreProperties)
propertyOne
- the name of a first property to comparepropertyTwo
- the name of a second property to comparemoreProperties
- optional additional properties to comparepublic static MinRowExpression min(Expression exprOne, Expression exprTwo, Expression... moreExpressions)
exprOne
- returns the first value to compareexprTwo
- returns the second value to comparemoreExpressions
- optional additional values to comparepublic static MaxRowExpression max(String propertyOne, String propertyTwo, String... moreProperties)
propertyOne
- the name of a first property to comparepropertyTwo
- the name of a second property to comparemoreProperties
- optional additional properties to comparepublic static MaxRowExpression max(Expression exprOne, Expression exprTwo, Expression... moreExpressions)
exprOne
- returns the first value to compareexprTwo
- returns the second value to comparemoreExpressions
- optional additional values to comparepublic static CoalesceExpression coalesce(String propertyOne, String propertyTwo, String... moreProperties)
propertyOne
- name of the first property returning value to coealescepropertyTwo
- name of the second property returning value to coealescemoreProperties
- name of the optional additional properties returning values to coealescepublic static CoalesceExpression coalesce(Expression exprOne, Expression exprTwo, Expression... moreExpressions)
exprOne
- returns value to coalesceexprTwo
- returns value to coalescemoreExpressions
- returning optional additional values to coalescepublic static ConstantExpression constant(Object value)
value
- is the constant valuepublic static ConstantExpression constant(Object value, Class constantType)
value
- is the constant valueconstantType
- is the type of the constantpublic static CaseWhenThenExpression caseWhenThen()
public static CaseSwitchExpression caseSwitch(Expression valueToSwitchOn)
valueToSwitchOn
- provides the switch valuepublic static CaseSwitchExpression caseSwitch(String propertyName)
propertyName
- the name of the property that provides the switch valuepublic static InExpression in(String property, Object... values)
property
- is the name of the propertyvalues
- are the constants to check againstpublic static InExpression notIn(String property, Object... values)
property
- is the name of the propertyvalues
- are the constants to check againstpublic static InExpression in(Expression value, Expression... set)
value
- provides values to matchset
- are expressons that provide match-against valuespublic static InExpression notIn(Expression value, Expression... set)
value
- provides values to matchset
- are expressons that provide match-against valuespublic static NotExpression not(Expression inner)
inner
- is the sub-expressionpublic static StaticMethodExpression staticMethod(String className, String method, Object... parameters)
className
- the name of the class to invoke a method onmethod
- the name of the method to invokeparameters
- zero, one or more constants that are the parameters to the static methodpublic static StaticMethodExpression staticMethod(String className, String method, Expression... parameters)
className
- the name of the class to invoke a method onmethod
- the name of the method to invokeparameters
- zero, one or more expressions that provide parameters to the static methodpublic static PriorExpression prior(int index, String property)
index
- the numeric index of the prior eventproperty
- the name of the property to obtain the value forpublic static PreviousExpression previous(Expression expression, String property)
expression
- provides the numeric index of the previous eventproperty
- the name of the property to obtain the value forpublic static PreviousExpression previous(int index, String property)
index
- the numeric index of the previous eventproperty
- the name of the property to obtain the value forpublic static PreviousExpression previousTail(Expression expression, String property)
expression
- provides the numeric index of the previous eventproperty
- the name of the property to obtain the value forpublic static PreviousExpression previousTail(int index, String property)
index
- the numeric index of the previous eventproperty
- the name of the property to obtain the value forpublic static PreviousExpression previousCount(String property)
property
- provides the properties or stream name to select for the previous eventpublic static PreviousExpression previousWindow(String property)
property
- provides the properties or stream name to select for the previous eventpublic static BetweenExpression betweenProperty(String property, String lowBoundaryProperty, String highBoundaryProperty)
property
- the name of the property supplying data points.lowBoundaryProperty
- the name of the property supplying lower boundary.highBoundaryProperty
- the name of the property supplying upper boundary.public static BetweenExpression between(String property, Object lowBoundary, Object highBoundary)
property
- the name of the property that returns the datapoint to check rangelowBoundary
- constant indicating the lower boundaryhighBoundary
- constant indicating the upper boundarypublic static BetweenExpression between(Expression datapoint, Expression lowBoundary, Expression highBoundary)
datapoint
- returns the datapoint to check rangelowBoundary
- returns values for the lower boundaryhighBoundary
- returns values for the upper boundarypublic static BetweenExpression range(Expression datapoint, Expression lowBoundary, Expression highBoundary, boolean isLowIncluded, boolean isHighIncluded)
datapoint
- returns the datapoint to check rangelowBoundary
- returns values for the lower boundaryhighBoundary
- returns values for the upper boundaryisLowIncluded
- true to indicate lower boundary itself is included in the rangeisHighIncluded
- true to indicate upper boundary itself is included in the rangepublic static Disjunction or()
public static Disjunction or(Expression first, Expression second, Expression... expressions)
first
- an expression returning values to junctionsecond
- an expression returning values to junctionexpressions
- an optional list of expressions returning values to junctionpublic static Conjunction and()
public static Conjunction and(Expression first, Expression second, Expression... expressions)
first
- an expression returning values to junctionsecond
- an expression returning values to junctionexpressions
- an optional list of expressions returning values to junctionpublic static RelationalOpExpression ge(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression ge(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression geProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression gt(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression gt(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression gtProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression le(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression leProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression le(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression lt(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression ltProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression lt(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression eq(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression neq(String propertyName, Object value)
propertyName
- the name of the property providing left hand side valuesvalue
- is the constant to comparepublic static RelationalOpExpression eqProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression neqProperty(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand side valuespropertyRight
- the name of the property providing right hand side valuespublic static RelationalOpExpression eq(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression neq(Expression left, Expression right)
left
- the expression providing left hand side valuesright
- the expression providing right hand side valuespublic static RelationalOpExpression isNotNull(String property)
property
- the name of the property supplying the value to check for nullpublic static RelationalOpExpression isNotNull(Expression expression)
expression
- supplies the value to check for nullpublic static RelationalOpExpression isNull(String property)
property
- the name of the property supplying the value to check for nullpublic static RelationalOpExpression isNull(Expression expression)
expression
- supplies the value to check for nullpublic static PropertyValueExpression property(String propertyName)
An expression that returns the value of the named property.
Nested, indexed or mapped properties follow the documented sytnax.
propertyName
- is the name of the property to return the value for.public static LikeExpression like(String propertyName, String value)
propertyName
- the name of the property providing values to matchvalue
- is the string to match againstpublic static LikeExpression like(Expression left, Expression right)
left
- provides value to matchright
- provides string to match againstpublic static LikeExpression like(String propertyName, Object value, String escape)
propertyName
- the name of the property providing values to matchvalue
- is the string to match againstescape
- the escape character(s)public static LikeExpression like(Expression left, Expression right, Expression escape)
left
- provides value to matchright
- provides string to match againstescape
- the escape character(s)public static LikeExpression notLike(String propertyName, String value)
propertyName
- the name of the property providing values to matchvalue
- is the string to match againstpublic static LikeExpression notLike(Expression left, Expression right)
left
- provides value to matchright
- provides string to match againstpublic static LikeExpression notLike(String propertyName, Object value, String escape)
propertyName
- the name of the property providing values to matchvalue
- is the string to match againstescape
- the escape character(s)public static LikeExpression notLike(Expression left, Expression right, Expression escape)
left
- provides value to matchright
- provides string to match againstescape
- the escape character(s)public static AvgProjectionExpression avg(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static AvgProjectionExpression avg(Expression expression)
expression
- provides the values to aggregate.public static AvgProjectionExpression avgDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static AvgProjectionExpression avgDistinct(Expression expression)
expression
- provides the values to aggregate.public static MedianProjectionExpression median(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MedianProjectionExpression median(Expression expression)
expression
- provides the values to aggregate.public static MedianProjectionExpression medianDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MedianProjectionExpression medianDistinct(Expression expression)
expression
- provides the values to aggregate.public static StddevProjectionExpression stddev(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static StddevProjectionExpression stddev(Expression expression)
expression
- provides the values to aggregate.public static StddevProjectionExpression stddevDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static StddevProjectionExpression stddevDistinct(Expression expression)
expression
- provides the values to aggregate.public static AvedevProjectionExpression avedev(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static LastEverProjectionExpression lastEver(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static LastProjectionExpression last(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static LastEverProjectionExpression lastEver(Expression expression)
expression
- provides the values to aggregate.public static LastProjectionExpression last(Expression expression)
expression
- provides the values to aggregate.public static FirstProjectionExpression first(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static FirstEverProjectionExpression firstEver(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static FirstProjectionExpression first(Expression expression)
expression
- provides the values to aggregate.public static FirstEverProjectionExpression firstEver(Expression expression)
expression
- provides the values to aggregate.public static AvedevProjectionExpression avedev(Expression expression)
expression
- provides the values to aggregate.public static AvedevProjectionExpression avedevDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static AvedevProjectionExpression avedevDistinct(Expression expression)
expression
- provides the values to aggregate.public static SumProjectionExpression sum(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static SumProjectionExpression sum(Expression expression)
expression
- provides the values to aggregate.public static SumProjectionExpression sumDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static SumProjectionExpression sumDistinct(Expression expression)
expression
- provides the values to aggregate.public static CountStarProjectionExpression countStar()
public static CountProjectionExpression count(String propertyName)
propertyName
- name of the property providing the values to count.public static CountProjectionExpression count(Expression expression)
expression
- provides the values to count.public static CountProjectionExpression countDistinct(String propertyName)
propertyName
- name of the property providing the values to count.public static CountProjectionExpression countDistinct(Expression expression)
expression
- provides the values to count.public static MinProjectionExpression min(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MinProjectionExpression min(Expression expression)
expression
- provides the values to aggregate.public static MinProjectionExpression minDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MinProjectionExpression minDistinct(Expression expression)
expression
- provides the values to aggregate.public static MaxProjectionExpression max(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MaxProjectionExpression max(Expression expression)
expression
- provides the values to aggregate.public static MaxProjectionExpression maxDistinct(String propertyName)
propertyName
- name of the property providing the values to aggregate.public static MaxProjectionExpression maxDistinct(Expression expression)
expression
- provides the values to aggregate.public static ArithmaticExpression modulo(Expression left, Expression right)
left
- the expression providing left hand valuesright
- the expression providing right hand valuespublic static ArithmaticExpression modulo(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand valuespropertyRight
- the name of the property providing right hand valuespublic static ArithmaticExpression minus(Expression left, Expression right)
left
- the expression providing left hand valuesright
- the expression providing right hand valuespublic static ArithmaticExpression minus(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand valuespropertyRight
- the name of the property providing right hand valuespublic static ArithmaticExpression plus(Expression left, Expression right)
left
- the expression providing left hand valuesright
- the expression providing right hand valuespublic static ArithmaticExpression plus(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand valuespropertyRight
- the name of the property providing right hand valuespublic static ArithmaticExpression multiply(Expression left, Expression right)
left
- the expression providing left hand valuesright
- the expression providing right hand valuespublic static ArithmaticExpression multiply(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand valuespropertyRight
- the name of the property providing right hand valuespublic static ArithmaticExpression divide(Expression left, Expression right)
left
- the expression providing left hand valuesright
- the expression providing right hand valuespublic static ArithmaticExpression divide(String propertyLeft, String propertyRight)
propertyLeft
- the name of the property providing left hand valuespropertyRight
- the name of the property providing right hand valuespublic static ConcatExpression concat(String property, String... properties)
property
- the name of property returning values to concatenateproperties
- the names of additional properties returning values to concatenatepublic static SubqueryExpression subquery(EPStatementObjectModel model)
model
- is the object model of the lookuppublic static SubqueryInExpression subqueryIn(String property, EPStatementObjectModel model)
property
- is the name of the property that returns the value to match against the values returned by the lookupmodel
- is the object model of the lookuppublic static SubqueryInExpression subqueryNotIn(String property, EPStatementObjectModel model)
property
- is the name of the property that returns the value to match against the values returned by the lookupmodel
- is the object model of the lookuppublic static SubqueryExistsExpression subqueryExists(EPStatementObjectModel model)
model
- is the object model of the lookuppublic static SubqueryInExpression subqueryIn(Expression expression, EPStatementObjectModel model)
expression
- returns the value to match against the values returned by the lookupmodel
- is the object model of the lookuppublic static SubqueryInExpression subqueryNotIn(Expression expression, EPStatementObjectModel model)
expression
- returns the value to match against the values returned by the lookupmodel
- is the object model of the lookuppublic static TimePeriodExpression timePeriod(Double days, Double hours, Double minutes, Double seconds, Double milliseconds)
Each part can be a null value in which case the part is left out.
days
- day parthours
- hour partminutes
- minute partseconds
- seconds partmilliseconds
- milliseconds partpublic static TimePeriodExpression timePeriod(Object days, Object hours, Object minutes, Object seconds, Object milliseconds)
Each part can be a null value in which case the part is left out.
Each object value may be a String value for an event property, or a number for a constant.
days
- day parthours
- hour partminutes
- minute partseconds
- seconds partmilliseconds
- milliseconds partpublic static CrontabParameterExpression crontabScheduleWildcard()
public static CrontabParameterExpression crontabScheduleItem(Integer parameter, ScheduleItemType type)
parameter
- the constant parameter for the typetype
- the type of crontab parameterpublic static CrontabFrequencyExpression crontabScheduleFrequency(int frequency)
frequency
- the constant for the frequencypublic static CrontabRangeExpression crontabScheduleRange(int lowerBounds, int upperBounds)
lowerBounds
- the lower boundsupperBounds
- the upper boundsprotected static List<PropertyValueExpression> toPropertyExpressions(String... properties)
properties
- is a list of property namesprotected static PropertyValueExpression getPropExpr(String propertyName)
propertyName
- the name of the property returning property values