Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

QueryRecord Class Reference

#include <ServerConnection.h>

List of all members.

Public Types

enum  Attr {
  UNDEF = 0, JOBID, OWNER, STATUS,
  LOCATION, DESTINATION, DONECODE, USERTAG,
  TIME, LEVEL, HOST, SOURCE,
  INSTANCE, EVENT_TYPE, CHKPT_TAG, RESUBMITTED,
  PARENT, EXITCODE
}
enum  Op {
  EQUAL = EDG_WLL_QUERY_OP_EQUAL, LESS = EDG_WLL_QUERY_OP_LESS, GREATER = EDG_WLL_QUERY_OP_GREATER, WITHIN = EDG_WLL_QUERY_OP_WITHIN,
  UNEQUAL = EDG_WLL_QUERY_OP_UNEQUAL
}

Public Member Functions

 QueryRecord ()
 QueryRecord (const QueryRecord &src)
QueryRecordoperator= (const QueryRecord &src)
 QueryRecord (const Attr name, const Op op, const std::string &value)
 QueryRecord (const Attr name, const Op op, const int value)
 QueryRecord (const Attr name, const Op op, const struct timeval &value)
 QueryRecord (const Attr name, const Op op, const glite::wmsutils::jobid::JobId &value)
 QueryRecord (const Attr name, const Op op, const int state, const struct timeval &value)
 QueryRecord (const Attr name, const Op op, const std::string &value_min, const std::string &value_max)
 QueryRecord (const Attr name, const Op op, const int value_min, const int value_max)
 QueryRecord (const Attr name, const Op op, const struct timeval &value_min, const struct timeval &value_max)
 QueryRecord (const Attr name, const Op op, const int state, const struct timeval &value_min, const struct timeval &value_max)
 QueryRecord (const std::string &tag, const Op op, const std::string &value)
 QueryRecord (const std::string &tag, const Op op, const std::string &value_min, const std::string &value_max)
 ~QueryRecord ()

Static Public Member Functions

const std::string AttrName (const Attr attr)

Protected Member Functions

 operator edg_wll_QueryRec () const

Friends

class ServerConnection
edg_wll_QueryRec * convertQueryVector (const std::vector< QueryRecord > &in)


Detailed Description

Auxiliary class to hold atomic query condition.

This class is used to construct queries to the L&B database. Each query is composed of multiple atomic conditions in the form of 'attribute' 'predicate' 'value'. QueryRecord represents such an atomic condition.


Member Enumeration Documentation

enum QueryRecord::Attr
 

Symbolic names of queryable attributes.

The queryable attributes correspond to the table columns in the bookkeeping server database, they relate both to the event records and job records.

See also:
Event::Attr
Enumeration values:
UNDEF  Not-defined value, used to terminate lists etc.
JOBID  Job id.
OWNER  Job owner (certificate subject).
STATUS  Current job status code.
LOCATION  Where is the job being processed.
DESTINATION  Destination CE.
DONECODE  Minor done status (OK,fail,cancel).
USERTAG  User tag.
TIME  Timestamp of the event.
LEVEL  Logging level.
HOST  Hostname where the event was generated.
SOURCE  Source component that sent the event.
INSTANCE  Instance of the source component.
EVENT_TYPE  Event type.
CHKPT_TAG  Checkpoint tag.
RESUBMITTED  Job was resubmitted
PARENT  Id of the parent job.
EXITCODE  Job system exit code.

enum QueryRecord::Op
 

Symbolic names of predicates.

These are the predicates used for creating atomic query conditions.

Enumeration values:
EQUAL  Equal.
LESS  Less than.
GREATER  Greater than.
WITHIN  Within the range.
UNEQUAL  Not equal.


Constructor & Destructor Documentation

QueryRecord::QueryRecord  ) 
 

Default constructor.

Initializes empty query condition.

QueryRecord::QueryRecord const QueryRecord src  ) 
 

Copy constructor

Initializes an exact copy of the object.

Parameters:
in] src Original object.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const std::string &  value
 

Constructor for condition on string typed value.

Initializes the object to hold condition on string typed attribute value.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value Actual value.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const int  value
 

Constructor for condition on integer typed value.

Initializes the object to hold condition on integer typed attribute value.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value Actual value.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const struct timeval &  value
 

Constructor for condition on timeval typed value.

Initializes the object to hold condition on timeval typed attribute value.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value Actual value.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const glite::wmsutils::jobid::JobId &  value
 

Constructor for condition on JobId typed value.

Initializes the object to hold condition on JobId typed attribute value.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value Actual value.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const int  state,
const struct timeval &  value
 

Constructor for condition on timeval typed value.

Initializes the object to hold condition on the time the job stays in given state.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] state State of thet job.
in] value Actual value.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const std::string &  value_min,
const std::string &  value_max
 

Constructor for condition on string typed interval.

Initializes the object to hold condition on string typed attribute interval.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value_min Low interval boundary.
in] value_max High interval boundary.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const int  value_min,
const int  value_max
 

Constructor for condition on integer typed interval.

Initializes the object to hold condition on integer typed attribute interval.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value_min Low interval boundary.
in] value_max High interval boundary.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const struct timeval &  value_min,
const struct timeval &  value_max
 

Constructor for condition on timeval typed interval.

Initializes the object to hold condition on timeval typed attribute interval.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] value_min Low interval boundary.
in] value_max High interval boundary.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const Attr  name,
const Op  op,
const int  state,
const struct timeval &  value_min,
const struct timeval &  value_max
 

Constructor for condition on timeval typed interval for given state.

Initializes the object to hold condition on the time job stayed in given state.

Parameters:
in] name Name of the attribute.
in] op Symbolic name of the predicate.
in] state State of thet job.
in] value_min Low interval boundary.
in] value_max High interval boundary.
Exceptions:
Exception Invalid value type for given attribute.

QueryRecord::QueryRecord const std::string &  tag,
const Op  op,
const std::string &  value
 

Convenience constructor for condition on user tags.

Initializes the object to hold condition on the value of user tag.

Parameters:
in] tag Name of the tag.
in] op Symbolic name of the predicate.
in] value Value of the tag.

QueryRecord::QueryRecord const std::string &  tag,
const Op  op,
const std::string &  value_min,
const std::string &  value_max
 

Convenience constructor for condition on user tags.

Initializes the object to hold condition on the value of user tag.

Parameters:
in] tag Name of the tag.
in] op Symbolic namen of the predicate.
in] value_min Minimal value of the tag.
in] value_max Maximal value of the tag.
Exceptions:
Exception Predicate is not WITHIN.

QueryRecord::~QueryRecord  ) 
 

Destructor.

The actual work is done by member destructors.


Member Function Documentation

const std::string QueryRecord::AttrName const Attr  attr  )  [static]
 

Return the string representation of symbolic attribute name.

Parameters:
in] attr Symbolic attribute name.
Returns:
Printable attribute name.

QueryRecord::operator edg_wll_QueryRec  )  const [protected]
 

QueryRecord& QueryRecord::operator= const QueryRecord src  ) 
 

Assignment operator.

Initializes an exact copy of the object.

Parameters:
in] src Original object.
Returns:
Reference to this object.


Friends And Related Function Documentation

edg_wll_QueryRec* convertQueryVector const std::vector< QueryRecord > &  in  )  [friend]
 

friend class ServerConnection [friend]
 


The documentation for this class was generated from the following file:
Generated on Thu May 11 20:44:17 2006 for Glite LB Client: CPP - Interface by doxygen 1.3.5