

This is the leaf element of the filter expression. This is the base class which contains the object id to identify the filter condition and the filter type (e.g. ftServiceClass,ftTariffClass). It contains the function eval to evaluate the filter condition. This will apply the operator on the target id and the element in the usedservice and return the result.
(e.g. usedservice.serviceClass == targetId)
Definition at line 326 of file filter.h.
| typedef std::auto_ptr<FilterCond> OSB_LIB::FilterCond::AutoPtr |
| typedef Id<FilterCond> OSB_LIB::FilterCond::Oid |
Constructor with oid.
| oid | Unique id of the filter condition object. |
| OSB_LIB::FilterCond::FilterCond | ( | const Oid & | oid, | |
| const FilterType | ft | |||
| ) |
Constructor with full info.
| oid | Unique id of the filter condition object. | |
| ft | Type of Filter. |
| virtual OSB_LIB::FilterCond::~FilterCond | ( | ) | [virtual] |
Empty virtual destructor.
| AutoPtr OSB_LIB::FilterCond::clone | ( | ) | const |
"Virtual" copy constructor.
Create a newly allocated copy of the filter condition by calling the protected/private member function clone_():
FilterCond::AutoPtr FilterCond::clone() const { return AutoPtr(clone_()); }
class Derived : public Base { public: type std::auto_ptr<Derived> AutoPtr; AutoPtr clone() const; }; void b(const Base& b) { Base::AutoPtr ab = b.clone(); // Do on ab whatever operations are defined by Base. } void d(const Derived& d) { Derived::AutoPtr ad = d.clone(); // Do on ad whatever is defined for Derived. }
Reimplemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| virtual FilterCond* OSB_LIB::FilterCond::clone_ | ( | ) | const [private, pure virtual] |
Abstract virtual constructor.
Create a copy of the filter condition: Allocate memory and initialize it with the current object. Clients of the class use the public member clone(), that returns an auto_ptr of the appropriate filter condition.
Classes that directly or indirectly inherit from FilterCond should redeclare or define this member function:
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| virtual bool OSB_LIB::FilterCond::eval | ( | const Cdr & | cdr, | |
| const UsedService & | us | |||
| ) | [pure virtual] |
Evaluate the Cdr, UsedService.
This will evaluate the usedservice using operator and the target value. If it matches the function will return true else false. (e.g. filter condition is serviceclass == 8. operator is otEqualTo, filter type service class, target id is 8. If the usedservice contains the serviceclass id as 8 then this function will return true for this example).
| cdr | Cdr object to use. | |
| us | UsedService in the cdr object for evaluation. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::freeze | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private] |
Set the status from editable to standby.
In order to set the status from editable to standby, the following criteria must be fulfilled:
| session | Database session to use. | |
| errors | Container of error messages if any. |
| OsbException | for any database errors. |
| virtual bool OSB_LIB::FilterCond::freezeSpecific | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private, pure virtual] |
Criteria checking before setting the status from editable to standby.
| session | Database session to use. | |
| errors | Container for error messages if any. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| FilterType OSB_LIB::FilterCond::fType | ( | ) | const |
Return the type of filter.
| bool OSB_LIB::FilterCond::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert the filter condition into the database.
This will insert the new filter condition object into the database using filter condition gateway.
| session | Database session to use. |
| Exception | on database errors. |
| virtual bool OSB_LIB::FilterCond::insSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Insert derived class specific data members into database.
| session | Database session to use. |
| Exception | on database errors. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::isReleased | ( | const OSB_DB::Session & | session | ) |
Checks the configured objects are released.
This will check the local objects, filter condition, left and right hand side filter expressions are released then it will return true else false.
| long OSB_LIB::FilterCond::objVs | ( | ) | const |
Return the object version.
| const FilterCond::Oid& OSB_LIB::FilterCond::oid | ( | ) | const |
Return the unique id of the filter condition.
| virtual void OSB_LIB::FilterCond::print | ( | ) | [pure virtual] |
| bool OSB_LIB::FilterCond::read | ( | const OSB_DB::Session & | session | ) |
Read the filter condition from the database.
This will read the filter condition from the database using filter condition gateway. Before calling this function the object id should be set because the object id is the primary key to get the filter condition object.
| session | Database session to use. |
| Exception | for the following:
|
| virtual bool OSB_LIB::FilterCond::readSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Read derived class specific data members from database.
| session | Database session to use. |
| Exception | if object not found. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::release | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private] |
Set the status from standby to release.
In order to set the status from standby to release, the following criteria must be fulfilled:
| session | Database session to use. | |
| errors | Container of error messages if any. |
| OsbException | for any database errors. |
| const Date& OSB_LIB::FilterCond::releaseDate | ( | ) | const |
Return the release date of the object.
| virtual bool OSB_LIB::FilterCond::releaseSpecific | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private, pure virtual] |
Criteria checking before setting the status from standby to release.
| session | Database session to use. | |
| errors | Container for error messages if any. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the filter condition from the database.
This will remove the filter condition object from the datebase using filter condition gateway. The filter condition object is identified using filter condition id.
| session | Database session to use. |
| Exception | for the following errors:
|
| virtual bool OSB_LIB::FilterCond::removeSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Remove derived class specific data members from the database.
| session | Database session to use. |
| Exception | if object not found. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::revoke | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private] |
Set the status from release to standby.
In order to get the status from release to standby, the following criteria must be fulfilled: Object must be in status released
| session | Database session to use. | |
| errors | Container of error messages is any. |
| OsbException | for any database errors. |
| virtual bool OSB_LIB::FilterCond::revokeSpecific | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private, pure virtual] |
Criteria checking before setting the status from release to standby.
| session | Database session to use. | |
| errors | Container for error messages if any. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::setReleaseDate | ( | const Date & | date | ) |
Set the release date.
| CfgStatus OSB_LIB::FilterCond::status | ( | ) | const |
Return the status of the object.
| bool OSB_LIB::FilterCond::unfreeze | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private] |
Set the status from standby to editable.
In order to get the status from standby to editable, the following criteria must be fulfilled: Object must be in status standby
| session | Database session to use. | |
| errors | Container of error messages is any. |
| OsbException | for any database errors. |
| virtual bool OSB_LIB::FilterCond::unfreezeSpecific | ( | const OSB_DB::Session & | session, | |
| std::vector< OsbError > & | errors | |||
| ) | [private, pure virtual] |
Criteria checking before setting the status from standby to editable.
| session | Database session to use. | |
| errors | Container for error messages if any. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
| bool OSB_LIB::FilterCond::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update the filter condition in the database.
This will update the filter condition object with the current values using filter condition gateway. The filter condition object is identified using filter condition id.
| session | Database session to use. |
| Exception | if object not found. |
| virtual bool OSB_LIB::FilterCond::updSpecific | ( | const OSB_DB::Session & | session | ) | [private, pure virtual] |
Update derived class specific data members in the database.
| session | Database session to use. |
| Exception | if object not found. |
Implemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
friend class FilterManager [friend] |
This is used to configure and manage the objects.
Reimplemented in OSB_LIB::ScFilter, and OSB_LIB::TcFilter.
friend struct OSB_DB::FilterCondGw [friend] |
This will perform all the database operation for FilterCond.
FilterType OSB_LIB::FilterCond::ft_ [private] |
long OSB_LIB::FilterCond::objVs_ [private] |
Oid OSB_LIB::FilterCond::oid_ [private] |
Date OSB_LIB::FilterCond::releaseDate_ [private] |
CfgStatus OSB_LIB::FilterCond::status_ [private] |
1.4.7