This will act as a tag class to identify the filter. It contains filterId, name of the filter, description for the filter and the object version. By using filter id we can identify the filter and object version is used to ensure that the object in the database and the object in the system are same.
Definition at line 129 of file filter.h.
typedef Id<Filter> OSB_LIB::Filter::Oid |
OSB_LIB::Filter::Filter | ( | const std::string & | name, | |
const std::string & | des | |||
) |
This is an utility constructor used to construct the filter using name and description.
name | Name of the filter. | |
des | Description of the filter. |
OSB_LIB::Filter::Filter | ( | const Oid & | oid = Oid() , |
|
const long & | objVs = 0 , |
|||
const std::string & | name = "" , |
|||
const std::string & | des = "" | |||
) |
Constructor with all info.
This constructor will be used as an default constructor to construct the filter as well as we can construct with full information.
oid | Unique identification of the filter. | |
objVs | Object version. | |
name | Name of the filter. | |
des | Description of the filter. |
const std::string& OSB_LIB::Filter::des | ( | ) | const |
Return the description of the filter.
bool OSB_LIB::Filter::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert the filter into database.
This will insert the new filter into the database using filter gateway. The object should contain the name and the description before insertion. The unique object id and the object version will be assigned to this object after insertion.
session | Database session to use. |
Exception | for the folloing errors:
|
const std::string& OSB_LIB::Filter::name | ( | ) | const |
Return the name of the filter.
long OSB_LIB::Filter::objVs | ( | ) | const |
Return the object version of the filter.
const Oid& OSB_LIB::Filter::oid | ( | ) | const |
Return the object id of the filter.
void OSB_LIB::Filter::print | ( | ) |
It is used for debugging purpose.
bool OSB_LIB::Filter::read | ( | const OSB_DB::Session & | session | ) |
Read the filter from database.
This will read the filter information from the database using filter gateway. The object id is used to identify the filter.
session | Database session to use. |
Exception | If object not found. |
bool OSB_LIB::Filter::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove the filter from database.
This will remove the filter from database using filter gateway. The object id is used to identify the filter object to remove from the database.
session | Database session to use. |
For | the following errors:
|
bool OSB_LIB::Filter::setDes | ( | const std::string & | des | ) |
Set the description of the filter.
des | Description of the filter. |
Exception | for the following errors:
|
bool OSB_LIB::Filter::setName | ( | const std::string & | name | ) |
Set the name of the filter.
name | Name of the filter. |
Exception | for the following errors:
|
bool OSB_LIB::Filter::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update the filter in database.
This will update the filter with the available values using filter gateway. The object id and object version are used to identify the filter object for updation. Object version will be increased by 1.
session | Database session to use. |
Exception | for the following errors:
|
friend class FilterManager [friend] |
friend struct OSB_DB::FilterGw [friend] |
std::string OSB_LIB::Filter::des_ [private] |
std::string OSB_LIB::Filter::name_ [private] |
long OSB_LIB::Filter::objVs_ [private] |
Oid OSB_LIB::Filter::oid_ [private] |