rasdaman base DBMS
dbminterval.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 */
23 #ifndef _DBMINTERVAL_HH_
24 #define _DBMINTERVAL_HH_
25 
26 class DBMinterval;
27 
28 template<class T> class DBRef;
30 
31 #include "reladminif/dbobject.hh"
32 #include "raslib/minterval.hh"
33 
34 
35 //@ManMemo: Module: {\bf relcatalogif}.
36 
37 /*@Doc:
38 Persistent version of r_Minterval. it stores its attributes not very efficient.
39 it is used by DBMDDObj and MDDDomainType because the performance impact is neglectabel.
40 
41 for a more efficient storage system refere to InlineMInterval
42 */
43 
47 class DBMinterval : public DBObject, public r_Minterval
48 {
49 public:
50  DBMinterval();
51 
52  DBMinterval(const OId& id) throw (r_Error);
53 
54  DBMinterval(r_Dimension dim);
55 
56  DBMinterval(const char* dom);
57 
58  DBMinterval(const r_Minterval& old);
59 
60  DBMinterval(const DBMinterval& old);
61 
62  ~DBMinterval();
63  /*@Doc:
64  validates the object in the database.
65  */
66 
67  virtual DBMinterval& operator=(const DBMinterval& old);
68  /*@Doc:
69  replaces only the r_Minterval part of the object
70  */
71 
72  virtual DBMinterval& operator=(const r_Minterval& old);
73  /*@Doc:
74  replaces only the r_Minterval part of the object
75  */
76 
77  virtual r_Bytes getMemorySize() const;
78  /*@Doc:
79  esimates the space taken up by this object with:
80  DBObject::getMemorySize() + sizeof(r_Minterval)
81  + dimensionality * (4 + 4 + 1 + 1)
82  */
83 
84 protected:
85 
86  virtual void insertInDb() throw (r_Error);
87  /*@Doc:
88  inserts the object into the database. it uses one table
89  for the fixed length attributes (oid, size, dimension) and
90  another for dynamic data (lower/upper bounds/fixed ranges)
91  */
92 
93  virtual void updateInDb() throw (r_Error);
94  /*@Doc:
95  */
96 
97  virtual void deleteFromDb() throw (r_Error);
98  /*@Doc:
99  */
100 
101  virtual void readFromDb() throw (r_Error);
102  /*@Doc:
103  */
104 };
105 
106 #endif
virtual void readFromDb()
virtual void updateInDb()
Definition: oidif.hh:67
DBRef< DBMinterval > DBMintervalId
Definition: dbminterval.hh:28
virtual DBMinterval & operator=(const DBMinterval &old)
virtual r_Bytes getMemorySize() const
virtual void deleteFromDb()
virtual void insertInDb()
Definition: dbminterval.hh:47
Definition: dbobject.hh:29
Definition: dbobject.hh:54