OSB_DB::TzConfigGw Struct Reference

List of all members.

Detailed Description

Database gateway for the class TzConfig.

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

Public Member Functions


Member Function Documentation

void OSB_DB::TzConfigGw::bothDateInFuture ( const Session session,
const OSB_LIB::TzConfig::Oid oid,
OSB_LIB::OsbErrors errors 
)

Ensure both start and end dates are in the future.

Start date must be in the future. End date must be in the future or null (not set).

Parameters:
session Database session.
oid Unique tariff zone config id.
errors Container for the errors encountered.

OSB_LIB::ObjectStatus OSB_DB::TzConfigGw::checkObjVs ( const Session session,
const OSB_LIB::TzConfig tzConfig 
)

Check the current object version.

Parameters:
session Database session.
tzConfig Object where the object version is to be checked.
Returns:
The result of the object version verification, possible values are:
  • objUnchanged
  • objModified
  • objDeleted

void OSB_DB::TzConfigGw::checkOverLap ( const Session session,
const OSB_LIB::TzConfig tzConfig,
OSB_LIB::OsbErrors errors 
)

Check for overlaps in tariff zones.

Check that changing the tariff zone to standby mode would not result in time period conflicts with other tariff zones already in standby mode.

Parameters:
session Database session.
tzConfig Tariff zone configuration to be checked.
errors Error msg to show tariff zones have time period conflicts.

bool OSB_DB::TzConfigGw::delAllTzConfig ( const Session session,
const OSB_LIB::TariffZone::Oid oid 
)

Delete all tariff zone configurations from the database.

This function removes all tariff zone configuration with the tariff zone id from the database. It does not remove the tariff zone configuration object from the master list.

Parameters:
session Database session.
oid Unique id of tariff zone.
Returns:
true if all tariff zone configurations have been deleted successfully else false.
Exceptions:
OsbException if encounter problem during process.

bool OSB_DB::TzConfigGw::delTzConfig ( const Session session,
OSB_LIB::TzConfig tzcfg 
)

Delete a tariff zone configuration from the database.

This function removes the tariff zone configuration from the database. It does not remove the tariff zone configuration object from the master list.

Parameters:
session Database session.
tzcfg Tariff zone configuration to be removed.
Returns:
true if success else false.
Exceptions:
OsbException if encounter problem during process.

bool OSB_DB::TzConfigGw::destinationCoverWholeTzCfgReleasedPeriod ( const Session session,
const OSB_LIB::TzConfig::Oid oid 
)

Check if the destination connection point is valid through the relased period of tariff zone configuration.

This function will ensure that the released period of destination connection point covers the released period of the tariff zone configuration. The status of destination connection point must be released for the whole released period of a tariff zone configuration.

Parameters:
session Database session.
oid Unique tariff zone config id.
Returns:
true if covered else false.

void OSB_DB::TzConfigGw::destinationCoverWholeTzConfigReleasedPeriod ( const Session session,
const OSB_LIB::TzConfig::Oid oid,
OSB_LIB::OsbErrors errors 
)

Check if the destination connection point is valid through the relased period of tariff zone configuration.

This function will ensure that the released period of destination connection point covers the released period of the tariff zone configuration. The status of destination connection point must be released for the whole released period of a tariff zone configuration.

Parameters:
session Database session.
oid Unique tariff zone config id.
errors Container for the errors encountered.

void OSB_DB::TzConfigGw::destinationFreezed ( const Session session,
const OSB_LIB::Id< OSB_LIB::ConnectionPt > &  dest,
OSB_LIB::OsbErrors errors 
)

Check that the destination connection point has been freezed.

Parameters:
session Database session.
dest Object id of the destination connection point.
errors Container for all errors found.

void OSB_DB::TzConfigGw::destinationReleased ( const Session session,
const OSB_LIB::Id< OSB_LIB::ConnectionPt > &  dest,
OSB_LIB::OsbErrors errors 
)

Check that the destination connection point has been released.

Parameters:
session Database session.
dest Object id of the destination connection point.
errors Container for all errors found.

bool OSB_DB::TzConfigGw::fetch ( const Session session,
OSB_LIB::TzConfig tzcfg 
)

Populate a tariff zone configuration.

This function retrieves all data of a tariff zone configuration based on the object id of the object to be populated.

Parameters:
session Database session.
tzcfg Tariff zone configuration to be populated.
Returns:
true if success else false.
Exceptions:
OsbException when encounter problem during process.

long OSB_DB::TzConfigGw::fetch ( const Session session,
OSB_LIB::TzConfigs tzcfgs 
)

Load all tariff zone configurations into the argument STL container.

This function supports the interface to retrieve data from TzConfig.

Parameters:
session Database session.
tzcfgs Container for the tariff zone configurations retrieved.
Returns:
Number of objects.
Exceptions:
OsbException when encounter problem during process.

void OSB_DB::TzConfigGw::gracePeriodExpired ( const Session session,
const OSB_LIB::TzConfig::Oid oid,
OSB_LIB::OsbErrors errors 
)

Check that configuration including the grace period has already expired.

Parameters:
session Database session.
oid Unique tariff zone config id.
errors Error msg to show configuration has not expired.

bool OSB_DB::TzConfigGw::insTzConfig ( const Session session,
OSB_LIB::TzConfig tzCfg 
)

Create a record in the database.

Create a new TzConfig object, which is to be returned to the caller. The function does not add the object into the list of tariff zone configurations.

Parameters:
session Database session.
tzCfg New tariff zone configuration to be inserted.
Exceptions:
OsbException if origin and destination pair already exist.

bool OSB_DB::TzConfigGw::isUsedByReleasedDistTcs ( const Session session,
const OSB_LIB::TariffZone::Oid tzOid 
)

Check that tariff zone is used by any released distance TCS.

Parameters:
session Database session.
tzOid Tariff zone to verify.
Returns:
true if covered else false.

void OSB_DB::TzConfigGw::noDateConflict ( const Session session,
const OSB_LIB::TzConfig::Oid oid,
OSB_LIB::OsbErrors errors 
)

Ensure no conflict between the start and end dates.

This function ensures that start date must be earlier than end date, if end date is not null.

Parameters:
session Database session.
oid Unique tariff zone config id.
errors Container for the errors encountered.

bool OSB_DB::TzConfigGw::originCoverWholeTzCfgReleasedPeriod ( const Session session,
const OSB_LIB::TzConfig::Oid oid 
)

Check if the origin connection point is valid through the relased period of tariff zone configuration.

This function will ensure that the released period of origin connection point covers the released period of the tariff zone configuration. The status of origin connection point must be released for the whole released period of a tariff zone configuration.

Parameters:
session Database session.
oid Unique tariff zone config id.
Returns:
true if covered else false.

void OSB_DB::TzConfigGw::originCoverWholeTzConfigReleasedPeriod ( const Session session,
const OSB_LIB::TzConfig::Oid oid,
OSB_LIB::OsbErrors errors 
)

Check if the origin connection point is valid through the relased period of tariff zone configuration.

This function will ensure that the released period of origin connection point covers the released period of the tariff zone configuration. The status of origin connection point must be released for the whole released period of a tariff zone configuration.

Parameters:
session Database session.
oid Unique tariff zone config id.
errors Container for the errors encountered.

void OSB_DB::TzConfigGw::originFreezed ( const Session session,
const OSB_LIB::Id< OSB_LIB::ConnectionPt > &  origin,
OSB_LIB::OsbErrors errors 
)

Check that the origin connection point has been freezed.

Parameters:
session Database session.
origin Object id of the origin connection point.
errors Container for all errors found.

void OSB_DB::TzConfigGw::originReleased ( const Session session,
const OSB_LIB::Id< OSB_LIB::ConnectionPt > &  origin,
OSB_LIB::OsbErrors errors 
)

Check that the origin connection point has been released.

Parameters:
session Database session.
origin Object id of the origin connection point.
errors Container for all errors found.

void OSB_DB::TzConfigGw::updStatus ( const Session session,
OSB_LIB::TzConfig tzConfig 
)

Set status of version to standby mode.

Parameters:
session Database session.
tzConfig Tariff zone configuration to update, its new status must be set.

bool OSB_DB::TzConfigGw::updTzConfig ( const Session session,
OSB_LIB::TzConfig tzcfg 
)

Modify tariff zone configuration.

This function updates a tariff zone configuration entry in database. It updates the entry based on the updated tariff zone configuration object passed in. The object id of the tariff zone configuration is used to identify the entry in the database.

Parameters:
session Database session.
tzcfg Updated tariff zone configuration object.
Returns:
true if success else false.
Exceptions:
OsbException if encounter problem during process.


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