OSB_DB::DayClassGw Struct Reference

List of all members.

Detailed Description

Database interface DayClass.

Definition at line 58 of file tariffperiod-gw.h.

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::DayClassGw::checkObjVs ( const Session session,
const OSB_LIB::DayClass dc 
) [private]

Check the current object version.

Parameters:
session Database session.
dc Object where the object version is to be checked.
Returns:
Result of the object version verification. Possible values are:
  • objUnchanged
  • objModified
  • objDeleted
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::DayClassGw::delDayClass ( const Session session,
OSB_LIB::DayClass dc 
) [private]

Delete a day class.

This function will delete the day class from database. After a successful deletion, the passed in day class object will have its object id unset.

Parameters:
session Database session.
dc Day class to be deleted.
Returns:
true if successfully deleted else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.
  • Other database errors.

bool OSB_DB::DayClassGw::fetch ( const Session session,
OSB_LIB::DayClass dc 
)

Read a day class from database.

This function will use the object id of the day class object to be populated to retrieve all other info from database and later populate them into the passed in object.

Parameters:
session Database session.
dc Day class to be populated.
Returns:
true if success else false.
Exceptions:
OsbException for any database errors.

long OSB_DB::DayClassGw::fetch ( const Session session,
OSB_LIB::DayClasses dcs 
)

Retrieve all day classes from database.

Parameters:
session Database session.
dcs Container to store the data retrieved.
Returns:
Number of day classes retrieved.
Exceptions:
OsbException for any database errors.

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

Get the status of a day class in database.

Parameters:
session Database session.
oid Object id of the day class to be checked.
Returns:
Status of the day class found. Possible values are:
  • cfgEditable
  • cfgStandby
  • cfgTesting
  • cfgReleased
Exceptions:
OsbException for the following errors:
  • Database error.

bool OSB_DB::DayClassGw::hasFreezedSpecialDate ( const Session session,
const OSB_LIB::DayClass::Oid oid 
) [private]

Check whether any freezed special date refered it.

This function will check whether is there exists any special date in status freezed, that is refering this day class.

Parameters:
session Database session.
oid Object id of the day class to be checked.
Returns:
true if exist else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::DayClassGw::hasReleasedSpecialDate ( const Session session,
const OSB_LIB::DayClass::Oid oid 
) [private]

Check whether any released special date refered it.

This function will check whether is there exists any special date in status released, that is refering this day class.

Parameters:
session Database session.
oid Object id of the day class to be checked.
Returns:
true if exist else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::DayClassGw::insDayClass ( const Session session,
OSB_LIB::DayClass dc 
) [private]

Create a new day class.

This function accept a new day class object and insert the data into the database. After a successful insertion, the day class object will have its object id set.

Parameters:
session Database session.
dc Day class object.
Returns:
true if successfully created else false.
Exceptions:
OsbException for the following errors:
  • Name too long.
  • Description too long.
  • Duplicate name.
  • Other database errors.

bool OSB_DB::DayClassGw::isUsedByFreezedTpVersion ( const Session session,
const OSB_LIB::DayClass::Oid oid 
) [private]

Check whether any freezed tariff period version is using this day class.

Parameters:
session Database session.
oid Object id of the day class to be checked.
Returns:
true if in used else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::DayClassGw::isUsedByReleasedTpVersion ( const Session session,
const OSB_LIB::DayClass::Oid oid 
) [private]

Check whether any released tariff period version is using this day class.

Parameters:
session Database session.
oid Object id of the day class to be checked.
Returns:
true if in used else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::DayClassGw::updDayClass ( const Session session,
OSB_LIB::DayClass dc 
) [private]

Modify the day class definitions.

This function will update the day class entry in the database with the new passed in day class object.

Parameters:
session Database session.
dc New day class object.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.
  • Duplicate name found.
  • Other database errors.

void OSB_DB::DayClassGw::updStatus ( const Session session,
OSB_LIB::DayClass dc 
) [private]

Change the status of a day class.

Parameters:
session Database session.
dc Day class to update, its new status must be already set.


Friends And Related Function Documentation

friend class OSB_LIB::DayClass [friend]

Day class needs to call the private member functions.

Definition at line 60 of file tariffperiod-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