public class IndexCondition extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ALWAYS_FALSE
A bit of a search mask meaning 'the condition is always false'.
|
static int |
END
A bit of a search mask meaning 'smaller or equal'.
|
static int |
EQUALITY
A bit of a search mask meaning 'equal'.
|
static int |
RANGE
A search mask meaning 'between'.
|
static int |
START
A bit of a search mask meaning 'larger or equal'.
|
Modifier and Type | Method and Description |
---|---|
static IndexCondition |
get(int compareType,
ExpressionColumn column,
Expression expression)
Create an index condition with the given parameters.
|
Column |
getColumn()
Get the referenced column.
|
int |
getCompareType() |
ResultInterface |
getCurrentResult(Session session)
Get the current result of the expression.
|
Value |
getCurrentValue(Session session)
Get the current value of the expression.
|
Value[] |
getCurrentValueList(Session session)
Get the current value list of the expression.
|
static IndexCondition |
getInList(ExpressionColumn column,
List<Expression> list)
Create an index condition with the compare type IN_LIST and with the
given parameters.
|
static IndexCondition |
getInQuery(ExpressionColumn column,
Query query)
Create an index condition with the compare type IN_QUERY and with the
given parameters.
|
int |
getMask(ArrayList<IndexCondition> indexConditions)
Get the comparison bit mask.
|
String |
getSQL()
Get the SQL snippet of this comparison.
|
boolean |
isAlwaysFalse()
Check if the result is always false.
|
boolean |
isEnd()
Check if this index condition is of the type column smaller or equal to
value.
|
boolean |
isEvaluatable()
Check if the expression can be evaluated.
|
boolean |
isStart()
Check if this index condition is of the type column larger or equal to
value.
|
public static final int EQUALITY
public static final int START
public static final int END
public static final int RANGE
public static final int ALWAYS_FALSE
public static IndexCondition get(int compareType, ExpressionColumn column, Expression expression)
compareType
- the comparison typecolumn
- the columnexpression
- the expressionpublic static IndexCondition getInList(ExpressionColumn column, List<Expression> list)
column
- the columnlist
- the expression listpublic static IndexCondition getInQuery(ExpressionColumn column, Query query)
column
- the columnquery
- the select statementpublic Value getCurrentValue(Session session)
session
- the sessionpublic Value[] getCurrentValueList(Session session)
session
- the sessionpublic ResultInterface getCurrentResult(Session session)
session
- the sessionpublic String getSQL()
public int getMask(ArrayList<IndexCondition> indexConditions)
indexConditions
- all index conditionspublic boolean isAlwaysFalse()
public boolean isStart()
public boolean isEnd()
public int getCompareType()
public Column getColumn()
public boolean isEvaluatable()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.