OSB_DB::AddressGw Class Reference

List of all members.

Detailed Description

Database-gateway class for OSB_LIB::Address.

Definition at line 53 of file address-gw.h.

Public Member Functions

Private Member Functions

Friends


Constructor & Destructor Documentation

OSB_DB::AddressGw::AddressGw ( const AddressGw rhs  )  [private]

Prevent copying: Copy constructor not implemented.

OSB_DB::AddressGw::AddressGw (  )  [inline]

Default constructor.

Definition at line 62 of file address-gw.h.


Member Function Documentation

long OSB_DB::AddressGw::fetch ( const Session session,
OSB_LIB::AddressTypeList::List atList 
)

Load all address types.

Parameters:
session Database session to use.
atList Ref of address type list to be fetched.
Returns:
Number of objects populated.

void OSB_DB::AddressGw::fetch ( const Session session,
const OSB_LIB::Id< OSB_LIB::Associate > &  asId,
OSB_LIB::AddressList dest 
)

Load all addresses for an associate.

Parameters:
session Database session to use.
asId Object id of the associate.
dest Address list to populate.
Reads all addresses for an associate and add them to the destination list.

bool OSB_DB::AddressGw::insert ( const Session session,
const OSB_LIB::Address addr 
) [private]

Insert an address of types to the database.

Parameters:
session Database session to use.
addr Address to insert.
Exceptions:
OsbException if a data member of addr
  • is too long for the database.
  • is empty and NOT NULL in the database.
OsbException if one of the types in addr already exists in the database.
Returns:
True if the address was inserted into the database.

AddressGw& OSB_DB::AddressGw::operator= ( const AddressGw rhs  )  [private]

Prevent assignment: Assignment not implemented.

bool OSB_DB::AddressGw::remove ( const Session session,
const OSB_LIB::Address addr 
) [private]

Remove an address to the database.

Parameters:
session Database session to use.
addr Ref of address.
Returns:
True if the address was removed from the database.

bool OSB_DB::AddressGw::setType ( const Session session,
OSB_LIB::Address addr,
OSB_LIB::AddressType  type,
bool  add 
) [private]

Change the type of the given address with the new one.

The addr.types_ will be set to the new one if success.

Parameters:
session Database session to use.
addr Address to modify.
type Type of address to add or remove.
add Signature for add or remove type.
Exceptions:
OsbException if type does not exist in database for addr.
  • as specified by the gateway class.
Returns:
True if the type was updated into the database.

bool OSB_DB::AddressGw::update ( const Session session,
const OSB_LIB::Address addr 
) [private]

Update an address of the specific types to the database.

Parameters:
session Database session to use.
addr Ref of address.
Exceptions:
OsbException if a data member of addr
  • is too long for the database.
  • is empty and NOT NULL in the database.
OsbException if one of the types in addr already exists in the database.
Returns:
True if the address was updated into the database.


Friends And Related Function Documentation

friend class OSB_LIB::Address [friend]

Only Address can access insert, update and delete.

Definition at line 59 of file address-gw.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:08:53 2006 for OSB Library by  doxygen 1.4.7