The class supports on-the-fly creation of charge traits: Clients search the list for a given charge traits setting. If this set of attributes does not exist in the internal list and in the database, it is automatically created.
Definition at line 349 of file chargetraits.h.
typedef List::const_iterator OSB_LIB::ChargeTraitsList::ConstIterator |
typedef List::iterator OSB_LIB::ChargeTraitsList::Iterator |
typedef List::key_type OSB_LIB::ChargeTraitsList::KeyType |
typedef std::map<ChargeTraits::Oid, ChargeTraits> OSB_LIB::ChargeTraitsList::List |
STL container type used to store the object id and object.
Definition at line 354 of file chargetraits.h.
typedef List::size_type OSB_LIB::ChargeTraitsList::SizeType |
void OSB_LIB::ChargeTraitsList::add | ( | const ChargeTraits & | ct | ) | [private] |
Add a charge traits to the list.
ct | Charge traits to add. |
ConstIterator OSB_LIB::ChargeTraitsList::begin | ( | ) | const [inline] |
Const iterator to the beginning of the list.
Definition at line 383 of file chargetraits.h.
References list_.
Iterator OSB_LIB::ChargeTraitsList::begin | ( | ) | [inline] |
Iterator to the beginning of the list.
Definition at line 377 of file chargetraits.h.
References list_.
ConstIterator OSB_LIB::ChargeTraitsList::end | ( | ) | const [inline] |
Const iterator to the end of the list.
Definition at line 385 of file chargetraits.h.
References list_.
Iterator OSB_LIB::ChargeTraitsList::end | ( | ) | [inline] |
bool OSB_LIB::ChargeTraitsList::find | ( | ChargeTraits & | ct | ) | const |
Get matching charge traits.
ct | Charge traits to find. |
ConstIterator OSB_LIB::ChargeTraitsList::find | ( | const KeyType & | k | ) | const [inline] |
const ChargeTraits* OSB_LIB::ChargeTraitsList::findChargeTraits | ( | const ChargeTraits::Oid & | id | ) | const |
Find a charge traits based on the given charge traits id.
id | Id of the charge traits. |
ChargeTraits::Oid OSB_LIB::ChargeTraitsList::findMatch | ( | const ChargeTraits & | ct | ) | const [private] |
Search the id for a given charge traits setting.
Search whether the given charge traits is in the list.
The function uses all data members of ct (except its id) when comparing against existing charge traits.
ct | Charge traits to search for. |
const ChargeTraits& OSB_LIB::ChargeTraitsList::getChargeTraits | ( | const ChargeTraits::Oid & | id | ) | const |
Get a charge traits based on the given charge traits id.
id | Id of the charge traits. |
ObjectNotFound | (315) if charge traits can not be found. |
void OSB_LIB::ChargeTraitsList::getChargeTraits | ( | OSB_DB::Session & | session, | |
ChargeTraits & | ct | |||
) |
Find charge traits or create in database.
session | Database session to use, pending transactions are commited or, if insertion fails, rolled back. | |
ct | Charge traits to insert. |
const List& OSB_LIB::ChargeTraitsList::list | ( | ) | const [inline] |
Access to the list of charge traits.
Definition at line 366 of file chargetraits.h.
References list_.
long OSB_LIB::ChargeTraitsList::read | ( | const OSB_DB::Session & | session | ) |
Read all charge traits from the database.
session | Database session to use, transactions are not commited. |
bool OSB_LIB::ChargeTraitsList::remove | ( | OSB_DB::Session & | session, | |
ChargeTraits & | ct | |||
) |
Remove a charge traits from the list.
SizeType OSB_LIB::ChargeTraitsList::size | ( | ) | const [inline] |
List OSB_LIB::ChargeTraitsList::list_ [private] |