OSB_DB::MappingDistTcsGw Class Reference

List of all members.

Detailed Description

Support database operations for OSB_LIB::MappingDistTcs.

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

Private Member Functions

Friends


Member Function Documentation

void OSB_DB::MappingDistTcsGw::delMappings ( const Session session,
const OSB_LIB::MappingDistTcs tcs 
) [private]

Delete the mapping definitions of a mapping TCS.

Parameters:
session Database session to use.
tcs Mapping TCS for which to delete the mapping definitions.
Exceptions:
OsbException 
  • in case of a database error.

bool OSB_DB::MappingDistTcsGw::delSpecific ( const Session session,
OSB_LIB::MappingDistTcs tcs 
) [private]

Delete MappingDistTcs specific data.

Parameters:
session Database session to use.
tcs Object to with data to update.
Exceptions:
OsbException 
  • in case of a database error.
Returns:
true if the data have been updated, else false.

bool OSB_DB::MappingDistTcsGw::distTcsFreezed ( const Session session,
const OSB_LIB::MappingDistTcs::Oid tcsId,
OSB_LIB::OsbErrors errors 
) [private]

Check distance TCS of a mapping TCS.

Verifies that a distance TCS is assigned to a mapping TCS, that it exists, has the correct type (OSB_LIB::TcSystem::tcsDist) and at least one version of that distance TCS is in a freezed status.

Parameters:
session Database session to use.
tcsId Id of the mapping TCS to check.
errors Container for detected errors.
Exceptions:
OsbException 
  • in case of a database error.
Returns:
true if all above conditions are fulfilled, else false.

bool OSB_DB::MappingDistTcsGw::distTcsReleased ( const Session session,
const OSB_LIB::MappingDistTcs::Oid tcsId,
const OSB_LIB::DateTime releaseDate,
OSB_LIB::OsbErrors errors 
) [private]

Verify that a distance TCS of a mapping TCS is released.

Verifies that at least one released version of the distance TCS assigned to a mapping TCS at the release date of the latter exists.

Parameters:
session Database session to use.
tcsId Id of the mapping TCS to check.
releaseDate Release date of the mapping TCS.
errors Container for detected errors.
Returns:
true if the condition above is fulfilled, else false.

void OSB_DB::MappingDistTcsGw::insMappings ( const Session session,
const OSB_LIB::MappingDistTcs tcs 
) [private]

Insert the mapping definitions of a mapping TCS.

The function inserts all mapping definitions of the TCS object.
Mapping definitions for an unknown usage type are not inserted into the database but NOT deleted from the mapping TCS.

Parameters:
session Database session to use.
tcs Mapping TCS for which to insert the mapping definitions.
Exceptions:
OsbException 
  • in case of a database error, in particular if a usage type for the TCS version already exists.

bool OSB_DB::MappingDistTcsGw::insSpecific ( const Session session,
const OSB_LIB::MappingDistTcs tcs 
) [private]

Insert MappingDistTcs specific data.

Parameters:
session Database session to use.
tcs Object to with data to insert.
Exceptions:
OsbException 
  • in case of a database error
  • if the distance TCS does not exist.
Returns:
true if the data have been inserted, else false.

bool OSB_DB::MappingDistTcsGw::mappingsComplete ( const Session session,
const OSB_LIB::MappingDistTcs::Oid tcsId,
OSB_LIB::OsbErrors errors 
) [private]

Check completeness of mapping definitions.

For a mappping TCS that functions verifies, that for each configured usage type, a mapping for the origin and destination is defined.

Parameters:
session Database session to use.
tcsId Id of the mapping TCS to check.
errors Container for detected errors.
Returns:
true all mapping definition are complete, else false.

void OSB_DB::MappingDistTcsGw::readMappings ( const Session session,
OSB_LIB::MappingDistTcs tcs 
) [private]

Read the mapping definitions of a mapping TCS.

The function clears the current mapping definitions of the mapping TCS and then reads them from the database.

Parameters:
session Database session to use.
tcs Mapping TCS for which to read the mapping definitions.
Exceptions:
OsbException 
  • in case of an unknown usage type,
  • in case of a database error.

bool OSB_DB::MappingDistTcsGw::readSpecific ( const Session session,
OSB_LIB::MappingDistTcs tcs 
) [private]

Read MappingDistTcs specific data.

The function uses the object id of `tcs' to read its specific data. The function is not exception-save: If it throws, the status of `tcs' is undefined.

Parameters:
session Database session to use.
tcs Object to populate.
Exceptions:
OsbException 
  • in case of a database error
  • in case of an unknown usage type.
Returns:
true if the data have been read, else false.

bool OSB_DB::MappingDistTcsGw::sameTariffClasses ( const Session session,
const OSB_LIB::MappingDistTcs::Oid tcsId,
OSB_LIB::OsbErrors errors 
) [private]

Check consistency of tariff classes.

The function first checks if another version of a mapping TCS with a freezed status exists.
If this is the case, the function verifies that the set of tariff classes for `tcsId' is identical to the set of tariff classes for other freezed versions the mapping TCS.

Remarks:
Prior to calling this member, the caller should use distTcsFreezed() to make sure that a distance TCS is assigned to the mapping TCS. Failing to do so may result in a lot of useless errors.
Parameters:
session Database session to use.
tcsId Id of the mapping TCS to check.
errors Container for detected errors.
Exceptions:
OsbException 
  • in case of a database error.
Returns:
true if either no other freezed version for the mapping TCS exists or the set of tariff classes are same.

bool OSB_DB::MappingDistTcsGw::updSpecific ( const Session session,
OSB_LIB::MappingDistTcs tcs 
) [private]

Update MappingDistTcs specific data.

Parameters:
session Database session to use.
tcs Object to with data to update.
Exceptions:
OsbException 
  • in case of a database error
  • if the distance TCS does not exist.
Returns:
true if the data have been updated, else false.


Friends And Related Function Documentation

friend class OSB_LIB::MappingDistTcs [friend]

Only the mapping TCS is allowed to use this class.

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


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