public class DBCmdParam extends DBExpr
| Modifier and Type | Field and Description |
|---|---|
protected DBCommand |
cmd |
protected Object |
reference |
protected DataType |
type |
protected Object |
value |
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESIS, CTX_VALUE| Modifier | Constructor and Description |
|---|---|
protected |
DBCmdParam(DBCommand cmd,
DataType type,
Object value)
Protected constructor used e.g. by DBCommand.addParam(...)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReferencedColumns(Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression.
|
void |
addSQL(DBSQLBuilder sql,
long context)
Used to build the SQL command.
|
DBCommand |
getCmd()
Returns the command this parameter belongs to
|
protected Object |
getCmdParamValue(Object value)
Returns the internal parameter value for a given "real" value.
|
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to.
|
DataType |
getDataType()
Returns the data type of the command parameter
|
Object |
getReference()
Returns the reference object associated with this param
|
Object |
getValue()
Returns the current value of the parameter.
|
DBValueExpr |
getValueExpr(DBDatabase db)
Returns a value expression for this param
|
DBCmdParam |
setReference(Object reference)
Sets a reference object associated with this param
|
void |
setValue(Object value)
Sets the current value of the parameter
|
checkParamNullprotected DBCommand cmd
protected DataType type
protected Object value
protected Object reference
protected DBCmdParam(DBCommand cmd, DataType type, Object value)
cmd - the command to which this DBCommand belongs totype - the parameter data typevalue - the initial value (can be changed any time by calling setValue(...))public DBValueExpr getValueExpr(DBDatabase db)
db - the databaseprotected Object getCmdParamValue(Object value)
value - the "real" valuepublic void addSQL(DBSQLBuilder sql, long context)
DBExprpublic void addReferencedColumns(Set<DBColumn> list)
DBExpraddReferencedColumns in class DBExprlist - list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)public final DBDatabase getDatabase()
DBObjectgetDatabase in class DBObjectpublic DBCommand getCmd()
public DataType getDataType()
public Object getValue()
public void setValue(Object value)
value - the new valuepublic Object getReference()
public DBCmdParam setReference(Object reference)
reference - the reference objectCopyright © 2008–2023 Apache Software Foundation. All rights reserved.