Definition at line 254 of file anclist.h.
typedef std::set<Associate::Oid> OSB_LIB::AnCList::AssociateIds [private] |
typedef std::map< Id<Contract>, Contract> OSB_LIB::AnCList::ContractMap |
typedef std::map< Id<PersProduct>, Id<Contract> > OSB_LIB::AnCList::PersProductMap |
OSB_LIB::AnCList::AnCList | ( | ) | [inline] |
OSB_LIB::AnCList::AnCList | ( | const AnCList & | rhs | ) |
Copy constructor: reset the pointer in associate.
OSB_LIB::AnCList::~AnCList | ( | ) |
Destructor: clear the pointer in associate.
Associate* OSB_LIB::AnCList::associate | ( | const Associate::Oid & | asId | ) |
Find associate for given oid from associate list.
asId | Object id of associate. |
const AssociateList& OSB_LIB::AnCList::associateList | ( | ) | const [inline] |
Contract* OSB_LIB::AnCList::contract | ( | const Contract::Oid & | coId | ) |
Get a writable contract for given oid from contract list.
coId | Object id of the contract. |
const ContractMap& OSB_LIB::AnCList::contractMap | ( | ) | const [inline] |
bool OSB_LIB::AnCList::create | ( | OSB_DB::Session & | session, | |
const Associate::Oid & | owner, | |||
Contract & | contract | |||
) |
bool OSB_LIB::AnCList::create | ( | OSB_DB::Session & | session, | |
Associate & | assoc | |||
) |
Add an associate.
Create an assoicate entry to the database and add it to the object list. Session will be committed if successful.
session | Database session to use. | |
assoc | Associate to be added. |
bool OSB_LIB::AnCList::delAssoc | ( | const OSB_DB::Session & | session, | |
const Associate::Oid | asId | |||
) | [private] |
Delete the associate and all its children and contracts.
session | Database session to use. | |
asId | Object id of associate to delete. |
OsbException | if the associate is not found. | |
OsbException | if a contract of the associate is not found. |
Reads any missing associate or contract from the database and throws it this fails.
void OSB_LIB::AnCList::erase | ( | const Contract::Oid | coId | ) | [private] |
const Contract* OSB_LIB::AnCList::findContract | ( | const Contract::Oid & | coId | ) | const |
Find contract for given oid from contract list.
coId | Object id of the contract. |
Associate& OSB_LIB::AnCList::getAssociate | ( | const Associate::Oid & | asId | ) |
Find associate for given oid from associate list.
asId | Object id of associate. |
OsbException | if the associate can not be found.
|
Contract& OSB_LIB::AnCList::getContract | ( | const Contract::Oid & | coId | ) |
Find contract for given oid from contract list.
coId | Object id of the contract. |
OsbException | if the contract is not found. |
const Contract& OSB_LIB::AnCList::getContract | ( | const Contract::Oid & | coId | ) | const |
Find contract for given oid from contract list.
coId | Object id of the contract. |
OsbException | if the contract is not found. |
void OSB_LIB::AnCList::insert | ( | const Contract & | co | ) | [private] |
Assignment: reset the pointer in associate.
PersProduct* OSB_LIB::AnCList::persProduct | ( | const Id< PersProduct > & | ppId | ) |
Find a pers. product by its object id.
ppId | Object id of the pers. product. |
void OSB_LIB::AnCList::read | ( | const OSB_DB::Session & | session, | |
const AssociateIds & | idList | |||
) | [private] |
Read a list of associates from the database.
session | Database session to use. | |
idList | List with associate ids to read. |
PersProduct* OSB_LIB::AnCList::read | ( | const OSB_DB::Session & | session, | |
const Id< PersProduct > | ppId | |||
) |
Read a pers. product from the database.
session | Database session to use. | |
ppId | Object id of the pers. product to read. |
PpReadFailed | if the the pers. product does not exist in the database. | |
ContractReadFailed | if the contract of the pers. product can not be read. | |
OsbException | if the pers. product is not found within its contract. |
Contract* OSB_LIB::AnCList::read | ( | const OSB_DB::Session & | session, | |
const Contract::Oid | coId | |||
) |
Read contract from the database.
session | Database session to use. | |
coId | Object id of the contract to read. |
ContractReadFailed | if the contract can not be read from the database. |
Associate* OSB_LIB::AnCList::read | ( | const OSB_DB::Session & | session, | |
const Associate::Oid | asId | |||
) |
Read an associate from the database.
session | Database session to use. | |
asId | Object id of the associate to read. |
AssocReadFailed | if the associate can not be read from the database. |
Caller must keep in mind that the children of the associate are not read from the database, thus a subsequent call to getAssociate() with the id of one of the associate's childs will fail.
void OSB_LIB::AnCList::refresh | ( | const OSB_DB::Session & | session | ) |
void OSB_LIB::AnCList::remove | ( | OSB_DB::Session & | session, | |
const Contract::Oid | coId | |||
) |
Delete a contract from the database.
session | Database session to use. | |
coId | Object id of the contract to delete. |
bool OSB_LIB::AnCList::remove | ( | OSB_DB::Session & | session, | |
const Associate::Oid | asId | |||
) |
Delete an associate.
Delete an entry from the database, also delete it from the object list. Session will be committed if successful.
session | Database session to use. | |
asId | Object id of associate to be deleted. |
OsbException | if the associate is not found in the list. |
bool OSB_LIB::AnCList::replace | ( | const Contract & | contract | ) |
Replace a contract in the A&C list.
contract | Contract to replace. |
bool OSB_LIB::AnCList::replace | ( | const Associate & | assoc | ) |
Replace an associate in the A&C list.
assoc | Associate to replace. |
Replaces the associate if its object version is not less then the one of the current associate in the list.
long OSB_LIB::AnCList::search | ( | const OSB_DB::Session & | session, | |
AnCFilter & | filter | |||
) |
Search associates and contracts.
session | Database session to use. | |
filter | Filter to use. |
void OSB_LIB::AnCList::swap | ( | AnCList & | rhs | ) | [private] |
Swap the associate and contract list.
friend class Associate [friend] |
AssociateList OSB_LIB::AnCList::aList_ [private] |
List of available associates.
Definition at line 658 of file anclist.h.
Referenced by associateList().
ContractMap OSB_LIB::AnCList::cMap_ [private] |
PersProductMap OSB_LIB::AnCList::ppMap_ [private] |