1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include "propertyids.hxx"
34 const sal_Char
* getPROPERTY_QUERYTIMEOUT() { return "QueryTimeOut"; }
35 const sal_Char
* getPROPERTY_MAXFIELDSIZE() { return "MaxFieldSize"; }
36 const sal_Char
* getPROPERTY_MAXROWS() { return "MaxRows"; }
37 const sal_Char
* getPROPERTY_CURSORNAME() { return "CursorName"; }
38 const sal_Char
* getPROPERTY_RESULTSETCONCURRENCY() { return "ResultSetConcurrency"; }
39 const sal_Char
* getPROPERTY_RESULTSETTYPE() { return "ResultSetType"; }
40 const sal_Char
* getPROPERTY_FETCHDIRECTION() { return "FetchDirection"; }
41 const sal_Char
* getPROPERTY_FETCHSIZE() { return "FetchSize"; }
42 const sal_Char
* getPROPERTY_ESCAPEPROCESSING() { return "EscapeProcessing"; }
43 const sal_Char
* getPROPERTY_USEBOOKMARKS() { return "UseBookmarks"; }
45 const sal_Char
* getPROPERTY_NAME() { return "Name"; }
46 const sal_Char
* getPROPERTY_TYPE() { return "Type"; }
47 const sal_Char
* getPROPERTY_TYPENAME() { return "TypeName"; }
48 const sal_Char
* getPROPERTY_PRECISION() { return "Precision"; }
49 const sal_Char
* getPROPERTY_SCALE() { return "Scale"; }
50 const sal_Char
* getPROPERTY_ISNULLABLE() { return "IsNullable"; }
51 const sal_Char
* getPROPERTY_ISAUTOINCREMENT() { return "IsAutoIncrement"; }
52 const sal_Char
* getPROPERTY_ISROWVERSION() { return "IsRowVersion"; }
53 const sal_Char
* getPROPERTY_DESCRIPTION() { return "Description"; }
54 const sal_Char
* getPROPERTY_DEFAULTVALUE() { return "DefaultValue"; }
56 const sal_Char
* getPROPERTY_REFERENCEDTABLE() { return "ReferencedTable"; }
57 const sal_Char
* getPROPERTY_UPDATERULE() { return "UpdateRule"; }
58 const sal_Char
* getPROPERTY_DELETERULE() { return "DeleteRule"; }
59 const sal_Char
* getPROPERTY_CATALOG() { return "Catalog"; }
60 const sal_Char
* getPROPERTY_ISUNIQUE() { return "IsUnique"; }
61 const sal_Char
* getPROPERTY_ISPRIMARYKEYINDEX() { return "IsPrimaryKeyIndex"; }
62 const sal_Char
* getPROPERTY_ISCLUSTERED() { return "IsClustered"; }
63 const sal_Char
* getPROPERTY_ISASCENDING() { return "IsAscending"; }
64 const sal_Char
* getPROPERTY_SCHEMANAME() { return "SchemaName"; }
65 const sal_Char
* getPROPERTY_CATALOGNAME() { return "CatalogName"; }
66 const sal_Char
* getPROPERTY_COMMAND() { return "Command"; }
67 const sal_Char
* getPROPERTY_CHECKOPTION() { return "CheckOption"; }
68 const sal_Char
* getPROPERTY_PASSWORD() { return "Password"; }
69 const sal_Char
* getPROPERTY_RELATEDCOLUMN() { return "RelatedColumn"; }
71 const sal_Char
* getPROPERTY_FUNCTION() { return "Function"; }
72 const sal_Char
* getPROPERTY_AGGREGATEFUNCTION() { return "AggregateFunction"; }
73 const sal_Char
* getPROPERTY_TABLENAME() { return "TableName"; }
74 const sal_Char
* getPROPERTY_REALNAME() { return "RealName"; }
75 const sal_Char
* getPROPERTY_DBASEPRECISIONCHANGED() { return "DbasePrecisionChanged"; }
76 const sal_Char
* getPROPERTY_ISCURRENCY() { return "IsCurrency"; }
77 const sal_Char
* getPROPERTY_ISBOOKMARKABLE() { return "IsBookmarkable"; }
79 const sal_Char
* getPROPERTY_FORMATKEY() { return "FormatKey"; }
80 const sal_Char
* getPROPERTY_LOCALE() { return "Locale"; }
82 const sal_Char
* getPROPERTY_AUTOINCREMENTCREATION() { return "AutoIncrementCreation"; }
83 const sal_Char
* getPROPERTY_PRIVILEGES() { return "Privileges"; }
84 const sal_Char
* getPROPERTY_ID_HAVINGCLAUSE() { return "HavingClause"; }
85 const sal_Char
* getPROPERTY_ID_ISSIGNED() { return "IsSigned"; }
86 const sal_Char
* getPROPERTY_ID_ISSEARCHABLE() { return "IsSearchable"; }
88 const sal_Char
* getPROPERTY_ID_APPLYFILTER() { return "ApplyFilter"; }
89 const sal_Char
* getPROPERTY_ID_FILTER() { return "Filter"; }
90 const sal_Char
* getPROPERTY_ID_MASTERFIELDS() { return "MasterFields"; }
91 const sal_Char
* getPROPERTY_ID_DETAILFIELDS() { return "DetailFields"; }
92 const sal_Char
* getPROPERTY_ID_FIELDTYPE() { return "FieldType"; }
93 const sal_Char
* getPROPERTY_ID_VALUE() { return "Value"; }
94 const sal_Char
* getPROPERTY_ID_ACTIVE_CONNECTION() { return "ActiveConnection"; }
95 const sal_Char
* getPROPERTY_ID_LABEL() { return "Label"; }
97 //============================================================
99 //============================================================
100 const sal_Char
* getSQLSTATE_SEQUENCE() { return "HY010"; }
101 const sal_Char
* getSTR_DELIMITER() { return "/"; }
105 OPropertyMap::~OPropertyMap()
107 ::std::map
<sal_Int32
, rtl_uString
*>::iterator aIter
= m_aPropertyMap
.begin();
108 for(;aIter
!= m_aPropertyMap
.end();++aIter
)
110 rtl_uString_release(aIter
->second
);
112 // ------------------------------------------------------------------------------
113 ::rtl::OUString
OPropertyMap::getNameByIndex(sal_Int32 _nIndex
) const
115 ::rtl::OUString sRet
;
116 ::std::map
<sal_Int32
, rtl_uString
*>::const_iterator aIter
= m_aPropertyMap
.find(_nIndex
);
117 if(aIter
== m_aPropertyMap
.end())
118 sRet
= const_cast<OPropertyMap
*>(this)->fillValue(_nIndex
);
120 sRet
= aIter
->second
;
123 // ------------------------------------------------------------------------------
124 ::rtl::OUString
OPropertyMap::fillValue(sal_Int32 _nIndex
)
126 rtl_uString
* pStr
= NULL
;
129 case PROPERTY_ID_QUERYTIMEOUT
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_QUERYTIMEOUT() ); break; }
130 case PROPERTY_ID_MAXFIELDSIZE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_MAXFIELDSIZE() ); break; }
131 case PROPERTY_ID_MAXROWS
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_MAXROWS() ); break; }
132 case PROPERTY_ID_CURSORNAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_CURSORNAME() ); break; }
133 case PROPERTY_ID_RESULTSETCONCURRENCY
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_RESULTSETCONCURRENCY() ); break; }
134 case PROPERTY_ID_RESULTSETTYPE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_RESULTSETTYPE() ); break; }
135 case PROPERTY_ID_FETCHDIRECTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_FETCHDIRECTION() ); break; }
136 case PROPERTY_ID_FETCHSIZE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_FETCHSIZE() ); break; }
137 case PROPERTY_ID_ESCAPEPROCESSING
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ESCAPEPROCESSING() ); break; }
138 case PROPERTY_ID_USEBOOKMARKS
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_USEBOOKMARKS() ); break; }
140 case PROPERTY_ID_NAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_NAME() ); break; }
141 case PROPERTY_ID_TYPE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_TYPE() ); break; }
142 case PROPERTY_ID_TYPENAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_TYPENAME() ); break; }
143 case PROPERTY_ID_PRECISION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_PRECISION() ); break; }
144 case PROPERTY_ID_SCALE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_SCALE() ); break; }
145 case PROPERTY_ID_ISNULLABLE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISNULLABLE() ); break; }
146 case PROPERTY_ID_ISAUTOINCREMENT
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISAUTOINCREMENT() ); break; }
147 case PROPERTY_ID_ISROWVERSION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISROWVERSION() ); break; }
148 case PROPERTY_ID_DESCRIPTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_DESCRIPTION() ); break; }
149 case PROPERTY_ID_DEFAULTVALUE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_DEFAULTVALUE() ); break; }
151 case PROPERTY_ID_REFERENCEDTABLE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_REFERENCEDTABLE() ); break; }
152 case PROPERTY_ID_UPDATERULE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_UPDATERULE() ); break; }
153 case PROPERTY_ID_DELETERULE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_DELETERULE() ); break; }
154 case PROPERTY_ID_CATALOG
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_CATALOG() ); break; }
155 case PROPERTY_ID_ISUNIQUE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISUNIQUE() ); break; }
156 case PROPERTY_ID_ISPRIMARYKEYINDEX
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISPRIMARYKEYINDEX() ); break; }
157 case PROPERTY_ID_ISCLUSTERED
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISCLUSTERED() ); break; }
158 case PROPERTY_ID_ISASCENDING
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISASCENDING() ); break; }
159 case PROPERTY_ID_SCHEMANAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_SCHEMANAME() ); break; }
160 case PROPERTY_ID_CATALOGNAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_CATALOGNAME() ); break; }
162 case PROPERTY_ID_COMMAND
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_COMMAND() ); break; }
163 case PROPERTY_ID_CHECKOPTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_CHECKOPTION() ); break; }
164 case PROPERTY_ID_PASSWORD
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_PASSWORD() ); break; }
165 case PROPERTY_ID_RELATEDCOLUMN
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_RELATEDCOLUMN() ); break; }
167 case PROPERTY_ID_FUNCTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_FUNCTION() ); break; }
168 case PROPERTY_ID_AGGREGATEFUNCTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_AGGREGATEFUNCTION() ); break; }
169 case PROPERTY_ID_TABLENAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_TABLENAME() ); break; }
170 case PROPERTY_ID_REALNAME
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_REALNAME() ); break; }
171 case PROPERTY_ID_DBASEPRECISIONCHANGED
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_DBASEPRECISIONCHANGED()); break; }
172 case PROPERTY_ID_ISCURRENCY
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISCURRENCY() ); break; }
173 case PROPERTY_ID_ISBOOKMARKABLE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ISBOOKMARKABLE() ); break; }
174 case PROPERTY_ID_HY010
: { rtl_uString_newFromAscii(&pStr
,getSQLSTATE_SEQUENCE() ); break; }
175 case PROPERTY_ID_DELIMITER
: { rtl_uString_newFromAscii(&pStr
,getSTR_DELIMITER() ); break; }
176 case PROPERTY_ID_FORMATKEY
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_FORMATKEY() ); break; }
177 case PROPERTY_ID_LOCALE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_LOCALE() ); break; }
178 case PROPERTY_ID_AUTOINCREMENTCREATION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_AUTOINCREMENTCREATION()); break; }
179 case PROPERTY_ID_PRIVILEGES
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_PRIVILEGES() ); break; }
180 case PROPERTY_ID_HAVINGCLAUSE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_HAVINGCLAUSE() ); break; }
181 case PROPERTY_ID_ISSIGNED
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_ISSIGNED() ); break; }
182 case PROPERTY_ID_ISSEARCHABLE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_ISSEARCHABLE() ); break; }
183 case PROPERTY_ID_LABEL
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_LABEL() ); break; }
184 case PROPERTY_ID_APPLYFILTER
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_APPLYFILTER() ); break; }
185 case PROPERTY_ID_FILTER
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_FILTER() ); break; }
186 case PROPERTY_ID_MASTERFIELDS
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_MASTERFIELDS() ); break; }
187 case PROPERTY_ID_DETAILFIELDS
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_DETAILFIELDS() ); break; }
188 case PROPERTY_ID_FIELDTYPE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_FIELDTYPE() ); break; }
189 case PROPERTY_ID_VALUE
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_VALUE() ); break; }
190 case PROPERTY_ID_ACTIVE_CONNECTION
: { rtl_uString_newFromAscii(&pStr
,getPROPERTY_ID_ACTIVE_CONNECTION() ); break; }
192 m_aPropertyMap
[_nIndex
] = pStr
;
198 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */