|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.kernel.exps.AbstractVal org.apache.openjpa.jdbc.kernel.exps.Const org.apache.openjpa.jdbc.kernel.exps.Lit
public class Lit
A literal value in a filter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
---|
Const.ConstExpState |
Field Summary |
---|
Fields inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
---|
FALSE, TRUE |
Fields inherited from interface org.apache.openjpa.kernel.exps.Literal |
---|
TYPE_BOOLEAN, TYPE_CLASS, TYPE_COLLECTION, TYPE_DATE, TYPE_ENUM, TYPE_NUMBER, TYPE_SQ_STRING, TYPE_STRING, TYPE_TIME, TYPE_TIMESTAMP, TYPE_UNKNOWN |
Fields inherited from interface org.apache.openjpa.jdbc.kernel.exps.Val |
---|
ABS_VAL, ARGS_VAL, CMP_EQUAL, COALESCE_VAL, CONCAT_VAL, FORCE_OUTER, GENERALCASE_VAL, INDEXOF_VAL, JOIN_REL, LENGTH_VAL, LOCATE_VAL, LOWER_VAL, MATH_VAL, NULL_CMP, NULLIF_VAL, SIMPLECASE_VAL, SQRT_VAL, SUBSTRING_VAL, TRIM_VAL, UPPER_VAL, VAL, WHENCONDITION_VAL, WHENSCALAR_VAL |
Constructor Summary | |
---|---|
Lit(Object val,
int ptype)
Constructor. |
Method Summary | |
---|---|
void |
appendTo(Select sel,
ExpContext ctx,
ExpState state,
SQLBuffer sql,
int index)
Append the index th SQL element to the given buffer. |
void |
calculateValue(Select sel,
ExpContext ctx,
ExpState state,
Val other,
ExpState otherState)
Calculate and cache the SQL for this value. |
int |
getParseType()
The type the literal was parsed as. |
Object |
getRawValue()
|
Class |
getType()
Return the expected type for this value, or Object if
the type is unknown. |
Object |
getValue()
The value of this literal. |
Object |
getValue(Object[] params)
Return the value for this constant given the specified parameters. |
ExpState |
initialize(Select sel,
ExpContext ctx,
int flags)
Initialize the value. |
boolean |
isRaw()
|
void |
setImplicitType(Class type)
Set the implicit type of the value, based on how it is used in the filter. |
void |
setRaw(boolean isRaw)
|
void |
setValue(Object val)
The value of this literal. |
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.Const |
---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, getMetaData, getSQLValue, getValue, groupBy, isSQLValueNull, length, load, orderBy, select, selectColumns, setMetaData |
Methods inherited from class org.apache.openjpa.jdbc.kernel.exps.AbstractVal |
---|
acceptVisit, appendIndex, appendType, getAlias, getId, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, toDataStoreValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.openjpa.kernel.exps.Value |
---|
acceptVisit, getAlias, getMetaData, getName, getPath, getSelectAs, isAggregate, isVariable, isXPath, setAlias, setMetaData |
Constructor Detail |
---|
public Lit(Object val, int ptype)
Method Detail |
---|
public Class getType()
Value
Object
if
the type is unknown.
getType
in interface Value
public void setImplicitType(Class type)
Value
Object
from Value.getType()
.
setImplicitType
in interface Value
public int getParseType()
Literal
getParseType
in interface Literal
public Object getValue()
Literal
getValue
in interface Literal
public void setValue(Object val)
Literal
setValue
in interface Literal
public Object getValue(Object[] params)
Constant
getValue
in interface Constant
public boolean isRaw()
public void setRaw(boolean isRaw)
public Object getRawValue()
public ExpState initialize(Select sel, ExpContext ctx, int flags)
Val
initialize
in interface Val
initialize
in class Const
public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState)
Val
length
or any append
methods.
calculateValue
in interface Val
calculateValue
in class Const
other
- the value being compared to, or null if not a comparisonpublic void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index)
Val
index
th SQL element to the given buffer.
appendTo
in interface Val
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |