cqosdb::FieldType Class Reference

#include <FieldType.hxx>

Inheritance diagram for cqosdb::FieldType:

cqosdb::DefaultProperty cqosdb::Parameter cqosdb::Parameter

List of all members.

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


Constructor & Destructor Documentation

cqosdb::FieldType::FieldType ( string  name,
string  tableName,
int  value 
)

cqosdb::FieldType::FieldType ( string  name,
string  tableName,
long  value 
)

cqosdb::FieldType::FieldType ( string  name,
string  tableName,
double  value 
)

cqosdb::FieldType::FieldType ( string  name,
string  tableName,
string  value 
)

cqosdb::FieldType::FieldType ( string  name,
string  tbName 
)

cqosdb::FieldType::FieldType ( string  name,
int  type 
)

cqosdb::FieldType::FieldType (  )  [inline]

cqosdb::FieldType::~FieldType (  )  [inline]


Member Function Documentation

string cqosdb::FieldType::getClassName (  )  [virtual]

Return class name.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setName ( string  name  )  [virtual]

Set parameter name.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setDataType ( int  type  )  [virtual]

Set parameter value type.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setValue ( int  value  )  [virtual]

Set parameter value, integer type.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setValue ( long  value  )  [virtual]

Set parameter value, long integer type.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setValue ( double  value  )  [virtual]

Set parameter value, double type.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setValue ( string  value  )  [virtual]

Set parameter value, string type.

Reimplemented from cqosdb::DefaultProperty.

void cqosdb::FieldType::setTBName ( string  tbName  )  [virtual]

Set table where the parameter is stored in the database.

Reimplemented from cqosdb::DefaultProperty.

string cqosdb::FieldType::getName (  )  [virtual]

Grab parameter name.

Reimplemented from cqosdb::DefaultProperty.

int cqosdb::FieldType::getDataType (  )  [virtual]

Grab parameter value type.

Reimplemented from cqosdb::DefaultProperty.

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

Grab parameter integer value.

Reimplemented from cqosdb::DefaultProperty.

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

Grab parameter long integer value.

Reimplemented from cqosdb::DefaultProperty.

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

Grab parameter double value.

Reimplemented from cqosdb::DefaultProperty.

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

Grab parameter string value.

Reimplemented from cqosdb::DefaultProperty.

string cqosdb::FieldType::getTBName (  )  [virtual]

Grab database table where the parameter is stored.

Reimplemented from cqosdb::DefaultProperty.

bool cqosdb::FieldType::compareWith ( Parameter another,
double  tolerance,
int  relation 
) [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

Reimplemented from cqosdb::DefaultProperty.

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.


Member Data Documentation

string cqosdb::FieldType::fieldName [private]

Reimplemented from cqosdb::DefaultProperty.

Reimplemented from cqosdb::DefaultProperty.

string cqosdb::FieldType::tableName [private]

Reimplemented from cqosdb::DefaultProperty.


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

Generated on Thu May 8 19:35:48 2008 for CQoS Database Library by  doxygen 1.5.5