OSB_LIB::SpecialDate Class Reference

Collaboration diagram for OSB_LIB::SpecialDate:

Collaboration graph
[legend]
List of all members.

Detailed Description

Storing info about date definition.

This class gives the date definiton in detail, and also supports functions related to online implementations.

Definition at line 284 of file tariffperiod.h.

Database operations:

Public Types

Public Member Functions

Private Types

Private Member Functions

Status changes:

Private Attributes

Friends


Member Typedef Documentation

typedef Id<DayClass> OSB_LIB::SpecialDate::DcId [private]

Database links between DayClass and SpecialDate.

Definition at line 295 of file tariffperiod.h.

typedef Id<SpecialDate> OSB_LIB::SpecialDate::Oid

Unique object id, database link.

Definition at line 299 of file tariffperiod.h.


Constructor & Destructor Documentation

OSB_LIB::SpecialDate::SpecialDate ( const Oid oid = Oid()  )  [explicit]

Constructor with optional object id.


Member Function Documentation

const bool& OSB_LIB::SpecialDate::annual (  )  const [inline]

Get annual.

Definition at line 318 of file tariffperiod.h.

References annual_.

bool OSB_LIB::SpecialDate::check ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from editable to standby.

In order to set the status from editable to standby, the following criteria must be fulfilled:

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.
Exceptions:
OsbException for any database errors.

const Date& OSB_LIB::SpecialDate::date (  )  const [inline]

Get date.

Definition at line 316 of file tariffperiod.h.

References date_.

const DcId& OSB_LIB::SpecialDate::dcId (  )  const [inline]

Get day class id.

Definition at line 312 of file tariffperiod.h.

References dcId_.

bool OSB_LIB::SpecialDate::gracePeriodExpired (  )  const

Check if grace period has expired.

Returns:
true if grace period has expired, else false.

bool OSB_LIB::SpecialDate::insert ( const OSB_DB::Session session  )  [private]

Insert a special date into database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Duplicate name.

const std::string& OSB_LIB::SpecialDate::name (  )  const [inline]

Get name.

Definition at line 314 of file tariffperiod.h.

References name_.

long OSB_LIB::SpecialDate::objVs (  )  const [inline]

Get object version.

Definition at line 322 of file tariffperiod.h.

References objVs_.

const Oid& OSB_LIB::SpecialDate::oid (  )  const [inline]

Get object id.

Definition at line 310 of file tariffperiod.h.

References oid_.

bool OSB_LIB::SpecialDate::read ( const OSB_DB::Session session  ) 

Read a special date from database.

Parameters:
session Database session.
Returns:
true if success else false.

bool OSB_LIB::SpecialDate::release ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from standby to release.

In order to set the status from standby to release, the following criteria must be fulfilled:

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

bool OSB_LIB::SpecialDate::remove ( const OSB_DB::Session session  )  [private]

Remove a special date from database.

Parameters:
session Database session.
Returns:
true if success else false.
Exceptions:
OsbException for the following errors:
  • Object not found.
  • Object has been modified.
  • Version object exists.

bool OSB_LIB::SpecialDate::revoke ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from release to standby.

In order to set the status from release to standby, the following criteria must be fulfilled:

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

void OSB_LIB::SpecialDate::setAnnual ( const bool  newAnnual  ) 

Set whether a given special date is yearly or not.

Parameters:
newAnnual A flag to assign whether it is yearly or not.

void OSB_LIB::SpecialDate::setDate ( const Date newDate  ) 

Set a new special date.

Parameters:
newDate A new special date.

void OSB_LIB::SpecialDate::setDcId ( const DcId dcId  ) 

Set a day class id for a special date.

Parameters:
dcId A day class id.

void OSB_LIB::SpecialDate::setName ( const std::string &  name  ) 

Set a new name.

Parameters:
name New name for the special date.
Exceptions:
OsbException if:
  • name is empty.
  • name is too long.

const CfgStatus& OSB_LIB::SpecialDate::status (  )  const [inline]

Get the status.

Definition at line 320 of file tariffperiod.h.

References status_.

bool OSB_LIB::SpecialDate::unfreeze ( const OSB_DB::Session session,
OsbErrors errors 
) [private]

Set the status from standby to editable.

In order to set the status from standby to editable, the following criteria must be fulfilled:

Parameters:
session Database session used.
errors Container for error messages if any.
Returns:
true if success else false.

bool OSB_LIB::SpecialDate::update ( const OSB_DB::Session session  )  [private]

Update a special date in the database.

Parameters:
session Database session used.
Returns:
true if success else false.
Exceptions:
OsbException for the following erros:
  • Name too long.
  • Object not found.
  • Object has been modified.


Friends And Related Function Documentation

friend struct OSB_DB::SpecialDateGw [friend]

Gateway need to populate the data members.

Definition at line 286 of file tariffperiod.h.

friend class TariffCatalogue [friend]

Let the class TariffCatalogue can save, change and delete the private members, and access the functions.

Definition at line 292 of file tariffperiod.h.


Member Data Documentation

bool OSB_LIB::SpecialDate::annual_ [private]

Flag whether the date is annual.

Definition at line 483 of file tariffperiod.h.

Referenced by annual().

Date OSB_LIB::SpecialDate::date_ [private]

Unique identifier for SpecialDate.

Definition at line 482 of file tariffperiod.h.

Referenced by date().

DcId OSB_LIB::SpecialDate::dcId_ [private]

Foreign key to DayClass.

Definition at line 480 of file tariffperiod.h.

Referenced by dcId().

std::string OSB_LIB::SpecialDate::name_ [private]

Day class name.

Definition at line 481 of file tariffperiod.h.

Referenced by name().

long OSB_LIB::SpecialDate::objVs_ [private]

The object version.

Definition at line 485 of file tariffperiod.h.

Referenced by objVs().

Oid OSB_LIB::SpecialDate::oid_ [private]

Unique object id, database link.

Definition at line 479 of file tariffperiod.h.

Referenced by oid().

CfgStatus OSB_LIB::SpecialDate::status_ [private]

Status of the object.

Definition at line 484 of file tariffperiod.h.

Referenced by status().


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