Definition at line 69 of file device.h.
typedef Id<Device> OSB_LIB::Device::Oid |
typedef Id<InventoryPool> OSB_LIB::Device::PoolId |
typedef TypeId<Device> OSB_LIB::Device::Type |
The status of device.
Customer care and other on-line application need to assign a device to a pers. product if it contains a DeviceItem.
A device is available if its device status is dvcAvailable.
virtual OSB_LIB::Device::~Device | ( | ) | [virtual] |
Empty virtual destructor.
OSB_LIB::Device::Device | ( | const Device & | rhs | ) | [protected] |
Copying for derived classes only.
static void OSB_LIB::Device::handleObjectStatus | ( | ObjectStatus | os, | |
const Oid & | id | |||
) | [static, protected] |
Evalute the object status of a device.
os | Object status to evaluate. | |
id | The id of the device for which os is valid. |
ObjectDeleted | ||
ObjectModified | ||
ObjectBusy | if noWait is true and the device is locked by another database session. |
void OSB_LIB::Device::incObjVs | ( | const OSB_DB::Session & | session | ) | [protected] |
Increment the object version by 1.
session | Database session to use. |
OsbException | (internal error) if the update of the object version in the database fails. |
void OSB_LIB::Device::insertBase | ( | const OSB_DB::Session & | session | ) | [protected] |
Save device data to the database.
session | Database session to use. |
OsbException | if the insert fails. |
void OSB_LIB::Device::lock | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | const |
Lock a device in the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from handleObjectStatus(). |
static void OSB_LIB::Device::lock | ( | const OSB_DB::Session & | session, | |
const Oid & | id, | |||
bool | noWait | |||
) | [static] |
Lock a device in the database.
session | Database session to use. | |
id | The object id of the device to lock. | |
noWait | Don't wait for database locks? |
OsbException | from handleObjectStatus(), (ObjectModified is not applicable). |
Oid OSB_LIB::Device::oid | ( | ) | const |
Get the object id.
Assignment for derived classes only.
PoolId OSB_LIB::Device::poolId | ( | ) | const |
Get the inventory pool id of the device.
It may not be set.
virtual void OSB_LIB::Device::read | ( | const OSB_DB::Session & | session | ) | [pure virtual] |
@ name Database operations: Read the device from the database.
session | Database session to use. |
OsbException | if the device as identified by oid() and type() does not exist in the database. |
Implemented in OSB_LIB::UimCard.
void OSB_LIB::Device::readBase | ( | const OSB_DB::Session & | session | ) | [protected] |
@ name Database operations, support for derived classes. Read device data from the database.
session | Database session to use. |
OsbException | if the device as identified by oid() does not exist in the database. |
virtual void OSB_LIB::Device::remove | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | [pure virtual] |
Delete the device from the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from lock(). | |
OsbException | if deletion of the device is not allowed. |
Implemented in OSB_LIB::UimCard.
void OSB_LIB::Device::removeBase | ( | const OSB_DB::Session & | session | ) | [protected] |
Delete the device from the database.
session | Database session to use. |
OsbException | if deletion of the device is not allowed. |
virtual void OSB_LIB::Device::saveData | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | [pure virtual] |
Save the device data to the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from lock(). | |
OsbException | if the insert or update fails for other reasons. |
Implemented in OSB_LIB::UimCard.
void OSB_LIB::Device::setAssigned | ( | const OSB_DB::Session & | session | ) | [private] |
Set the status to assigned.
session | Database session to use. |
OsbException | from lock(). | |
OsbException | if the device is not available. |
void OSB_LIB::Device::setDeassigned | ( | const OSB_DB::Session & | session | ) | [private] |
Deassign the device.
Set the device status to deactivated.
session | Database session to use. |
OsbException | from lock(). |
void OSB_LIB::Device::setPool | ( | const PoolId | poolId | ) |
Set the inventory pool.
poolId | The new inventory pool of the device. |
OsbException | if changing to pool is not allowed: currently none. |
virtual void OSB_LIB::Device::setStatus | ( | const Status | newStatus | ) | [virtual] |
Set the device status.
newStatus | New status of the device. |
OsbException | if the current status is assigned. | |
OsbException | if newStatus is assigned or quarantine. |
void OSB_LIB::Device::setUnAssigned | ( | const OSB_DB::Session & | session | ) | [private] |
Undo an assignment of the device.
Resets the device status to available.
session | Database session to use. |
OsbException | from lock(). |
Status OSB_LIB::Device::status | ( | ) | const |
Get the device status.
virtual Type OSB_LIB::Device::type | ( | ) | const [pure virtual] |
void OSB_LIB::Device::updDataBase | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | [protected] |
Save device data to the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from lock(). | |
OsbException | if the update fails for other reasons. |
virtual void OSB_LIB::Device::updStatus | ( | const OSB_DB::Session & | session, | |
bool | noWait | |||
) | [virtual] |
Update the status of the device in the database.
session | Database session to use. | |
noWait | Don't wait for database locks? |
OsbException | from lock(). | |
OsbException | from incObjVs(). |
void OSB_LIB::Device::updStatusNoLock | ( | const OSB_DB::Session & | session | ) | [private] |
Update the device status without locking.
session | Database session to use. |
OsbException | from incObjVs(). |
friend class OSB_DB::DeviceGw [friend] |
friend class PersDevice [friend] |
long OSB_LIB::Device::objVs_ [private] |
Oid OSB_LIB::Device::oid_ [private] |
PoolId OSB_LIB::Device::poolId_ [private] |
Status OSB_LIB::Device::status_ [private] |