accessnumber-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Lilian Qin Lan (lan)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.13 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 #ifndef _ACCESSNUMBERGW_H_
00034 #define _ACCESSNUMBERGW_H_
00035 
00036 // *********************************************************************
00037 // included header files
00038 // + standard includes
00039 
00040 // + local headers
00041 #include "resourcefwd.h"
00042 
00043 // *********************************************************************
00044 // class declarations
00045 namespace OSB_LIB {
00046     class AccessNumber;
00047 }
00048 
00049 namespace OSB_DB {
00050     class Session;
00051 }
00052 
00053 // ************************************************************************
00054 // namespace extensions
00055 namespace OSB_DB {
00056 
00057 // *********************************************************************
00058 // type definitions
00059 
00060 // *********************************************************************
00061 // class definitions
00062 
00063     // *****************************************************************
00064     // class AccessNumberGw
00068     class AccessNumberGw {
00070         friend class OSB_LIB::AccessNumber;
00072         typedef
00073         OSB_LIB::ResourceList<OSB_LIB::AccessNumber> AnList;
00075         typedef OSB_LIB::Id<OSB_LIB::Network> NwOid;
00076     public:
00094         void fetch(
00095             const Session& session,
00096                   AnList&  dest,
00097             const NwOid&   nwId,
00098                   bool     availOnly
00099         );
00100     private:
00102         bool read(
00103             const Session&               session,
00104                   OSB_LIB::AccessNumber& an
00105         ) const;
00106 
00108         bool insert(
00109             const Session&               session,
00110             const OSB_LIB::AccessNumber& an
00111         ) const;
00112 
00114         bool update(
00115             const Session&               session,
00116             const OSB_LIB::AccessNumber& an
00117         ) const;
00118 
00120         bool remove(
00121             const Session&               session,
00122             const OSB_LIB::AccessNumber& an
00123         ) const;
00124     };
00125 
00126 
00127 // *********************************************************************
00128 // inline definitions
00129 
00130 }                                       // namespace OSB_DB
00131 #endif                                  // #ifndef _ACCESSNUMBERGW_H_

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