DataSetTypeCapabilities.cpp
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.cpp
22 
23  \brief A class that informs what kind of constraint and index is supported by a given data source.
24 */
25 
26 // TerraLib
28 
30  : m_supportPrimaryKey(false),
31  m_supportUniqueKey(false),
32  m_supportForeignKey(false),
33  m_supportSequence(false),
34  m_supportCheckConstraints(false),
35  m_supportIndex(false),
36  m_supportRTreeIndex(false),
37  m_supportBTreeIndex(false),
38  m_supportHashIndex(false),
39  m_supportQuadTreeIndex(false),
40  m_supportAddColumn(false),
41  m_supportRemoveColumn(false),
42  m_supportDataEdition(false)
43 {
44 }
45 
47 
49 {
50  return m_supportPrimaryKey;
51 }
52 
54 {
55  m_supportPrimaryKey = support;
56 }
57 
59 {
60  return m_supportUniqueKey;
61 }
62 
64 {
65  m_supportUniqueKey = support;
66 }
67 
69 {
70  return m_supportForeignKey;
71 }
72 
74 {
75  m_supportForeignKey = support;
76 }
77 
79 {
80  return m_supportSequence;
81 }
82 
84 {
85  m_supportSequence = support;
86 }
87 
89 {
91 }
92 
94 {
95  m_supportCheckConstraints = support;
96 }
97 
99 {
100  return m_supportIndex;
101 }
102 
104 {
105  m_supportIndex = support;
106 }
107 
109 {
110  return m_supportRTreeIndex;
111 }
112 
114 {
115  m_supportRTreeIndex = support;
116 }
117 
119 {
120  return m_supportBTreeIndex;
121 }
122 
124 {
125  m_supportBTreeIndex = support;
126 }
127 
129 {
130  return m_supportHashIndex;
131 }
132 
134 {
135  m_supportHashIndex = support;
136 }
137 
139 {
140  return m_supportQuadTreeIndex;
141 }
142 
144 {
145  m_supportQuadTreeIndex = support;
146 }
147 
149 {
150  m_supportPrimaryKey = true;
151  m_supportUniqueKey = true;
152  m_supportForeignKey = true;
153  m_supportSequence = true;
155  m_supportIndex = true;
156  m_supportRTreeIndex = true;
157  m_supportBTreeIndex = true;
158  m_supportHashIndex = true;
159  m_supportQuadTreeIndex = true;
160  m_supportAddColumn = true;
161  m_supportRemoveColumn = true;
162  m_supportDataEdition = true;
163 }
164 
166 {
167  return m_supportAddColumn;
168 }
169 
171 {
172  m_supportAddColumn = support;
173 }
174 
176 {
177  return m_supportRemoveColumn;
178 }
179 
181 {
182  m_supportRemoveColumn = support;
183 }
184 
186 {
187  return m_supportDataEdition;
188 }
189 
191 {
192  m_supportDataEdition = support;
193 }
void setSupportForeingKey(const bool &support)
bool m_supportQuadTreeIndex
A flag that indicates if the data source supports quad-tree indexes.
void setSupportSequence(const bool &support)
void setSupportIndex(const bool &support)
void setSupportDataEdition(const bool &support)
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.
void setSupportCheckConstraints(const bool &support)
void setSupportQuadTreeIndex(const bool &support)
~DataSetTypeCapabilities()
Destructor.
bool m_supportUniqueKey
A flag that indicates if the data source supports unique key constraint.
void setSupportAddColumn(const bool &support)
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.
A class that informs what kind of constraint and index is supported by a given data source...
void setSupportUniqueKey(const bool &support)
void setSupportBTreeIndex(const bool &support)
bool m_supportRemoveColumn
A flag that indicates if the data set supports removing columns.
void setSupportHashIndex(const bool &support)
bool m_supportHashIndex
A flag that indicates if the data source supports hash indexes.
void setSupportRemoveColumn(const bool &support)
void setSupportPrimaryKey(const bool &support)
bool m_supportIndex
A flag that indicates if the data source supports some type of index.
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.
void setSupportRTreeIndex(const bool &support)