persproduct-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.55 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _PERSPRODUCTGW_H_
00031 #define _PERSPRODUCTGW_H_
00032 
00033 // + standard includes
00034 
00035 // + local headers
00036 #include "persproduct.h"
00037 #include "osbconst.h"
00038 
00039 // *********************************************************************
00040 // class declarations
00041 namespace OSB_LIB {
00042     class Contract;
00043     class PersProductItem;
00044     class PersProduct;
00045     class PersProductNode;
00046 }
00047 
00048 namespace OSB_DB {
00049     class Session;
00050 }
00051 
00052 // ************************************************************************
00053 // namespace extensions
00054 namespace OSB_DB {
00055 
00056 // *********************************************************************
00057 // class definitions
00058 
00066     class PersProductGw {
00068         PersProductGw(const PersProductGw&);
00070         PersProductGw& operator=(const PersProductGw&);
00078         friend class OSB_LIB::PersProductItem;
00079         friend class OSB_LIB::PersProduct;
00080         friend class OSB_LIB::PersProductNode;
00081     public:
00089         PersProductGw() {}
00090 
00104         long fetch(
00105             const Session&           session,
00106                   OSB_LIB::Contract& co
00107         );
00108 
00119         bool fetch(
00120             const Session&              session,
00121                   OSB_LIB::PersProduct& pp
00122         );
00123 
00134         bool fetch(
00135             const Session&                  session,
00136                   OSB_LIB::PersProductNode& pn
00137         );
00138 
00155         long fetchNodes(
00156             const Session&              session,
00157                   OSB_LIB::PersProduct& pp
00158         );
00159 
00186         long fetchItems(
00187             const Session&                  session,
00188                   OSB_LIB::PersProductNode& persNode
00189         );
00190 
00200         OSB_LIB::Id<OSB_LIB::Contract> getContract(
00201             const Session&                   session,
00202             const OSB_LIB::PersProduct::Oid& ppId
00203         );
00204 
00227         bool incPersProdObjVs(
00228             const Session&                   session,
00229             const OSB_LIB::PersProduct::Oid& ppId,
00230                   long&                      objVs,
00231                   bool&                      uptodate);
00232 
00244         bool incObjVs(
00245             const Session&              session,
00246                   OSB_LIB::PersProduct& pp
00247         );
00248 
00249     private:
00257         bool insPersProduct(
00258             const Session&              session,
00259                   OSB_LIB::PersProduct& pp
00260         );
00261 
00269         bool delPersProduct(
00270             const Session&              session,
00271             const OSB_LIB::PersProduct& pp
00272         );
00273 
00287         bool insPersNode(
00288             const Session&                  session,
00289                   OSB_LIB::PersProductNode& persNode
00290         );
00291 
00303         bool delPersNode(
00304             const Session&                       session,
00305             const OSB_LIB::PersProductNode::Oid& oid
00306         );
00307 
00308 
00332         bool fetch(
00333             const Session&                  session,
00334                   OSB_LIB::PersProductItem& item
00335         );
00336 
00350         bool insPersProductItem(
00351             const Session&                  session,
00352                   OSB_LIB::PersProductItem& item
00353         );
00354 
00373         bool updPersProductItem(
00374             const Session&                  session,
00375                   OSB_LIB::PersProductItem& item
00376         );
00377 
00393         bool updPpiAssignTs(
00394             const Session&                  session,
00395                   OSB_LIB::PersProductItem& item,
00396             const OSB_LIB::DateTime&        newTs
00397         );
00398 
00418         bool delPersProductItem(
00419             const Session&                  session,
00420                   OSB_LIB::PersProductItem& item
00421         );
00423 
00425 
00426 
00433         void storeRequest(
00434             const Session&                   session,
00435             const OSB_LIB::PersProduct::Oid& ppId,
00436                   OSB_LIB::StatusRequest&    status
00437         );
00438 
00446         void storeChange(
00447             const Session&                   session,
00448             const OSB_LIB::PersProduct::Oid& ppId,
00449                   OSB_LIB::StatusChange&     change
00450         );
00451 
00460         bool setPrefStatus(
00461             const Session&              session,
00462             const OSB_LIB::PersProduct& pp
00463         );
00464 
00473         bool setEffStatus(
00474             const Session&              session,
00475             const OSB_LIB::PersProduct& pp
00476         );
00478 
00480 
00481 
00488         void storeRequest(
00489             const Session&                       session,
00490             const OSB_LIB::PersProductNode::Oid& ppnId,
00491                   OSB_LIB::StatusRequest&        status
00492         );
00493 
00501         void storeChange(
00502             const Session&                       session,
00503             const OSB_LIB::PersProductNode::Oid& ppnId,
00504                   OSB_LIB::StatusChange&         change
00505         );
00506 
00515         bool setPrefStatus(
00516             const Session&                  session,
00517             const OSB_LIB::PersProductNode& persNode
00518         );
00519 
00528         bool setEffStatus(
00529             const Session&                  session,
00530             const OSB_LIB::PersProductNode& persNode
00531         );
00533 
00544         OSB_LIB::ObjectStatus checkObjVs(
00545             const Session&              session,
00546             const OSB_LIB::PersProduct& pp
00547         );
00548 
00558         OSB_LIB::ObjectStatus lock(
00559             const Session&                   session,
00560             const OSB_LIB::PersProduct::Oid& ppId,
00561                   bool                       noWait
00562         );
00563 
00573         OSB_LIB::ObjectStatus lock(
00574             const Session&              session,
00575             const OSB_LIB::PersProduct& pp,
00576                   bool                  noWait
00577         );
00578 
00589         bool updProductUser(
00590             const Session&              session,
00591             const OSB_LIB::PersProduct& pp
00592         );
00593     };                                  // class PersProductGw
00594 }                                       // namespace OSB_DB
00595 #endif                                  // #ifndef _PERSPRODUCTGW_H_

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