public class DBCmdParam extends DBExpr
Modifier and Type | Field and Description |
---|---|
protected DBCommand |
cmd |
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 |
getValue()
Returns the current value of the parameter.
|
void |
setValue(Object value)
Sets the current value of the parameter
|
checkParamNull
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(...))protected Object getCmdParamValue(Object value)
value
- the "real" valuepublic void addSQL(DBSQLBuilder sql, long context)
DBExpr
public void addReferencedColumns(Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)
public final DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public DBCommand getCmd()
public DataType getDataType()
public Object getValue()
public void setValue(Object value)
value
- the new valueCopyright © 2008–2023 Apache Software Foundation. All rights reserved.