00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef _CHARGETRAITS_I_H_
00036 #define _CHARGETRAITS_I_H_
00037
00038
00039 #include "chargetraitsS.h"
00040 #include "chargetraits.h"
00041 #include "roundrule.h"
00042 #include "account.h"
00043 #include "osbunit.h"
00044
00045
00046
00047 namespace OSB_CORBA {
00048 using namespace corba::common;
00049
00074 class Accounting_i : public virtual POA_corba::common::Accounting
00075 {
00076 public:
00077 static const std::string IFC;
00078
00087 Accounting_i(const OSB_DB::Session& session);
00088
00089 virtual ~Accounting_i() {};
00090
00099 virtual ChargeTraits* getChargeTraits(
00100 const ChargeTraitsId& id
00101 ) throw (CORBA::SystemException, OsbCorbaException);
00102
00112 virtual ChargeTraitsSeq* getChargeTraitses()
00113 throw (CORBA::SystemException, OsbCorbaException);
00114
00123 virtual Account* getAccount(
00124 const Utf8String& accCode
00125 ) throw (CORBA::SystemException, OsbCorbaException);
00126
00136 virtual AccountSeq* getAccounts()
00137 throw (CORBA::SystemException, OsbCorbaException);
00138
00146 virtual TaxKeyId getTaxKeyByName(
00147 const Utf8String& name
00148 ) throw (CORBA::SystemException);
00149
00158 virtual TaxKey* getTaxKey(
00159 const TaxKeyId& id
00160 ) throw (CORBA::SystemException, OsbCorbaException);
00161
00171 virtual TaxKeySeq* getTaxKeys()
00172 throw (CORBA::SystemException, OsbCorbaException);
00173
00181 virtual TaxKeySeq* getAssocTaxKeys()
00182 throw (CORBA::SystemException, OsbCorbaException);
00183
00191 virtual TaxKeySeq* getContractTaxKeys()
00192 throw (CORBA::SystemException, OsbCorbaException);
00193
00201 virtual TaxKeySeq* getProductTaxKeys()
00202 throw (CORBA::SystemException, OsbCorbaException);
00203
00212 virtual Currency* getCurrency(
00213 const CurrencyCode& code
00214 ) throw (CORBA::SystemException, OsbCorbaException);
00215
00225 virtual CurrencyBook* getCurrencyBook()
00226 throw (CORBA::SystemException, OsbCorbaException);
00227
00235 virtual RoundRuleId getRoundRuleByName(
00236 const Utf8String& name
00237 ) throw (CORBA::SystemException);
00238
00247 virtual RoundRule* getRoundRule(
00248 const RoundRuleId& id
00249 ) throw (CORBA::SystemException, OsbCorbaException);
00250
00260 virtual RoundRuleSeq* getRoundRules()
00261 throw (CORBA::SystemException, OsbCorbaException);
00262
00270 virtual UnitId getUnitByName(
00271 const Utf8String& name
00272 ) throw (CORBA::SystemException);
00273
00282 virtual Unit* getUnit(
00283 const UnitId& id
00284 ) throw (CORBA::SystemException, OsbCorbaException);
00285
00295 virtual UnitSeq* getUnits()
00296 throw (CORBA::SystemException, OsbCorbaException);
00297
00323 virtual CORBA::Boolean creChargeTraits(
00324 const CurrencyCode& currency,
00325 const RoundRuleId& rrId,
00326 const Utf8String& accCode,
00327 const Utf8String& numFormat,
00328 const TaxKeyId& tkId,
00329 ChargeType cType,
00330 OSB_DB::Session& session,
00331 ChargeTraits_out chrgTraits
00332 ) throw (CORBA::SystemException, OsbCorbaException);
00333
00345 virtual CORBA::Boolean delChargeTraits(
00346 OSB_DB::Session& session,
00347 const ChargeTraitsId& id
00348 ) throw (CORBA::SystemException, OsbCorbaException);
00349
00350 private:
00351 TaxKeySeq* getSpecificTaxKeys(
00352 TaxKeyType type
00353 ) throw (CORBA::SystemException, OsbCorbaException);
00354 };
00355
00362 OSB_LIB::AccountType accountType(OSB_CORBA::AccountType acc);
00363
00370 AccountType accountType(OSB_LIB::AccountType acc);
00371
00378 OSB_LIB::ChargeType chargeType(OSB_CORBA::ChargeType ct);
00379
00386 ChargeType chargeType(OSB_LIB::ChargeType ct);
00387
00394 OSB_LIB::TaxKeyType tkType(OSB_CORBA::TaxKeyType type);
00395
00402 TaxKeyType tkType(OSB_LIB::TaxKeyType tkType);
00403
00410 OSB_LIB::RoundRule::Type rrType(RoundRuleType type);
00411
00418 RoundRuleType rrType(OSB_LIB::RoundRule::Type type);
00419
00420
00421 }
00422
00423 #endif