|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.objectstore.query.QueryExpression
public class QueryExpression
Represents an arithmetic or substring expression, analogous to those in SQL
| Field Summary | |
|---|---|
static int |
ADD
Addition of two numeric fields |
static int |
DIVIDE
Division of two numeric fields |
static int |
INDEX_OF
Position of specified string in other specified string |
static int |
LOWER
Lower case version of the given string |
static int |
MULTIPLY
Multiplication of two numeric fields |
static int |
SUBSTRING
Substring of specified length from index in string |
static int |
SUBTRACT
Subtraction of two numeric fields |
static int |
UPPER
Upper case version of the given string |
| Constructor Summary | |
|---|---|
QueryExpression(int op,
QueryEvaluable arg)
Constructs a String QueryExpression to perform upper and lowercase conversions. |
|
QueryExpression(QueryEvaluable arg1,
int op,
QueryEvaluable arg2)
Constructs an arithmetic QueryExpression from two evaluable items |
|
QueryExpression(QueryEvaluable arg,
QueryEvaluable pos,
QueryEvaluable len)
Constructs a substring QueryExpression from a QueryEvaluable and start and length QueryEvaluables |
|
| Method Summary | |
|---|---|
int |
getApproximateType()
Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained. |
QueryEvaluable |
getArg1()
Returns the left argument of the expression. |
QueryEvaluable |
getArg2()
Returns the right argument, or the position argument of the substring. |
QueryEvaluable |
getArg3()
Returns the length argument of a substring expression. |
int |
getOperation()
Returns the operation. |
java.lang.Class<?> |
getType()
Get Java type represented by this item. |
void |
youAreType(java.lang.Class<?> cls)
Allows a caller to suggest to this object that it holds a value of a certain type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ADD
public static final int SUBTRACT
public static final int MULTIPLY
public static final int DIVIDE
public static final int SUBSTRING
public static final int INDEX_OF
public static final int LOWER
public static final int UPPER
| Constructor Detail |
|---|
public QueryExpression(QueryEvaluable arg1,
int op,
QueryEvaluable arg2)
arg1 - the first argumentop - the required operationarg2 - the second argument
java.lang.IllegalArgumentException - if there is a mismatch between any of the argument
types and the specified operation
public QueryExpression(QueryEvaluable arg,
QueryEvaluable pos,
QueryEvaluable len)
arg - A QueryEvaluable representing a Stringpos - start indexlen - length in characters
java.lang.IllegalArgumentException - if there is a mismatch between the argument type
and the specified operation
public QueryExpression(int op,
QueryEvaluable arg)
op - the required operationarg - the String argument
java.lang.IllegalArgumentException - if there is a mismatch between the argument and operation| Method Detail |
|---|
public java.lang.Class<?> getType()
getType in interface QueryOrderablegetType in interface QuerySelectablepublic int getOperation()
public QueryEvaluable getArg1()
public QueryEvaluable getArg2()
public QueryEvaluable getArg3()
public void youAreType(java.lang.Class<?> cls)
youAreType in interface QueryEvaluablecls - the Class of the type to be imposed on this objectpublic int getApproximateType()
getApproximateType in interface QueryEvaluable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||