OSB_DB::SpecialDateGw Struct Reference

List of all members.

Detailed Description

Database interface SpecialDate.

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

Public Member Functions

Private Member Functions

Friends


Member Function Documentation

OSB_LIB::ObjectStatus OSB_DB::SpecialDateGw::checkObjVs ( const Session session,
const OSB_LIB::SpecialDate sd 
) [private]

Check the current object version.

Parameters:
session Database session.
sd 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::SpecialDateGw::dateInFuture ( const Session session,
const OSB_LIB::SpecialDate sd 
) [private]

Ensure the special date configured is in the future.

Parameters:
session Database session.
sd Special date to check.
Returns:
true if both start and end dates are in the future else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::SpecialDateGw::dayClassFreezed ( const Session session,
const OSB_LIB::SpecialDate sd 
) [private]

Ensure the day class for this special date is freezed.

Parameters:
session Database session.
sd Special date to check.
Returns:
true if the refered day class has been freezed else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::SpecialDateGw::dayClassReleased ( const Session session,
const OSB_LIB::SpecialDate sd 
) [private]

Ensure the day class for this special date is released.

Parameters:
session Database session.
sd Special date to check.
Returns:
true if the refered day class has been released else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::SpecialDateGw::delSpecialDate ( const Session session,
OSB_LIB::SpecialDate sd 
) [private]

Delete a special date.

Parameters:
session Database session.
sd Special date to be deleted.
Returns:
true if successfully deleted else false.
Exceptions:
OsbException for the following errors:
  • object does not exist.
  • object has been modified.

bool OSB_DB::SpecialDateGw::fetch ( const Session session,
OSB_LIB::SpecialDate sd 
)

Read a special date from database..

This function populate a special date object based on the object id it carries.

Parameters:
session Database session.
sd The special date object to be populated. be stored.
Returns:
true if success else false;
Exceptions:
OsbException for database errors.

long OSB_DB::SpecialDateGw::fetch ( const Session session,
OSB_LIB::SpecialDates sds 
)

Retrieve all special dates.

This function retrieves all special dates from database.

Parameters:
session Database session.
sds The container where the retrieve data will be stored.
Returns:
Number of special dates retrived.
Exceptions:
OsbException for database errors.

OSB_LIB::CfgStatus OSB_DB::SpecialDateGw::getStatus ( const Session session,
const OSB_LIB::SpecialDate::Oid sdId 
) [private]

Get the status of a special date in database.

Parameters:
session Database session.
sdId Object id of the special date.
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::SpecialDateGw::insSpecialDate ( const Session session,
OSB_LIB::SpecialDate sd 
) [private]

Create a new special date.

Parameters:
session Database session.
sd Special date object.
Returns:
true if successfully deleted else false.
Exceptions:
OsbException for any database errors.

bool OSB_DB::SpecialDateGw::updSpecialDate ( const Session session,
OSB_LIB::SpecialDate sd 
) [private]

Update an existing special date.

This function will match the given date from the object with the previous defined ones, if yes, it will changed the original values with new one, but the date will not be changed, and it also need to check whether the new DayClassId will bring conflict with that define in Day_Class; if not, error message will also be thown.

Parameters:
session Database session.
sd Special date object.
Returns:
true if success else false.

void OSB_DB::SpecialDateGw::updStatus ( const Session session,
OSB_LIB::SpecialDate sd 
) [private]

Change the status of a special date.

Parameters:
session Database session.
sd Special date to update, its new status must be already set.


Friends And Related Function Documentation

friend class OSB_LIB::SpecialDate [friend]

Special date needs to call the private member functions.

Definition at line 272 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