DataSetTypeCapabilities.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/dataaccess/dataset/DataSetTypeCapabilities.h
22 
23  \brief A class that informs what kind of constraint and index is supported by a given data source.
24 */
25 
26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPECAPABILITIES_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPECAPABILITIES_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 namespace te
33 {
34  namespace da
35  {
36  /*!
37  \class DataSetTypeCapabilities
38 
39  \brief A class that informs what kind of constraint and index is supported by a given data source.
40 
41  \ingroup dataaccess
42  */
44  {
45  public:
46 
47  /*! \brief Constructor. */
49 
50  /*! \brief Destructor. */
52 
53  public:
54 
55  bool supportsPrimaryKey() const;
56 
57  void setSupportPrimaryKey(const bool& support);
58 
59  bool supportsUniqueKey() const;
60 
61  void setSupportUniqueKey(const bool& support);
62 
63  bool supportsForeignKey() const;
64 
65  void setSupportForeingKey(const bool& support);
66 
67  bool supportsSequence() const;
68 
69  void setSupportSequence(const bool& support);
70 
71  bool supportsCheckConstraints() const;
72 
73  void setSupportCheckConstraints(const bool& support);
74 
75  bool supportsIndex() const;
76 
77  void setSupportIndex(const bool& support);
78 
79  bool supportsRTreeIndex() const;
80 
81  void setSupportRTreeIndex(const bool& support);
82 
83  bool supportsBTreeIndex() const;
84 
85  void setSupportBTreeIndex(const bool& support);
86 
87  bool supportsHashIndex() const;
88 
89  void setSupportHashIndex(const bool& support);
90 
91  bool supportsQuadTreeIndex() const;
92 
93  void setSupportQuadTreeIndex(const bool& support);
94 
95  void setSupportAll();
96 
97  bool supportsAddColumn() const;
98 
99  void setSupportAddColumn(const bool& support);
100 
101  bool supportsRemoveColumn() const;
102 
103  void setSupportRemoveColumn(const bool& support);
104 
105  bool supportsDataEdition() const;
106 
107  void setSupportDataEdition(const bool& support);
108 
109  private:
110 
111  bool m_supportPrimaryKey; //!< A flag that indicates if the data source supports primary key constraint.
112  bool m_supportUniqueKey; //!< A flag that indicates if the data source supports unique key constraint.
113  bool m_supportForeignKey; //!< A flag that indicates if the data source supports foreign key constraint.
114  bool m_supportSequence; //!< A flag that indicates if the data source supports sequence constraint.
115  bool m_supportCheckConstraints; //!< A flag that indicates if the data source supports check-constraints.
116  bool m_supportIndex; //!< A flag that indicates if the data source supports some type of index.
117  bool m_supportRTreeIndex; //!< A flag that indicates if the data source supports r-tree indexes.
118  bool m_supportBTreeIndex; //!< A flag that indicates if the data source supports b-tree indexes.
119  bool m_supportHashIndex; //!< A flag that indicates if the data source supports hash indexes.
120  bool m_supportQuadTreeIndex; //!< A flag that indicates if the data source supports quad-tree indexes.
121  bool m_supportAddColumn; //!< A flag that indicates if the data set supports adding columns.
122  bool m_supportRemoveColumn; //!< A flag that indicates if the data set supports removing columns.
123  bool m_supportDataEdition; //!< A flag that indicates if the data set supports data edition.
124  };
125 
126  } // end namespace da
127 } // end namespace te
128 
129 #endif // __TERRALIB_DATAACCESS_INTERNAL_DATASETTYPECAPABILITIES_H
bool m_supportQuadTreeIndex
A flag that indicates if the data source supports quad-tree indexes.
A class that informs what kind of constraint and index is supported by a given data source...
bool m_supportPrimaryKey
A flag that indicates if the data source supports primary key constraint.
bool m_supportForeignKey
A flag that indicates if the data source supports foreign key constraint.
bool m_supportUniqueKey
A flag that indicates if the data source supports unique key constraint.
bool m_supportBTreeIndex
A flag that indicates if the data source supports b-tree indexes.
bool m_supportCheckConstraints
A flag that indicates if the data source supports check-constraints.
bool m_supportSequence
A flag that indicates if the data source supports sequence constraint.
bool m_supportRTreeIndex
A flag that indicates if the data source supports r-tree indexes.
URI C++ Library.
dataTypeCapabilities setSupportAll()
bool m_supportRemoveColumn
A flag that indicates if the data set supports removing columns.
dataSetTypeCapabilities setSupportQuadTreeIndex(false)
bool m_supportHashIndex
A flag that indicates if the data source supports hash indexes.
bool m_supportIndex
A flag that indicates if the data source supports some type of index.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
bool m_supportDataEdition
A flag that indicates if the data set supports data edition.
bool m_supportAddColumn
A flag that indicates if the data set supports adding columns.