OSB_LIB::InventoryPool Class Reference

Collaboration diagram for OSB_LIB::InventoryPool:

Collaboration graph
[legend]
List of all members.

Detailed Description

Inventory pool: abstraction of warehouse.

In OSB all articles hold in the inventory have a pool assigned.
This can be a physical stock or a logical pool, e.g., E.164 phone numbers.

OSB users may use goods only from one of pools that is assigned to them.

Note:
Database operations on inventory pool do not use an object version: the last user wins.

Definition at line 76 of file inventorypool.h.

Public Types

Public Member Functions

Get data members:
Set data members:
Database operations:

Static Public Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef Id<InventoryPool> OSB_LIB::InventoryPool::Oid

Type-safe object identification.

Definition at line 81 of file inventorypool.h.


Constructor & Destructor Documentation

OSB_LIB::InventoryPool::InventoryPool ( const Oid oid = Oid()  )  [explicit]

Constructor with optional object id.


Member Function Documentation

const std::string& OSB_LIB::InventoryPool::des (  )  const

Description of the pool.

const std::string& OSB_LIB::InventoryPool::name (  )  const

Name of the pool.

Oid OSB_LIB::InventoryPool::oid (  )  const

Object id of the pool.

void OSB_LIB::InventoryPool::read ( const OSB_DB::Session session  ) 

Read the pool from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if the pool as identified by oid() does not exist in the database.

static void OSB_LIB::InventoryPool::read ( const OSB_DB::Session session,
std::list< InventoryPool > &  dest 
) [static]

Read all inventory pools from the database.

Parameters:
session Database session to use.
dest List to populate, it is cleared before reading the pools.

void OSB_LIB::InventoryPool::remove ( const OSB_DB::Session session  ) 

Remove the pool from the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if other object depend on the pool.

void OSB_LIB::InventoryPool::save ( const OSB_DB::Session session  ) 

Save the pool in the database.

Parameters:
session Database session to use.
Exceptions:
OsbException if a pool with the same name already exists.

void OSB_LIB::InventoryPool::setDes ( const std::string  des  ) 

Set the pool description.

Parameters:
des New description of the pool.
Exceptions:
OsbException if des is too long.

void OSB_LIB::InventoryPool::setName ( const std::string &  name  ) 

Set the pool name.

Parameters:
name New name of the pool.
Exceptions:
OsbException if name is empty.
OsbException if name is too long.


Friends And Related Function Documentation

friend class OSB_DB::InventoryPoolGw [friend]

Allow to set all data members.

Definition at line 78 of file inventorypool.h.


Member Data Documentation

std::string OSB_LIB::InventoryPool::des_ [private]

Description of the pool.

Definition at line 164 of file inventorypool.h.

std::string OSB_LIB::InventoryPool::name_ [private]

Name of the pool.

Definition at line 162 of file inventorypool.h.

Oid OSB_LIB::InventoryPool::oid_ [private]

Object id of the pool.

Definition at line 160 of file inventorypool.h.


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