|
Public Member Functions |
| FieldType (string name, string tableName, int value) |
| FieldType (string name, string tableName, long value) |
| FieldType (string name, string tableName, double value) |
| FieldType (string name, string tableName, string value) |
| FieldType (string name, string tbName) |
| FieldType (string name, int type) |
| FieldType () |
| ~FieldType () |
string | getClassName () |
| Return class name.
|
void | setName (string name) |
| Set parameter name.
|
void | setDataType (int type) |
| Set parameter value type.
|
void | setValue (int value) |
| Set parameter value, integer type.
|
void | setValue (long value) |
| Set parameter value, long integer type.
|
void | setValue (double value) |
| Set parameter value, double type.
|
void | setValue (string value) |
| Set parameter value, string type.
|
void | setTBName (string tbName) |
| Set table where the parameter is stored in the database.
|
string | getName () |
| Grab parameter name.
|
int | getDataType () |
| Grab parameter value type.
|
void | getValue (int *value) |
| Grab parameter integer value.
|
void | getValue (long *value) |
| Grab parameter long integer value.
|
void | getValue (double *value) |
| Grab parameter double value.
|
void | getValue (string *value) |
| Grab parameter string value.
|
string | getTBName () |
| Grab database table where the parameter is stored.
|
bool | compareWith (Parameter &another, double tolerance, int relation) |
| Compare with another parameter of the same type.
|
string | getDBConditions () |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command.
|
string | getDBConditions (int tbIndex, double tolerance, int relation) |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command.
|
Private Attributes |
string | fieldName |
int | fieldType |
double | doubleValue |
string | stringValue |
string | tableName |
string cqosdb::FieldType::getDBConditions |
( |
|
) |
[virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command.
for example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getIterNo()=1, then the string is like: myTB.parameter_name='myName' and myTB.trial=0 and myTB.iter=1
Reimplemented from cqosdb::DefaultProperty.
string cqosdb::FieldType::getDBConditions |
( |
int |
tbIndex, |
|
|
double |
tolerance, |
|
|
int |
relation | |
|
) |
| | [virtual] |
Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command.
- Parameters:
-
| tbIndex | index of the parameter table |
| tolerance | comparison tolerance value |
| relation | comparison relation, either L, LTEQ, EQ, NEQ, GT, GTEQ, or BT |
For example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getIterNo()=1, parameter.getValue()=3, tbIndex =0, tolerance = 0.3, relation = LT then the string is like: myTB0.parameter_name='myName' and myTB0.trial=0 and myTB0.iter=1 and myTB0.value < (3+0.3)
Reimplemented from cqosdb::DefaultProperty.