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.
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.
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.
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.
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. |
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.
session | Database session. | |
id | Unique charge traits id. |
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.
accCode | Unique code of account. |
OsbCorbaException | if
|
virtual AccountSeq* OSB_CORBA::Accounting_i::getAccounts | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of accounts in the catalogue.
Uses the getAccount function.
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.
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.
id | Unique id of charge traits. |
OsbCorbaException | if
|
virtual ChargeTraitsSeq* OSB_CORBA::Accounting_i::getChargeTraitses | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of charge traits in the catalogue.
Uses the getChargeTrait function.
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.
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.
code | Typesafe code of currency. |
OsbCorbaException | if
|
virtual CurrencyBook* OSB_CORBA::Accounting_i::getCurrencyBook | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of currency in the catalogue.
Uses the getCurrency function.
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.
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.
id | Unique id of round rule. |
OsbCorbaException | if
|
virtual RoundRuleId OSB_CORBA::Accounting_i::getRoundRuleByName | ( | const Utf8String & | name | ) | throw (CORBA::SystemException) [virtual] |
Get a round rule by name.
name | Unique name of round rule. |
virtual RoundRuleSeq* OSB_CORBA::Accounting_i::getRoundRules | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of round rules in the catalogue.
Uses the getRoundRule function.
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.
id | Unique id of tax key. |
OsbCorbaException | if
|
virtual TaxKeyId OSB_CORBA::Accounting_i::getTaxKeyByName | ( | const Utf8String & | name | ) | throw (CORBA::SystemException) [virtual] |
Get a tax key by name.
name | Unique name of tax key. |
virtual TaxKeySeq* OSB_CORBA::Accounting_i::getTaxKeys | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of tax keys in the catalogue.
Uses the getTaxKey function.
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.
id | Unique id of unit. |
OsbCorbaException | if
|
virtual UnitId OSB_CORBA::Accounting_i::getUnitByName | ( | const Utf8String & | name | ) | throw (CORBA::SystemException) [virtual] |
Get a unit by name.
name | Unique name of unit. |
virtual UnitSeq* OSB_CORBA::Accounting_i::getUnits | ( | ) | throw (CORBA::SystemException, OsbCorbaException) [virtual] |
Get list of units in the catalogue.
Uses the getUnit function.
OsbCorbaException | if retrieval of any one of the unit fails. |
const std::string OSB_CORBA::Accounting_i::IFC [static] |
Definition at line 77 of file chargetraits_i.h.