statusrequest-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.18 $
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 _STATUSREQUESTGW_H_
00031 #define _STATUSREQUESTGW_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 
00039 // + local headers
00040 #include "osbid.h"
00041 #include "status.h"
00042 
00043 // + class declarations
00044 namespace OSB_LIB {
00045     class Associate;
00046     class Contract;
00047     class PersProduct;
00048     class PersProductNode;
00049     class StatusRequests;
00050     class StatusRequest;
00051     class RequestLinks;
00052 }
00053 
00054 namespace OSB_DB {
00055     class Session;
00056 }
00057 
00058 // ************************************************************************
00059 // namespace extensions
00060 namespace OSB_DB {
00061 
00062 // ************************************************************************
00063 // forward declarations
00064 
00065 // ************************************************************************
00066 // type definitions
00067 
00068 // ************************************************************************
00069 // class definitions
00085     class StatusRequestGw {
00087         friend class OSB_LIB::StatusRequest;
00088 
00089     public:
00091         typedef OSB_LIB::Id<OSB_LIB::StatusRequest> SrqId;
00092     public:
00094 
00095 
00102         bool fetch(
00103             const Session&                session,
00104                   OSB_LIB::StatusRequest* request
00105         );
00106 
00115         long fetch(
00116             const Session&                         session,
00117                   OSB_LIB::StatusRequests*         requests,
00118             const OSB_LIB::Id<OSB_LIB::Associate>& id
00119         );
00120 
00129         long fetch(
00130             const Session&                        session,
00131                   OSB_LIB::StatusRequests*        requests,
00132             const OSB_LIB::Id<OSB_LIB::Contract>& id
00133         );
00134 
00143         long fetch(
00144             const Session&                           session,
00145                   OSB_LIB::StatusRequests*           requests,
00146             const OSB_LIB::Id<OSB_LIB::PersProduct>& id
00147         );
00148 
00157         long fetch(
00158             const Session&                                session,
00159                   OSB_LIB::StatusRequests*                requests,
00160             const OSB_LIB::Id2<OSB_LIB::PersProductNode>& id
00161         );
00163 
00170         void insert(
00171             const Session&                session,
00172                   OSB_LIB::StatusRequest& request
00173         );
00174 
00176 
00177 
00198         bool fetchNext(
00199             const Session&                 session,
00200             const SrqId&                   maxPrev,
00201                   OSB_LIB::StatusRequests* dest
00202         );
00203 
00211         void getEntities(
00212             const Session&                session,
00213             const OSB_LIB::StatusRequest& request,
00214                   OSB_LIB::RequestLinks&  dest
00215         );
00217 
00218     private:
00228         bool updApplied(
00229             const Session&                session,
00230             const OSB_LIB::StatusRequest& request
00231         );
00232 
00241         bool remove(
00242             const OSB_DB::Session&        session,
00243             const OSB_LIB::StatusRequest& request
00244         );
00245 
00247 
00248 
00257         OSB_LIB::ObjectStatus lock(
00258             const Session&                             session,
00259             const OSB_LIB::Id<OSB_LIB::StatusRequest>& srId,
00260                   bool                                 noWait
00261         );
00262 
00271         OSB_LIB::ObjectStatus lock(
00272             const Session&                session,
00273             const OSB_LIB::StatusRequest& request,
00274                   bool                    noWait
00275         );
00276 
00286         bool incObjVs(
00287             const Session&                session,
00288                   OSB_LIB::StatusRequest& request
00289         );
00291     };                                  // class StatusRequestGw
00292 }                                       // namespace OSB_DB
00293 
00294 // ************************************************************************
00295 // inline definitions
00296 namespace OSB_DB {
00297 }                                       // namespace OSB_DB
00298 #endif                                  // #ifndef _STATUSREQUESTGW_H_

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