pricelist-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00012 /*
00013   AUTHOR(S): Ashwin Pakramzis (ap)
00014 
00015   RCS information
00016    $Name: OSB_060808 $
00017    $Revision: 1.22 $
00018 
00019   License
00020    OSB rating and billing library for communication networks
00021    Copyright (C) 2004, 2005, 2006  OSB systems
00022 
00023    This file may be distributed and/or modify under the terms of the
00024    GNU General Public License (GPL) as published by the Free Software
00025    Foundation which is provided in the file LICENSE.GPL included in the
00026    packaging of this file.
00027 
00028    The file is distributed in the hope that it will be useful, but WITHOUT
00029    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00030    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00031    for more details.
00032 
00033    Holders of a OSB Commercial License may use this file under the terms
00034    and conditions of this commercial license.
00035  */
00036 #ifndef _PRICELISTGW_H_
00037 #define _PRICELISTGW_H_
00038 
00039 // *********************************************************************
00040 // included header files:
00041 // + standard includes
00042 
00043 // + local headers
00044 #include "osberror.h"
00045 #include "pricelist.h"
00046 
00047 // *********************************************************************
00048 // class declarations
00049 namespace OSB_LIB {
00050     class Date;
00051     class Pricelist;
00052     class PricelistCfg;
00053     class OnetimeChargeDef;
00054 }
00055 
00056 namespace OSB_DB {
00057     class Session;
00058 }
00059 
00060 // ************************************************************************
00061 // namespace extensions
00062 namespace OSB_DB {
00063 
00064 // *********************************************************************
00065 // class definitions
00073     class PricelistGw {
00074     public:
00076         PricelistGw() {}
00077         // copy, destructor and assigment by compiler
00078 
00086         bool fetchOtcDef(
00087             const Session& session,
00088             OSB_LIB::OnetimeChargeDef& otc
00089         );
00090 
00098         bool insOtcDef(
00099             const Session& session,
00100             OSB_LIB::OnetimeChargeDef& otc
00101         );
00102 
00110         bool delOtcDef(
00111             const Session& session,
00112             const OSB_LIB::OnetimeChargeDef::Oid& otcId
00113         );
00114 
00122         bool fetchPricelist(
00123             const Session& session,
00124             OSB_LIB::Pricelist& pl
00125         );
00126 
00134         long fetchPricelists(
00135             const Session& session,
00136             OSB_LIB::Pricelists* pls
00137         );
00138 
00146         bool insPricelist(
00147             const Session& session,
00148             OSB_LIB::Pricelist& pl
00149         );
00150 
00158         bool updPricelist(
00159             const Session& session,
00160             const OSB_LIB::Pricelist& pl
00161         );
00162 
00170         bool delPricelist(
00171             const Session& session,
00172             const OSB_LIB::Pricelist::Oid& plId
00173         );
00174 
00187         OSB_LIB::ObjectStatus checkObjVs(
00188             const Session& session,
00189             const OSB_LIB::Pricelist& pl
00190         );
00191 
00199         long fetchPricelistCfg(
00200             const Session& session,
00201             OSB_LIB::PricelistCfg& plc
00202         );
00203 
00211         long fetchPricelistCfgs(
00212             const Session& session,
00213             OSB_LIB::PricelistCfgs* plcs
00214         );
00215 
00223         long insPricelistCfg(
00224             const Session& session,
00225             OSB_LIB::PricelistCfg& plc
00226         );
00227 
00235         bool updPricelistCfg(
00236             const Session& session,
00237             const OSB_LIB::PricelistCfg& plc
00238         );
00239 
00248         bool delPricelistCfg(
00249             const Session& session,
00250             const OSB_LIB::PricelistCfg& plc
00251         );
00252 
00265         OSB_LIB::ObjectStatus checkObjVs(
00266             const Session& session,
00267             const OSB_LIB::PricelistCfg& plc
00268         );
00269 
00277         OSB_LIB::CfgStatus getStatus(
00278             const Session& session,
00279             const OSB_LIB::PricelistCfg::Oid& plcId
00280         );
00281 
00290         bool setStatus(
00291             const Session& session,
00292             const OSB_LIB::PricelistCfg& plc,
00293             const OSB_LIB::CfgStatus& status
00294         );
00295 
00303         long fetchSubsFuncCfgs(
00304             const Session& session,
00305             OSB_LIB::SubsFuncCfgs* sfc
00306         );
00307 
00316         long fetchSubsChargeDefs(
00317             const Session& session,
00318             OSB_LIB::SubsFuncCfg* sfc
00319         );
00320 
00321     private:
00329         bool checkName (
00330             const Session&            session,
00331             const OSB_LIB::Pricelist& pl
00332         );
00333 
00341         bool checkName (
00342             const Session&               session,
00343             const OSB_LIB::PricelistCfg& plc
00344         );
00345 
00353         void insPricelistOtc (
00354             const Session&               session,
00355             const OSB_LIB::PricelistCfg& plc
00356         );
00357 
00365         void delOtcDef(
00366             const Session& session,
00367             const OSB_LIB::PricelistCfg& plc
00368         );
00369 
00370     };
00371 
00372 }                                       // namespace OSB_DB
00373 #endif                                  // #ifndef _PRICELISTGW_H_

Generated on Sat Sep 2 14:06:33 2006 for OSB Library by  doxygen 1.4.7