OSB_DB::DistTcsGw Struct Reference

List of all members.

Detailed Description

Database interface for DistTcs.

Definition at line 758 of file tcdist-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

bool OSB_DB::DistTcsGw::allReleasedTzConfigUnique ( const Session session,
const OSB_LIB::TcsVersion::Oid oid,
OSB_LIB::OsbErrors errors 
) [private]

Ensure all tariff zone configurations are unique.

This function checks and ensures that all released tariff zone configurations bound to the distance TCS, with the given object id, are unique, which means, no any two tariff zone configurations have the same origin-destination pair AND their release date overlap each other.

Parameters:
session Database session.
oid Object id of the distance TCS to check.
errors Container for error information.

bool OSB_DB::DistTcsGw::delDistTcs ( const Session session,
OSB_LIB::DistTcs distTcs 
) [private]

Delete distance TCS specific data from database.

Parameters:
session Database session.
distTcs Distance TCS to delete.
Returns:
true if deletion is successful else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.

bool OSB_DB::DistTcsGw::fetch ( const Session session,
OSB_LIB::DistTcs distTcs 
)

Populate a distance tariff classification system object with data.

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

Parameters:
session Database session.
distTcs Distance TCS to populate.
Returns:
true if the object is found, else false.

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

Find the replacement for a freezed distance TCS.

Parameters:
session Database session.
oid Object id of the distance TCS to replace.
Returns:
true if replacement found else false.

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

Find the replacement for a released distance TCS.

Parameters:
session Database session.
oid Object id of the distance TCS to replace.
Returns:
Expired date of the distance TCS to be replaced.
It is not set if no replacement exists.

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

Ensure the distance TCS has been configured.

This function checks that the distance TCS has at least one entry in the "tariff zone -> tariff class" mapping.

Parameters:
session Database session.
oid Distance TCS to check.
Returns:
true if at least one mapping entry found, else false.

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

Check is there any other released distance TCS exists.

Parameters:
session Database session.
oid Object id of the distance TCS to check.
Returns:
true if other released version found else false.

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

Ensure all version of distance TCS is consistence.

This function checks the distance TCS with the given object id to ensure that it consists the same set of tariff classes as the previous version does. If this is the first version of the distance TCS to be relased, no checkin will be performed.

Parameters:
session Database session.
oid Object id of the distance TCS to check.
Returns:
true if the set of tariff classes are the same, else false.

bool OSB_DB::DistTcsGw::insDistTcs ( const Session session,
OSB_LIB::DistTcs distTcs 
) [private]

Add a new distance tariff classification system.

This function will insert the type specific data of a distance tariff classification system into database.

Parameters:
session Database session.
distTcs Distance TCS to insert.
Returns:
true if insertion is successful else false.

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

Check whether distance TCS is used.

This function checks whether any freezed MappingDistTcs is using the distance TCS with the object id given.

Parameters:
session Database session.
oid Object id of the distance TCS to be checked.
Returns:
true if is used by a released TCS version, else false.

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

Check whether distance TCS is used.

This function checks whether any released MappingDistTcs is using the distance TCS with the object id given.

Parameters:
session Database session.
oid Object id of the distance TCS to be checked.
Returns:
true if in used by a released TCS version, else false.

bool OSB_DB::DistTcsGw::updDistTcs ( const Session session,
OSB_LIB::DistTcs distTcs 
) [private]

Update distance TCS specific data from database.

Parameters:
session Database session.
distTcs Distance TCS to update.
Returns:
true if update is successful else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.


Friends And Related Function Documentation

friend class OSB_LIB::DistTcs [friend]

Distance TCS needs to call the private member functions.

Definition at line 762 of file tcdist-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