xref: /trunk/main/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_connectivity.hxx"
30 
31 
32 #ifndef _CONNECTIVITY_DBASE_ODbaseDatabaseMetaData_HXX_
33 #include "dbase/DDatabaseMetaData.hxx"
34 #endif
35 #include <com/sun/star/sdbc/DataType.hpp>
36 #include <com/sun/star/sdbc/ResultSetType.hpp>
37 #include <com/sun/star/sdbc/ColumnValue.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
40 #include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
41 #include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
42 #include <tools/urlobj.hxx>
43 #include "FDatabaseMetaDataResultSet.hxx"
44 #include <com/sun/star/lang/XUnoTunnel.hpp>
45 #include "dbase/DIndex.hxx"
46 #include "connectivity/FValue.hxx"
47 #include <comphelper/extract.hxx>
48 #include <comphelper/types.hxx>
49 #include <ucbhelper/content.hxx>
50 #include <rtl/logfile.hxx>
51 
52 using namespace ::comphelper;
53 using namespace connectivity::dbase;
54 using namespace connectivity;
55 using namespace ::com::sun::star::uno;
56 using namespace ::com::sun::star::beans;
57 using namespace ::com::sun::star::sdbcx;
58 using namespace ::com::sun::star::sdbc;
59 using namespace ::com::sun::star::container;
60 using namespace ::com::sun::star::ucb;
61 using namespace ::com::sun::star::lang;
62 
63 ODbaseDatabaseMetaData::ODbaseDatabaseMetaData(::connectivity::file::OConnection* _pCon)    :ODatabaseMetaData(_pCon)
64 {
65     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::ODbaseDatabaseMetaData" );
66 }
67 // -------------------------------------------------------------------------
68 ODbaseDatabaseMetaData::~ODbaseDatabaseMetaData()
69 {
70 }
71 // -------------------------------------------------------------------------
72 Reference< XResultSet > ODbaseDatabaseMetaData::impl_getTypeInfo_throw(  )
73 {
74     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_getTypeInfo_throw" );
75     ::osl::MutexGuard aGuard( m_aMutex );
76 
77     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTypeInfo);
78     Reference< XResultSet > xRef = pResult;
79 
80     static ODatabaseMetaDataResultSet::ORows aRows;
81     if(aRows.empty())
82     {
83         ODatabaseMetaDataResultSet::ORow aRow;
84         aRow.reserve(18);
85 
86         aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
87         aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("VARCHAR")));
88         aRow.push_back(new ORowSetValueDecorator(DataType::VARCHAR));
89         aRow.push_back(new ORowSetValueDecorator((sal_Int32)254));
90         aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
91         aRow.push_back(ODatabaseMetaDataResultSet::getQuoteValue());
92         aRow.push_back(new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length")));
93         aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnValue::NULLABLE));
94         aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
95         aRow.push_back(new ORowSetValueDecorator((sal_Int32)ColumnSearch::FULL));
96         aRow.push_back(ODatabaseMetaDataResultSet::get1Value());
97         aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
98         aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
99         aRow.push_back(new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("C"))));
100         aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
101         aRow.push_back(ODatabaseMetaDataResultSet::get0Value());
102         aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
103         aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
104         aRow.push_back(new ORowSetValueDecorator((sal_Int32)10));
105 
106         aRows.push_back(aRow);
107 
108         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("LONGVARCHAR"));
109         aRow[2] = new ORowSetValueDecorator(DataType::LONGVARCHAR);
110         aRow[3] = new ORowSetValueDecorator((sal_Int32)2147483647);
111         aRow[6] = new ORowSetValueDecorator();
112         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("M")));
113         aRows.push_back(aRow);
114 
115         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DATE"));
116         aRow[2] = new ORowSetValueDecorator(DataType::DATE);
117         aRow[3] = new ORowSetValueDecorator((sal_Int32)10);
118         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("D")));
119         aRows.push_back(aRow);
120 
121         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("BOOLEAN"));
122         aRow[2] = new ORowSetValueDecorator(DataType::BIT);
123         aRow[3] = ODatabaseMetaDataResultSet::get1Value();
124         aRow[4] = ODatabaseMetaDataResultSet::getEmptyValue();
125         aRow[5] = ODatabaseMetaDataResultSet::getEmptyValue();
126         aRow[6] = new ORowSetValueDecorator(::rtl::OUString());
127         aRow[9] = ODatabaseMetaDataResultSet::getBasicValue();
128         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L")));
129         aRows.push_back(aRow);
130 
131         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DOUBLE"));
132         aRow[2] = new ORowSetValueDecorator(DataType::DOUBLE);
133         aRow[3] = new ORowSetValueDecorator((sal_Int32)8);
134         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("B")));
135         aRows.push_back(aRow);
136 
137         aRow[11] = new ORowSetValueDecorator(sal_True);
138         aRow[13] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("Y"));
139         aRows.push_back(aRow);
140 
141         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("TIMESTAMP"));
142         aRow[2] = new ORowSetValueDecorator(DataType::TIMESTAMP);
143         aRow[11] = new ORowSetValueDecorator(sal_False);
144         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("T")));
145         aRows.push_back(aRow);
146 
147         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INTEGER"));
148         aRow[2] = new ORowSetValueDecorator(DataType::INTEGER);
149         aRow[3] = new ORowSetValueDecorator((sal_Int32)10);
150         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("I")));
151         aRows.push_back(aRow);
152 
153         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DECIMAL"));
154         aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL);
155         aRow[3] = new ORowSetValueDecorator((sal_Int32)20);
156         aRow[6] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("length,scale"));
157         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("F")));
158         aRows.push_back(aRow);
159 
160         aRow[1] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NUMERIC"));
161         aRow[2] = new ORowSetValueDecorator(DataType::DECIMAL);
162         aRow[3] = new ORowSetValueDecorator((sal_Int32)16);
163         aRow[13] = new ORowSetValueDecorator(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("N")));
164         aRow[15] = new ORowSetValueDecorator((sal_Int32)16);
165         aRows.push_back(aRow);
166     }
167 
168     pResult->setRows(aRows);
169     return xRef;
170 }
171 // -------------------------------------------------------------------------
172 Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getColumns(
173     const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/, const ::rtl::OUString& tableNamePattern,
174         const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
175 {
176     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getColumns" );
177     ::osl::MutexGuard aGuard( m_aMutex );
178 
179 
180     Reference< XTablesSupplier > xTables = m_pConnection->createCatalog();
181     if(!xTables.is())
182         throw SQLException();
183 
184     Reference< XNameAccess> xNames = xTables->getTables();
185     if(!xNames.is())
186         throw SQLException();
187 
188     ODatabaseMetaDataResultSet::ORows aRows;
189     ODatabaseMetaDataResultSet::ORow aRow(19);
190 
191     aRow[10] = new ORowSetValueDecorator((sal_Int32)10);
192     Sequence< ::rtl::OUString> aTabNames(xNames->getElementNames());
193     const ::rtl::OUString* pTabBegin    = aTabNames.getConstArray();
194     const ::rtl::OUString* pTabEnd      = pTabBegin + aTabNames.getLength();
195     for(;pTabBegin != pTabEnd;++pTabBegin)
196     {
197         if(match(tableNamePattern,*pTabBegin,'\0'))
198         {
199             Reference< XColumnsSupplier> xTable;
200             ::cppu::extractInterface(xTable,xNames->getByName(*pTabBegin));
201             OSL_ENSURE(xTable.is(),"Table not found! Normallya exception had to be thrown here!");
202             aRow[3] = new ORowSetValueDecorator(*pTabBegin);
203 
204             Reference< XNameAccess> xColumns = xTable->getColumns();
205             if(!xColumns.is())
206                 throw SQLException();
207 
208             Sequence< ::rtl::OUString> aColNames(xColumns->getElementNames());
209 
210             const ::rtl::OUString* pBegin = aColNames.getConstArray();
211             const ::rtl::OUString* pEnd = pBegin + aColNames.getLength();
212             Reference< XPropertySet> xColumn;
213             for(sal_Int32 i=1;pBegin != pEnd;++pBegin,++i)
214             {
215                 if(match(columnNamePattern,*pBegin,'\0'))
216                 {
217                     aRow[4] = new ORowSetValueDecorator(*pBegin);
218 
219                     ::cppu::extractInterface(xColumn,xColumns->getByName(*pBegin));
220                     OSL_ENSURE(xColumn.is(),"Columns contains a column who isn't a fastpropertyset!");
221                     aRow[5] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))));
222                     aRow[6] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME))));
223                     aRow[7] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))));
224                     aRow[9] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))));
225                     aRow[11] = new ORowSetValueDecorator(getINT32(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE))));
226                     aRow[13] = new ORowSetValueDecorator(getString(xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE))));
227                     switch((sal_Int32)aRow[5]->getValue())
228                     {
229                     case DataType::CHAR:
230                     case DataType::VARCHAR:
231                         aRow[16] = new ORowSetValueDecorator((sal_Int32)254);
232                         break;
233                     case DataType::LONGVARCHAR:
234                         aRow[16] = new ORowSetValueDecorator((sal_Int32)65535);
235                         break;
236                     default:
237                         aRow[16] = new ORowSetValueDecorator((sal_Int32)0);
238                     }
239                     aRow[17] = new ORowSetValueDecorator(i);
240                     switch(sal_Int32(aRow[11]->getValue()))
241                     {
242                     case ColumnValue::NO_NULLS:
243                         aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("NO"));
244                         break;
245                     case ColumnValue::NULLABLE:
246                         aRow[18] = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("YES"));
247                         break;
248                     default:
249                         aRow[18] = new ORowSetValueDecorator(::rtl::OUString());
250                     }
251                     aRows.push_back(aRow);
252                 }
253             }
254         }
255     }
256     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eColumns);
257     Reference< XResultSet > xRef = pResult;
258     pResult->setRows(aRows);
259 
260     return xRef;
261 }
262 // -------------------------------------------------------------------------
263 Reference< XResultSet > SAL_CALL ODbaseDatabaseMetaData::getIndexInfo(
264     const Any& /*catalog*/, const ::rtl::OUString& /*schema*/, const ::rtl::OUString& table,
265         sal_Bool unique, sal_Bool /*approximate*/ ) throw(SQLException, RuntimeException)
266 {
267     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getIndexInfo" );
268     ::osl::MutexGuard aGuard( m_aMutex );
269 
270         Reference< XTablesSupplier > xTables = m_pConnection->createCatalog();
271     if(!xTables.is())
272                 throw SQLException();
273 
274     Reference< XNameAccess> xNames = xTables->getTables();
275     if(!xNames.is())
276                 throw SQLException();
277 
278     ODatabaseMetaDataResultSet::ORows aRows;
279     ODatabaseMetaDataResultSet::ORow aRow(14);
280 
281     aRow[5]     = new ORowSetValueDecorator(::rtl::OUString());
282     aRow[10]    = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("A"));
283 
284     Reference< XIndexesSupplier> xTable;
285     ::cppu::extractInterface(xTable,xNames->getByName(table));
286     aRow[3] = new ORowSetValueDecorator(table);
287     aRow[7] = new ORowSetValueDecorator((sal_Int32)3);
288 
289     Reference< XNameAccess> xIndexes = xTable->getIndexes();
290     if(!xIndexes.is())
291         throw SQLException();
292 
293     Sequence< ::rtl::OUString> aIdxNames(xIndexes->getElementNames());
294 
295     const ::rtl::OUString* pBegin = aIdxNames.getConstArray();
296     const ::rtl::OUString* pEnd = pBegin + aIdxNames.getLength();
297     Reference< XPropertySet> xIndex;
298     for(;pBegin != pEnd;++pBegin)
299     {
300         ::cppu::extractInterface(xIndex,xIndexes->getByName(*pBegin));
301         OSL_ENSURE(xIndex.is(),"Indexes contains a column who isn't a fastpropertyset!");
302 
303         if(unique && !getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))
304             continue;
305         aRow[4] = new ORowSetValueDecorator(getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))));
306         aRow[6] = new ORowSetValueDecorator(*pBegin);
307 
308         Reference< XUnoTunnel> xTunnel(xIndex,UNO_QUERY);
309         if(xTunnel.is())
310         {
311             ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelImplementationId()) );
312             if(pIndex)
313             {
314                 aRow[11] = new ORowSetValueDecorator((sal_Int32)pIndex->getHeader().db_maxkeys);
315                 aRow[12] = new ORowSetValueDecorator((sal_Int32)pIndex->getHeader().db_pagecount);
316             }
317         }
318 
319         Reference<XColumnsSupplier> xColumnsSup(xIndex,UNO_QUERY);
320         Reference< XNameAccess> xColumns = xColumnsSup->getColumns();
321         Sequence< ::rtl::OUString> aColNames(xColumns->getElementNames());
322 
323         const ::rtl::OUString* pColBegin = aColNames.getConstArray();
324         const ::rtl::OUString* pColEnd = pColBegin + aColNames.getLength();
325         Reference< XPropertySet> xColumn;
326         for(sal_Int32 j=1;pColBegin != pColEnd;++pColBegin,++j)
327         {
328             //  xColumns->getByName(*pColBegin) >>= xColumn;
329             aRow[8] = new ORowSetValueDecorator(j);
330             aRow[9] = new ORowSetValueDecorator(*pColBegin);
331             aRows.push_back(aRow);
332         }
333     }
334 
335     ::connectivity::ODatabaseMetaDataResultSet* pResult = new ::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eIndexInfo);
336     Reference< XResultSet > xRef = pResult;
337     pResult->setRows(aRows);
338     return xRef;
339 }
340 // -------------------------------------------------------------------------
341 ::rtl::OUString SAL_CALL ODbaseDatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException)
342 {
343     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getURL" );
344     ::osl::MutexGuard aGuard( m_aMutex );
345     return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:dbase:")) + m_pConnection->getURL();
346 }
347 // -------------------------------------------------------------------------
348 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxBinaryLiteralLength(  ) throw(SQLException, RuntimeException)
349 {
350     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxBinaryLiteralLength" );
351     return STRING_MAXLEN;
352 }
353 // -------------------------------------------------------------------------
354 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxCharLiteralLength(  ) throw(SQLException, RuntimeException)
355 {
356     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxCharLiteralLength" );
357     return 254;
358 }
359 // -------------------------------------------------------------------------
360 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnNameLength(  ) throw(SQLException, RuntimeException)
361 {
362     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnNameLength" );
363     return 10;
364 }
365 // -------------------------------------------------------------------------
366 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInIndex(  ) throw(SQLException, RuntimeException)
367 {
368     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnsInIndex" );
369     return 1;
370 }
371 // -------------------------------------------------------------------------
372 sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxColumnsInTable(  ) throw(SQLException, RuntimeException)
373 {
374     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::getMaxColumnsInTable" );
375     return 128;
376 }
377 // -----------------------------------------------------------------------------
378 sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn(  ) throw(SQLException, RuntimeException)
379 {
380     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::supportsAlterTableWithAddColumn" );
381     return sal_True;
382 }
383 // -------------------------------------------------------------------------
384 sal_Bool SAL_CALL ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn(  ) throw(SQLException, RuntimeException)
385 {
386     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::supportsAlterTableWithDropColumn" );
387     return sal_False;
388 }
389 // -----------------------------------------------------------------------------
390 sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly(  ) throw(SQLException, RuntimeException)
391 {
392     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::isReadOnly" );
393     ::osl::MutexGuard aGuard( m_aMutex );
394 
395     sal_Bool bReadOnly = sal_False;
396     static ::rtl::OUString sReadOnly = ::rtl::OUString::createFromAscii("IsReadOnly");
397     ::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >());
398     aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
399 
400     return bReadOnly;
401 }
402 // -----------------------------------------------------------------------------
403 sal_Bool ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw(  )
404 {
405     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_storesMixedCaseQuotedIdentifiers_throw" );
406     return sal_True;
407 }
408 // -----------------------------------------------------------------------------
409 sal_Bool ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw(  )
410 {
411     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseDatabaseMetaData::impl_supportsMixedCaseQuotedIdentifiers_throw" );
412     return sal_True;
413 }
414 // -----------------------------------------------------------------------------
415 
416 
417