OSB_CORBA::Accounting_i Class Reference

Inheritance diagram for OSB_CORBA::Accounting_i:

Inheritance graph
[legend]
Collaboration diagram for OSB_CORBA::Accounting_i:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class provides functions to retrieve chargetraits, taxkeys, accounts, roundrules, currencybook and units.

An accounting servant has to be created before the retrieval functions provided in this class can be used. An example of creating such an accounting servant is as follows:

      Accounting_ptr TariffCatalogue_i::getAccounting()
      {
          CORBA::Object_var objVar;
          ...
          // Create a session guard.
          SessionGuard g(false);
          Accounting_i* tmp = new Accounting_i(g.get());

          ...
          // Use a POA to create a corba object.
          objVar = ...

          return Accounting:_narrow(objVar.in());
        }

Definition at line 74 of file chargetraits_i.h.

Public Member Functions

Static Public Attributes

Private Member Functions


Constructor & Destructor Documentation

OSB_CORBA::Accounting_i::Accounting_i ( const OSB_DB::Session session  ) 

Constructor initialises all lists.

Caller of the function is responsible to send in a session that is guarded by a SessionGuard.

Parameters:
session Database session required to read in lists.

virtual OSB_CORBA::Accounting_i::~Accounting_i (  )  [inline, virtual]

Definition at line 89 of file chargetraits_i.h.


Member Function Documentation

virtual CORBA::Boolean OSB_CORBA::Accounting_i::creChargeTraits ( const CurrencyCode &  currency,
const RoundRuleId &  rrId,
const Utf8String &  accCode,
const Utf8String &  numFormat,
const TaxKeyId &  tkId,
ChargeType  cType,
OSB_DB::Session session,
ChargeTraits_out  chrgTraits 
) throw (CORBA::SystemException, OsbCorbaException) [virtual]

Greate a new charge traits.

If such a configuration of the charge traits already exist, the unique id of the charge traits will be returned. If the charge traits does not exist, the charge traits will be created and the unique id of the newly created charge traits will be returned. If create is not successful, a charge triats with an id value of 0 will be returned. User of this function must send in a guarded session by a SessionGuard.

Parameters:
currency Unique id of a currency.
rrId Unique id of a round rule.
accCode Account code.
numFormat Number format of new charge traits.
tkId Unique id of tax key.
cType Charge type of new charge traits.
session Database session.
chrgTraits Existing or newly created ChargeTraits returned.
Returns:
True if new charge traits is created else return false if existing charge traits is found.
Exceptions:
OsbCorbaException if operation fails.

virtual CORBA::Boolean OSB_CORBA::Accounting_i::delChargeTraits ( OSB_DB::Session session,
const ChargeTraitsId &  id 
) throw (CORBA::SystemException, OsbCorbaException) [virtual]

Remove a charge traits by id.

User of this function must send in a guarded session by a SessionGuard.

Parameters:
session Database session.
id Unique charge traits id.
Returns:
True if charge traits is deleted.
Exceptions:
OsbCorbaException if operation failed at the database.

virtual Account* OSB_CORBA::Accounting_i::getAccount ( const Utf8String &  accCode  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get an account.

Parameters:
accCode Unique code of account.
Returns:
Pointer to an account.
Exceptions:
OsbCorbaException if
  • no such account with the id exists.

virtual AccountSeq* OSB_CORBA::Accounting_i::getAccounts (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of accounts in the catalogue.

Uses the getAccount function.

Returns:
List of accounts.
Exceptions:
OsbCorbaException if retrieval of any one of the account fails.

virtual TaxKeySeq* OSB_CORBA::Accounting_i::getAssocTaxKeys (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of associate tax keys in the catalogue.

Returns:
List of associate tax keys.
Exceptions:
OsbCorbaException if retrieval of any one of the tax key fails.

virtual ChargeTraits* OSB_CORBA::Accounting_i::getChargeTraits ( const ChargeTraitsId &  id  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a charge trait.

Parameters:
id Unique id of charge traits.
Returns:
Pointer to a charge traits.
Exceptions:
OsbCorbaException if
  • no such charge traits with the id exists.

virtual ChargeTraitsSeq* OSB_CORBA::Accounting_i::getChargeTraitses (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of charge traits in the catalogue.

Uses the getChargeTrait function.

Returns:
List of charge traits
Exceptions:
OsbCorbaException if retrieval of any one of the charge trait fails.

virtual TaxKeySeq* OSB_CORBA::Accounting_i::getContractTaxKeys (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of contract tax keys in the catalogue.

Returns:
List of contract tax keys.
Exceptions:
OsbCorbaException if retrieval of any one of the tax key fails.

virtual Currency* OSB_CORBA::Accounting_i::getCurrency ( const CurrencyCode &  code  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a currency by code.

Parameters:
code Typesafe code of currency.
Returns:
Pointer to a currency.
Exceptions:
OsbCorbaException if
  • the currency for code does not exist.

virtual CurrencyBook* OSB_CORBA::Accounting_i::getCurrencyBook (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of currency in the catalogue.

Uses the getCurrency function.

Returns:
List of currency.
Exceptions:
OsbCorbaException if retrieval of any one of the currency fails.

virtual TaxKeySeq* OSB_CORBA::Accounting_i::getProductTaxKeys (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of product tax keys in the catalogue.

Returns:
List of product tax keys.
Exceptions:
OsbCorbaException if retrieval of any one of the tax key fails.

virtual RoundRule* OSB_CORBA::Accounting_i::getRoundRule ( const RoundRuleId &  id  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a round rule.

Parameters:
id Unique id of round rule.
Returns:
Pointer to a round rule.
Exceptions:
OsbCorbaException if
  • no such round rule with the id exists.

virtual RoundRuleId OSB_CORBA::Accounting_i::getRoundRuleByName ( const Utf8String &  name  )  throw (CORBA::SystemException) [virtual]

Get a round rule by name.

Parameters:
name Unique name of round rule.
Returns:
Unique id of round rule if found, else return ID_NOT_SET.

virtual RoundRuleSeq* OSB_CORBA::Accounting_i::getRoundRules (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of round rules in the catalogue.

Uses the getRoundRule function.

Returns:
List of round rules.
Exceptions:
OsbCorbaException if retrieval of any one of the round rule fails.

TaxKeySeq* OSB_CORBA::Accounting_i::getSpecificTaxKeys ( TaxKeyType  type  )  throw (CORBA::SystemException, OsbCorbaException) [private]

virtual TaxKey* OSB_CORBA::Accounting_i::getTaxKey ( const TaxKeyId &  id  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a tax key.

Parameters:
id Unique id of tax key.
Returns:
Pointer to a tax key servant.
Exceptions:
OsbCorbaException if
  • no such tax key with the id exists.

virtual TaxKeyId OSB_CORBA::Accounting_i::getTaxKeyByName ( const Utf8String &  name  )  throw (CORBA::SystemException) [virtual]

Get a tax key by name.

Parameters:
name Unique name of tax key.
Returns:
Unique id of tax key if found else return ID_NOT_SET.

virtual TaxKeySeq* OSB_CORBA::Accounting_i::getTaxKeys (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of tax keys in the catalogue.

Uses the getTaxKey function.

Returns:
List of tax keys.
Exceptions:
OsbCorbaException if retrieval of any one of the tax key fails.

virtual Unit* OSB_CORBA::Accounting_i::getUnit ( const UnitId &  id  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get a unit.

Parameters:
id Unique id of unit.
Returns:
Pointer to a unit.
Exceptions:
OsbCorbaException if
  • no such unit with the id exists.

virtual UnitId OSB_CORBA::Accounting_i::getUnitByName ( const Utf8String &  name  )  throw (CORBA::SystemException) [virtual]

Get a unit by name.

Parameters:
name Unique name of unit.
Returns:
Unique id of unit if found else return ID_NOT_SET.

virtual UnitSeq* OSB_CORBA::Accounting_i::getUnits (  )  throw (CORBA::SystemException, OsbCorbaException) [virtual]

Get list of units in the catalogue.

Uses the getUnit function.

Returns:
List of units.
Exceptions:
OsbCorbaException if retrieval of any one of the unit fails.


Member Data Documentation

const std::string OSB_CORBA::Accounting_i::IFC [static]

Definition at line 77 of file chargetraits_i.h.


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