This class defines a parameter, e.g., a parameter in {P} in meta-partitioner.
|
Public Member Functions |
virtual | ~Parameter () |
virtual string | getClassName ()=0 |
| Return class name.
|
virtual void | setName (string name)=0 |
| Set parameter name.
|
virtual void | setValue (int value)=0 |
| Set parameter value, integer type.
|
virtual void | setValue (long value)=0 |
| Set parameter value, long integer type.
|
virtual void | setValue (double value)=0 |
| Set parameter value, double type.
|
virtual void | setValue (string value)=0 |
| Set parameter value, string type.
|
virtual void | setValue (bool value)=0 |
| Set parameter value, boolean type.
|
virtual void | setTBName (string tbName)=0 |
| Set table where the parameter is stored in the database.
|
virtual void | setTrialID (int trialID)=0 |
| Set trial the parameter belongs to.
|
virtual string | getName ()=0 |
| Grab parameter name.
|
virtual void | getValue (int *value)=0 |
| Grab parameter integer value.
|
virtual void | getValue (long *value)=0 |
| Grab parameter long integer value.
|
virtual void | getValue (double *value)=0 |
| Grab parameter double value.
|
virtual void | getValue (string *value)=0 |
| Grab parameter string value.
|
virtual void | getValue (bool *value)=0 |
| Grab parameter boolean value.
|
virtual string | getTBName ()=0 |
| Grab database table where the parameter is stored.
|
virtual int | getTrialID ()=0 |
| Grab trial the parameter belongs to.
|
virtual bool | compareWith (Parameter &another, double tolerance, int relation)=0 |
| Compare with another parameter of the same type.
|
virtual bool | compareWith (Parameter &another, int relation)=0 |
| Compare with another parameter of the same type.
|
virtual string | getDBConditions ()=0 |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameter value from DB.
|
virtual string | getDBConditions (int tbIndex, double value, int relation)=0 |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
|
virtual string | getDBConditions (int tbIndex, string aStr, int relation)=0 |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
|
virtual string | getDBConditions (int tbIndex, bool boolVal, int relation)=0 |
| Produce a SQL string text that specifies conditions related to the parameter, which can be used in 'where' clause in a SQL command for retrieving parameters satisfying the conditions.
|
This class defines a parameter, e.g., a parameter in {P} in meta-partitioner.
virtual string cqosdb::Parameter::getDBConditions |
( |
|
) |
[pure 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 retrieving parameter value from DB.
for example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getInterEvtNo()=1, then the string is like: myTB.parameter_name='myName' and myTB.trial=0 and myTB.intervel_event=1
Implemented in cqosdb::DefaultProperty.
virtual string cqosdb::Parameter::getDBConditions |
( |
int |
tbIndex, |
|
|
double |
value, |
|
|
int |
relation | |
|
) |
| | [pure 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 retrieving parameters satisfying the conditions.
- Parameters:
-
| tbIndex | >= 0 index of the parameter table < 0 don't use index |
| value,value | to compare with |
| 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.getInterEvtNo()=1, parameter.getValue()=3, tbIndex =0, value = 0.3, relation = LT then the string is like: myTB0.parameter_name='myName' and myTB0.trial=0 and myTB0.interval_event=1 and myTB0.parameter_value < 0.3
Implemented in cqosdb::DefaultProperty.
virtual string cqosdb::Parameter::getDBConditions |
( |
int |
tbIndex, |
|
|
string |
aStr, |
|
|
int |
relation | |
|
) |
| | [pure 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 retrieving parameters satisfying the conditions.
- Parameters:
-
| tbIndex | >= 0 index of the parameter table < 0 don't use index |
| aStr | string to compare with |
| relation | comparison relation, either EQ, or NEQ |
For example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getInterEvtNo()=1, parameter.getValue()='foo', tbIndex =0, aStr = 'fet', relation = eq then the string is like: myTB0.parameter_name='myName' and myTB0.trial=0 and myTB0.interval_event=1 and myTB0.parameter_value = 'fet'
Implemented in cqosdb::DefaultProperty.
virtual string cqosdb::Parameter::getDBConditions |
( |
int |
tbIndex, |
|
|
bool |
boolVal, |
|
|
int |
relation | |
|
) |
| | [pure 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 retrieving parameters satisfying the conditions.
- Parameters:
-
| tbIndex | >= 0 index of the parameter table < 0 don't use index |
| boolVal | boolean value to compare with |
| relation | comparison relation, either EQ, or NEQ |
For example, if parameter.getName() = 'myName', parameter.getTBName() = 'myTB', parameter.getTrialID() =0; parameter.getInterEvtNo()=1, parameter.getValue()='true', tbIndex =0, boolVal = true, relation = eq then the string is like: myTB0.parameter_name='myName' and myTB0.trial=0 and myTB0.interval_event=1 and myTB0.parameter_value = 'true'
Implemented in cqosdb::DefaultProperty.