OSB_DB::TcsVersionGw Struct Reference

List of all members.

Detailed Description

Database interface for TcsVersion.

Definition at line 304 of file tariffclass-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::TcsVersionGw::checkObjVs ( const Session session,
const OSB_LIB::TcsVersion tcsVs 
) [private]

Check the current object version.

Parameters:
session Database session.
tcsVs Tariff classification system version object.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::TcsVersionGw::delTcsVersion ( const Session session,
OSB_LIB::TcsVersion tcsVs 
) [private]

Delete a tariff classification system version object.

The tariff classification system version object to be deleted must already exist in the database. Besides that, the object version of the tariff classification system version must match the object version in the database. This is to ensure that the object to be deleted represent the entry in the database. After the function call, the object's id will be unset but the object itself is not deleted automatically. Application will have to delete the object itself.

Parameters:
session Database session.
tcsVs Tariff classification system version to be deleted.
Returns:
true if deletion is successful else false.
Exceptions:
OsbException for the following errors:
  • Object outdated. Object version differs.
  • Object not found.
  • Database error.

long OSB_DB::TcsVersionGw::fetch ( const Session session,
OSB_LIB::TcsVersions dest 
)

Get a list of all available tariff classification system version object.

Parameters:
session Database session.
dest Container that stores all the returned object.
Returns:
Number of tariff classification system version object retrieved.

bool OSB_DB::TcsVersionGw::fetch ( const Session session,
OSB_LIB::TcsVersion tcsVs 
)

Populate a tariff classification system version object with data.

This function accept an empty tariff classification system version object with only its oid set. It will populate all other attributes of the object.

Parameters:
session Database session.
tcsVs Tariff classification system version to be populated.
Returns:
true if the object is found, else false.
Exceptions:
OsbException for the following errors:
  • Unknown/unsupported TCS type.

bool OSB_DB::TcsVersionGw::findReplacementFreezedTcsVersion ( const Session session,
const OSB_LIB::TcsVersion::Oid oid 
) const [private]

Find the replacement for a freezed tcs Version.

Parameters:
session Database session.
oid Object id of the to-be-replaced tariff classification system version.
Returns:
true if replacement found else false.
Exceptions:
OsbException for the following errors:
  • Database error.

OSB_LIB::CfgStatus OSB_DB::TcsVersionGw::getStatus ( const Session session,
const OSB_LIB::TcsVersion::Oid oid 
) const [private]

Get the status of a tcs version in database.

Parameters:
session Database session.
oid Object id of the tariff classification system version to be inspected.
Returns:
Status of the tariff classification system version. Possible values are:
  • cfgEditable
  • cfgStandby
  • cfgReleased
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::TcsVersionGw::hasOtherReleasedTcsVersion ( const Session session,
const OSB_LIB::TcsVersion::Oid oid 
) [private]

Check is there any other released tariff classification system version exists.

Parameters:
session Database session.
oid Object id of the tcs version to be checked.
Returns:
true if other released version found else false.

bool OSB_DB::TcsVersionGw::insTcsVersion ( const Session session,
OSB_LIB::TcsVersion tcsVs 
) [private]

Add a new tariff classification system version.

Before the function call, the object must have all its members set except oid and object version. After the function call, the object will get its oid and object version set. In case of an error, exception is thrown.

Parameters:
session Database session.
tcsVs New tariff classification system version to be added.
Returns:
true if creation is successful else false.
Exceptions:
OsbException for the following errors:
  • The name is too long.
  • The description in too long.
  • Duplicate name.
  • Database error.

bool OSB_DB::TcsVersionGw::isReleasedInFuture ( const Session session,
const OSB_LIB::TcsVersion::Oid oid 
) const [private]

Check whether the release date is in the future.

Parameters:
session Database session.
oid Object id of the tariff classification system version to be inspected.
Returns:
true if in the future else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::TcsVersionGw::isTcSystemUsedByFreezedTsVersion ( const Session session,
const OSB_LIB::TcSystem::Oid oid 
) const [private]

Check whether any freezed tariff system version is using this tariff classification system.

Parameters:
session Database session.
oid Object id of the tariff classification system.
Returns:
true if in used else false.
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::TcsVersionGw::isTcSystemUsedByReleasedTsVersion ( const Session session,
const OSB_LIB::TcSystem::Oid oid 
) const [private]

Check whether any released tariff system version is using this tariff classification system.

Parameters:
session Database session.
oid Object id of the tariff classification system.
Returns:
true if in used else false.
Exceptions:
OsbException for the following errors:
  • Database error.

OSB_LIB::DateTime OSB_DB::TcsVersionGw::nextReleasedVersion ( const Session session,
const OSB_LIB::TcsVersion::Oid oid 
) const [private]

Find the replacement for a released tcs Version.

Parameters:
session Database session.
oid Object id of the to-be-replaced tariff classification system version.
Returns:
Expired date of the to-be-replaced tariff classification system version if a replacement can be found else return DATE_NOT_SET.

bool OSB_DB::TcsVersionGw::uniqueReleaseTs ( const Session session,
const OSB_LIB::TcSystem::Oid oid,
const OSB_LIB::DateTime ts 
) const [private]

Check whether the release date is unique.

This function will check whether the release date is unique among the different versions of the same tariff classification system.

Parameters:
session Database session.
oid Object id of the tariff classification sytem.
ts Release time stamp to check.
Returns:
true if unique else false.

bool OSB_DB::TcsVersionGw::updStatus ( const Session session,
OSB_LIB::TcsVersion tcsVs 
) [private]

Change the status of tariff classification system version.

Parameters:
session Database session to use.
tcsVs TCS version for which to update the status, it must have the new status set.
Returns:
true if the status was updated, else false.

bool OSB_DB::TcsVersionGw::updTcsVersion ( const Session session,
OSB_LIB::TcsVersion tcsVs 
) [private]

Update a tariff classification system version object.

The function will modify the data of a tariff classification system version object in the database with the data contained within the input object. The object in the database will only be updated if the input object represent the current entry in the database (the object versions are the same).

Parameters:
session Database session.
tcsVs Tariff classification system version object to be updated.
Returns:
true if updated successfully else false.
Exceptions:
OsbException for the following errors:
  • Object outdated. Object version differs.
  • Object not found.
  • Database error.


Friends And Related Function Documentation

friend class OSB_LIB::TcsVersion [friend]

Tariff classification system version needs to call the private member functions.

Definition at line 309 of file tariffclass-gw.h.


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:09:03 2006 for OSB Library by  doxygen 1.4.7