public class EnumExpr extends AbstractAmberExpr
IS_INNER_JOIN, USES_DATA
Constructor and Description |
---|
EnumExpr(java.lang.Class javaType,
java.lang.String name,
int ordinal)
Creates a new enum expression.
|
Modifier and Type | Method and Description |
---|---|
AmberExpr |
bindSelect(QueryParser parser)
Binds the expression as a select item.
|
void |
generateHaving(CharBuffer cb)
Generates the having expression.
|
void |
generateUpdateWhere(CharBuffer cb)
Generates the (update) enum.
|
void |
generateWhere(CharBuffer cb)
Generates the enum.
|
java.lang.Class |
getJavaType()
Returns the java type
|
int |
getOrdinal()
Returns the enum value
|
AmberType |
getType()
Returns the expr type.
|
boolean |
isOrdinal()
Returns true for ordinal
|
void |
setOrdinal(boolean isOrdinal)
Sets true for ordinal
|
java.lang.String |
toString() |
createBoolean, exists, exists, findItem, generateJoin, generateSelect, getCacheObject, getColumnCount, getObject, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom, usesFrom
public EnumExpr(java.lang.Class javaType, java.lang.String name, int ordinal)
javaType
- the java type of the enumname
- the string name of the enum valueordinal
- the integer value of the enumpublic AmberType getType()
getType
in interface AmberExpr
getType
in class AbstractAmberExpr
public java.lang.Class getJavaType()
public int getOrdinal()
public boolean isOrdinal()
public void setOrdinal(boolean isOrdinal)
public AmberExpr bindSelect(QueryParser parser)
bindSelect
in interface AmberExpr
bindSelect
in class AbstractAmberExpr
public void generateWhere(CharBuffer cb)
generateWhere
in interface AmberExpr
generateWhere
in class AbstractAmberExpr
public void generateUpdateWhere(CharBuffer cb)
generateUpdateWhere
in interface AmberExpr
generateUpdateWhere
in class AbstractAmberExpr
public void generateHaving(CharBuffer cb)
generateHaving
in interface AmberExpr
generateHaving
in class AbstractAmberExpr
public java.lang.String toString()
toString
in class java.lang.Object