cqosdb::Parameter Class Reference

This class defines a parameter, e.g., a parameter in {P} in meta-partitioner. More...

#include <Metadata.hxx>

Inheritance diagram for cqosdb::Parameter:

cqosdb::DefaultProperty

List of all members.

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.


Detailed Description

This class defines a parameter, e.g., a parameter in {P} in meta-partitioner.

Constructor & Destructor Documentation

virtual cqosdb::Parameter::~Parameter (  )  [inline, virtual]


Member Function Documentation

virtual string cqosdb::Parameter::getClassName (  )  [pure virtual]

Return class name.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setName ( string  name  )  [pure virtual]

Set parameter name.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setValue ( int  value  )  [pure virtual]

Set parameter value, integer type.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setValue ( long  value  )  [pure virtual]

Set parameter value, long integer type.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setValue ( double  value  )  [pure virtual]

Set parameter value, double type.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setValue ( string  value  )  [pure virtual]

Set parameter value, string type.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setValue ( bool  value  )  [pure virtual]

Set parameter value, boolean type.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setTBName ( string  tbName  )  [pure virtual]

Set table where the parameter is stored in the database.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::setTrialID ( int  trialID  )  [pure virtual]

Set trial the parameter belongs to.

Implemented in cqosdb::DefaultProperty.

virtual string cqosdb::Parameter::getName (  )  [pure virtual]

Grab parameter name.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::getValue ( int *  value  )  [pure virtual]

Grab parameter integer value.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::getValue ( long *  value  )  [pure virtual]

Grab parameter long integer value.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::getValue ( double *  value  )  [pure virtual]

Grab parameter double value.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::getValue ( string *  value  )  [pure virtual]

Grab parameter string value.

Implemented in cqosdb::DefaultProperty.

virtual void cqosdb::Parameter::getValue ( bool *  value  )  [pure virtual]

Grab parameter boolean value.

Implemented in cqosdb::DefaultProperty.

virtual string cqosdb::Parameter::getTBName (  )  [pure virtual]

Grab database table where the parameter is stored.

Implemented in cqosdb::DefaultProperty.

virtual int cqosdb::Parameter::getTrialID (  )  [pure virtual]

Grab trial the parameter belongs to.

Implemented in cqosdb::DefaultProperty.

virtual bool cqosdb::Parameter::compareWith ( Parameter another,
double  tolerance,
int  relation 
) [pure virtual]

Compare with another parameter of the same type.

Parameters:
another another parameter
tolerance comparison tolerance value
relation comparison relation, which could be LT, LTEQ, GT, GTEQ, EQ, NEQ, BT
Returns:
true if (this-another) .relation. tolerance is true, false otherwise

Implemented in cqosdb::DefaultProperty.

virtual bool cqosdb::Parameter::compareWith ( Parameter another,
int  relation 
) [pure virtual]

Compare with another parameter of the same type.

Parameters:
another another parameter
relation comparison relation, which could be LT, LTEQ, GT, GTEQ, EQ, NEQ
Returns:
true if this .relation. another is true, false otherwise

Implemented in cqosdb::DefaultProperty.

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.


The documentation for this class was generated from the following file:

Generated on Tue Sep 23 19:59:06 2008 for CQoS Database Library by  doxygen 1.5.5