public class ArgExpr extends AbstractAmberExpr
IS_INNER_JOIN, USES_DATA
Constructor and Description |
---|
ArgExpr(QueryParser parser,
int index)
Creates a new argument expression.
|
ArgExpr(QueryParser parser,
java.lang.String name,
int index)
Creates a new named argument expression.
|
Modifier and Type | Method and Description |
---|---|
AmberExpr |
bindSelect(QueryParser parser)
Binds the expression as a select item.
|
boolean |
exists()
Returns true if the expression must exist
|
void |
generateHaving(CharBuffer cb)
Generates the having expression.
|
void |
generateUpdateWhere(CharBuffer cb)
Generates the (update) literal.
|
void |
generateWhere(CharBuffer cb)
Generates the literal.
|
int |
getIndex()
Returns the index value
|
java.lang.String |
getName()
Returns the argument name, or null
if it is a positional parameter.
|
AmberType |
getType()
Returns the expr type.
|
void |
setParameter(java.sql.PreparedStatement pstmt,
int i,
AmberType[] argTypes,
java.lang.Object[] argValues)
Sets the parameter.
|
void |
setType(AmberType type)
Sets the expr type.
|
java.lang.String |
toString() |
createBoolean, exists, findItem, generateJoin, generateSelect, getCacheObject, getColumnCount, getObject, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom, usesFrom
public ArgExpr(QueryParser parser, int index)
index
- the argument indexpublic ArgExpr(QueryParser parser, java.lang.String name, int index)
String
- the argument namepublic int getIndex()
public AmberType getType()
getType
in interface AmberExpr
getType
in class AbstractAmberExpr
public void setType(AmberType type)
public AmberExpr bindSelect(QueryParser parser)
bindSelect
in interface AmberExpr
bindSelect
in class AbstractAmberExpr
public boolean exists()
exists
in interface AmberExpr
exists
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 getName()
public void setParameter(java.sql.PreparedStatement pstmt, int i, AmberType[] argTypes, java.lang.Object[] argValues) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String toString()
toString
in class java.lang.Object