1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BTables.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_connectivity.hxx"
33 #include "adabas/BTables.hxx"
34 #include "adabas/BViews.hxx"
35 #include "adabas/BTable.hxx"
36 #include <com/sun/star/sdbc/XRow.hpp>
37 #include <com/sun/star/sdbc/XResultSet.hpp>
38 #include <com/sun/star/sdbc/ColumnValue.hpp>
39 #include <com/sun/star/sdbc/KeyRule.hpp>
40 #include <com/sun/star/sdbcx/KeyType.hpp>
41 #include "adabas/BCatalog.hxx"
42 #include "adabas/BConnection.hxx"
43 #include <comphelper/extract.hxx>
44 #include "connectivity/dbtools.hxx"
45 #include "connectivity/dbexception.hxx"
46 #include <cppuhelper/interfacecontainer.h>
47 #include <comphelper/types.hxx>
49 using namespace ::comphelper
;
50 using namespace connectivity
;
51 using namespace ::cppu
;
52 using namespace connectivity::adabas
;
53 using namespace ::com::sun::star::uno
;
54 using namespace ::com::sun::star::beans
;
55 using namespace ::com::sun::star::sdbcx
;
56 using namespace ::com::sun::star::sdbc
;
57 using namespace ::com::sun::star::container
;
58 using namespace ::com::sun::star::lang
;
59 using namespace dbtools
;
60 typedef connectivity::sdbcx::OCollection OCollection_TYPE
;
62 sdbcx::ObjectType
OTables::createObject(const ::rtl::OUString
& _rName
)
64 ::rtl::OUString aName
,aSchema
;
65 sal_Int32 nLen
= _rName
.indexOf('.');
66 aSchema
= _rName
.copy(0,nLen
);
67 aName
= _rName
.copy(nLen
+1);
69 Sequence
< ::rtl::OUString
> aTypes(1);
70 aTypes
[0] = ::rtl::OUString::createFromAscii("%");
71 // aTypes[0] = ::rtl::OUString::createFromAscii("TABLE");
72 // aTypes[1] = ::rtl::OUString::createFromAscii("SYSTEMTABLE");
74 Reference
< XResultSet
> xResult
= m_xMetaData
->getTables(Any(),aSchema
,aName
,aTypes
);
76 sdbcx::ObjectType xRet
= NULL
;
79 Reference
< XRow
> xRow(xResult
,UNO_QUERY
);
80 if(xResult
->next()) // there can be only one table with this name
82 OAdabasTable
* pRet
= new OAdabasTable(this, static_cast<OAdabasCatalog
&>(m_rParent
).getConnection(),
83 aName
,xRow
->getString(4),xRow
->getString(5),aSchema
);
86 ::comphelper::disposeComponent(xResult
);
91 // -------------------------------------------------------------------------
92 void OTables::impl_refresh( ) throw(RuntimeException
)
94 static_cast<OAdabasCatalog
&>(m_rParent
).refreshTables();
96 // -------------------------------------------------------------------------
97 void OTables::disposing(void)
100 OCollection::disposing();
102 // -------------------------------------------------------------------------
103 Reference
< XPropertySet
> OTables::createDescriptor()
105 return new OAdabasTable(this,static_cast<OAdabasCatalog
&>(m_rParent
).getConnection());
107 // -------------------------------------------------------------------------
109 sdbcx::ObjectType
OTables::appendObject( const ::rtl::OUString
& _rForName
, const Reference
< XPropertySet
>& descriptor
)
111 createTable(descriptor
);
112 return createObject( _rForName
);
114 // -------------------------------------------------------------------------
115 void OTables::setComments(const Reference
< XPropertySet
>& descriptor
) throw(SQLException
, RuntimeException
)
117 ::rtl::OUString aSql
= ::rtl::OUString::createFromAscii("CREATE TABLE ");
118 ::rtl::OUString aQuote
= static_cast<OAdabasCatalog
&>(m_rParent
).getConnection()->getMetaData()->getIdentifierQuoteString( );
119 const ::rtl::OUString
& sDot
= OAdabasCatalog::getDot();
121 OAdabasConnection
* pConnection
= static_cast<OAdabasCatalog
&>(m_rParent
).getConnection();
122 Reference
< XStatement
> xStmt
= pConnection
->createStatement( );
123 aSql
= ::rtl::OUString::createFromAscii("COMMENT ON TABLE ");
124 ::rtl::OUString sSchema
;
125 descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME
)) >>= sSchema
;
126 if(sSchema
.getLength())
127 aSql
+= ::dbtools::quoteName(aQuote
, sSchema
) + sDot
;
129 aSql
+= aQuote
+ getString(descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
130 + ::rtl::OUString::createFromAscii(" '")
131 + getString(descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION
)))
132 + ::rtl::OUString::createFromAscii("'");
133 xStmt
->execute(aSql
);
136 Reference
<XColumnsSupplier
> xColumnSup(descriptor
,UNO_QUERY
);
137 Reference
<XIndexAccess
> xColumns(xColumnSup
->getColumns(),UNO_QUERY
);
138 Reference
< XPropertySet
> xColProp
;
140 aSql
= ::rtl::OUString::createFromAscii("COMMENT ON COLUMN ");
141 if(sSchema
.getLength())
142 aSql
+= ::dbtools::quoteName(aQuote
, sSchema
) + sDot
;
143 aSql
+= aQuote
+ getString(descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
+ sDot
146 for(sal_Int32 i
=0;i
<xColumns
->getCount();++i
)
148 ::cppu::extractInterface(xColProp
,xColumns
->getByIndex(i
));
151 ::rtl::OUString aDescription
= getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION
)));
152 if(aDescription
.getLength())
154 ::rtl::OUString aCom
= aSql
+ getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
155 + ::rtl::OUString::createFromAscii(" '")
157 + ::rtl::OUString::createFromAscii("'");
158 xStmt
->execute(aSql
);
159 ::comphelper::disposeComponent(xStmt
);
163 ::comphelper::disposeComponent(xStmt
);
165 // -------------------------------------------------------------------------
167 void OTables::dropObject(sal_Int32 _nPos
,const ::rtl::OUString _sElementName
)
169 Reference
< XInterface
> xObject( getObject( _nPos
) );
170 sal_Bool bIsNew
= connectivity::sdbcx::ODescriptor::isNew( xObject
);
173 OAdabasConnection
* pConnection
= static_cast<OAdabasCatalog
&>(m_rParent
).getConnection();
174 Reference
< XStatement
> xStmt
= pConnection
->createStatement( );
176 ::rtl::OUString aName
,aSchema
;
177 sal_Int32 nLen
= _sElementName
.indexOf('.');
178 aSchema
= _sElementName
.copy(0,nLen
);
179 aName
= _sElementName
.copy(nLen
+1);
180 ::rtl::OUString aSql
= ::rtl::OUString::createFromAscii("DROP ");
181 const ::rtl::OUString
& sDot
= OAdabasCatalog::getDot();
183 Reference
<XPropertySet
> xProp(xObject
,UNO_QUERY
);
185 if((bIsView
= (xProp
.is() && ::comphelper::getString(xProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE
))) == ::rtl::OUString::createFromAscii("VIEW")))) // here we have a view
186 aSql
+= ::rtl::OUString::createFromAscii("VIEW ");
188 aSql
+= ::rtl::OUString::createFromAscii("TABLE ");
190 aSql
+= m_xMetaData
->getIdentifierQuoteString( ) + aSchema
+ m_xMetaData
->getIdentifierQuoteString( );
192 aSql
+= m_xMetaData
->getIdentifierQuoteString( ) + aName
+ m_xMetaData
->getIdentifierQuoteString( );
193 xStmt
->execute(aSql
);
194 ::comphelper::disposeComponent(xStmt
);
195 // if no exception was thrown we must delete it from the views
198 OViews
* pViews
= static_cast<OViews
*>(static_cast<OAdabasCatalog
&>(m_rParent
).getPrivateViews());
199 if(pViews
&& pViews
->hasByName(_sElementName
))
200 pViews
->dropByNameImpl(_sElementName
);
204 // -------------------------------------------------------------------------
205 void OTables::createTable( const Reference
< XPropertySet
>& descriptor
)
207 ::rtl::OUString aSql
= ::rtl::OUString::createFromAscii("CREATE TABLE ");
208 ::rtl::OUString aQuote
= static_cast<OAdabasCatalog
&>(m_rParent
).getConnection()->getMetaData()->getIdentifierQuoteString( );
209 const ::rtl::OUString
& sDot
= OAdabasCatalog::getDot();
210 ::rtl::OUString sSchema
;
212 descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME
)) >>= sSchema
;
213 if(sSchema
.getLength())
214 aSql
+= ::dbtools::quoteName(aQuote
, sSchema
) + sDot
;
216 descriptor
->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME
),makeAny(static_cast<OAdabasCatalog
&>(m_rParent
).getConnection()->getUserName().
220 aSql
+= ::dbtools::quoteName(aQuote
, getString(descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))))
221 + ::rtl::OUString::createFromAscii(" (");
224 Reference
<XColumnsSupplier
> xColumnSup(descriptor
,UNO_QUERY
);
225 Reference
<XIndexAccess
> xColumns(xColumnSup
->getColumns(),UNO_QUERY
);
226 Reference
< XPropertySet
> xColProp
;
229 sal_Int32 nCount
= xColumns
->getCount();
231 ::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider
*>(this));
233 for(sal_Int32 i
=0;i
<nCount
;++i
)
235 if(::cppu::extractInterface(xColProp
,xColumns
->getByIndex(i
)) && xColProp
.is())
238 aSql
+= aQuote
+ getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
;
240 aSql
+= ::rtl::OUString::createFromAscii(" ");
241 aSql
+= OTables::getColumnSqlType(xColProp
);
242 aSql
+= OTables::getColumnSqlNotNullDefault(xColProp
);
243 aSql
+= ::rtl::OUString::createFromAscii(",");
249 Reference
<XKeysSupplier
> xKeySup(descriptor
,UNO_QUERY
);
251 Reference
<XIndexAccess
> xKeys
= xKeySup
->getKeys();
254 sal_Bool bPKey
= sal_False
;
255 for( sal_Int32 key
=0; key
<xKeys
->getCount(); ++key
)
257 if(::cppu::extractInterface(xColProp
,xKeys
->getByIndex(key
)) && xColProp
.is())
260 sal_Int32 nKeyType
= getINT32(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE
)));
262 if(nKeyType
== KeyType::PRIMARY
)
265 throw SQLException();
268 xColumnSup
= Reference
<XColumnsSupplier
>(xColProp
,UNO_QUERY
);
269 xColumns
= Reference
<XIndexAccess
>(xColumnSup
->getColumns(),UNO_QUERY
);
270 if(!xColumns
->getCount())
271 throw SQLException();
273 aSql
+= ::rtl::OUString::createFromAscii(" PRIMARY KEY (");
274 for( sal_Int32 column
=0; column
<xColumns
->getCount(); ++column
)
276 if(::cppu::extractInterface(xColProp
,xColumns
->getByIndex(column
)) && xColProp
.is())
277 aSql
+= aQuote
+ getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
278 + ::rtl::OUString::createFromAscii(",");
281 aSql
= aSql
.replaceAt(aSql
.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
283 else if(nKeyType
== KeyType::UNIQUE
)
285 xColumnSup
= Reference
<XColumnsSupplier
>(xColProp
,UNO_QUERY
);
286 xColumns
= Reference
<XIndexAccess
>(xColumnSup
->getColumns(),UNO_QUERY
);
287 if(!xColumns
->getCount())
288 throw SQLException();
290 aSql
+= ::rtl::OUString::createFromAscii(" UNIQUE (");
291 for( sal_Int32 column
=0; column
<xColumns
->getCount(); ++column
)
293 if(::cppu::extractInterface(xColProp
,xColumns
->getByIndex(column
)) && xColProp
.is())
294 aSql
+= aQuote
+ getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
295 + ::rtl::OUString::createFromAscii(",");
298 aSql
= aSql
.replaceAt(aSql
.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
300 else if(nKeyType
== KeyType::FOREIGN
)
302 sal_Int32 nDeleteRule
= getINT32(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELETERULE
)));
304 xColumnSup
= Reference
<XColumnsSupplier
>(xColProp
,UNO_QUERY
);
305 xColumns
= Reference
<XIndexAccess
>(xColumnSup
->getColumns(),UNO_QUERY
);
306 if(!xColumns
->getCount())
307 throw SQLException();
309 aSql
+= ::rtl::OUString::createFromAscii(" FOREIGN KEY ");
310 ::rtl::OUString aName
,aSchema
,aRefTable
= getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REFERENCEDTABLE
)));
311 sal_Int32 nLen
= aRefTable
.indexOf('.');
312 aSchema
= aRefTable
.copy(0,nLen
);
313 aName
= aRefTable
.copy(nLen
+1);
315 aSql
+= aQuote
+ aSchema
+ aQuote
+ sDot
316 + aQuote
+ aName
+ aQuote
317 + ::rtl::OUString::createFromAscii(" (");
319 for ( sal_Int32 column
=0; column
<xColumns
->getCount(); ++column
)
321 if(::cppu::extractInterface(xColProp
,xColumns
->getByIndex(column
)) && xColProp
.is())
322 aSql
+= aQuote
+ getString(xColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
))) + aQuote
323 + ::rtl::OUString::createFromAscii(",");
326 aSql
= aSql
.replaceAt(aSql
.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
330 case KeyRule::CASCADE
:
331 aSql
+= ::rtl::OUString::createFromAscii(" ON DELETE CASCADE ");
333 case KeyRule::RESTRICT
:
334 aSql
+= ::rtl::OUString::createFromAscii(" ON DELETE RESTRICT ");
336 case KeyRule::SET_NULL
:
337 aSql
+= ::rtl::OUString::createFromAscii(" ON DELETE SET NULL ");
339 case KeyRule::SET_DEFAULT
:
340 aSql
+= ::rtl::OUString::createFromAscii(" ON DELETE SET DEFAULT ");
350 if(aSql
.lastIndexOf(',') == (aSql
.getLength()-1))
351 aSql
= aSql
.replaceAt(aSql
.getLength()-1,1,::rtl::OUString::createFromAscii(")"));
353 aSql
+= ::rtl::OUString::createFromAscii(")");
355 OAdabasConnection
* pConnection
= static_cast<OAdabasCatalog
&>(m_rParent
).getConnection();
356 Reference
< XStatement
> xStmt
= pConnection
->createStatement( );
357 xStmt
->execute(aSql
);
358 ::comphelper::disposeComponent(xStmt
);
360 if(getString(descriptor
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DESCRIPTION
))).getLength())
361 setComments(descriptor
);
363 // -----------------------------------------------------------------------------
364 void OTables::appendNew(const ::rtl::OUString
& _rsNewTable
)
366 insertElement(_rsNewTable
,NULL
);
368 // notify our container listeners
369 ContainerEvent
aEvent(static_cast<XContainer
*>(this), makeAny(_rsNewTable
), Any(), Any());
370 OInterfaceIteratorHelper
aListenerLoop(m_aContainerListeners
);
371 while (aListenerLoop
.hasMoreElements())
372 static_cast<XContainerListener
*>(aListenerLoop
.next())->elementInserted(aEvent
);
374 // -----------------------------------------------------------------------------
375 ::rtl::OUString
OTables::getColumnSqlType(const Reference
<XPropertySet
>& _rxColProp
)
377 ::rtl::OUString sSql
;
378 sal_Int32 nDataType
= 0;
379 _rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE
)) >>= nDataType
;
382 case DataType::VARBINARY
:
383 sSql
+= ::rtl::OUString::createFromAscii("VAR");
385 case DataType::BINARY
:
386 sSql
+= ::rtl::OUString::createFromAscii("CHAR");
390 Any aTypeName
= _rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME
));
391 if(aTypeName
.hasValue() && getString(aTypeName
).getLength())
392 sSql
+= getString(aTypeName
);
394 sSql
+= OTables::getTypeString(_rxColProp
) + ::rtl::OUString::createFromAscii(" ");
401 case DataType::VARCHAR
:
402 case DataType::FLOAT
:
404 sSql
+= ::rtl::OUString::createFromAscii("(")
405 + ::rtl::OUString::valueOf(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION
))))
406 + ::rtl::OUString::createFromAscii(")");
409 case DataType::DECIMAL
:
410 case DataType::NUMERIC
:
411 sSql
+= ::rtl::OUString::createFromAscii("(")
412 + ::rtl::OUString::valueOf(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION
))))
413 + ::rtl::OUString::createFromAscii(",")
414 + ::rtl::OUString::valueOf(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE
))))
415 + ::rtl::OUString::createFromAscii(")");
417 case DataType::BINARY
:
418 case DataType::VARBINARY
:
419 sSql
+= ::rtl::OUString::createFromAscii("(")
420 + ::rtl::OUString::valueOf(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION
))))
421 + ::rtl::OUString::createFromAscii(") BYTE");
426 // -----------------------------------------------------------------------------
427 ::rtl::OUString
OTables::getColumnSqlNotNullDefault(const Reference
<XPropertySet
>& _rxColProp
)
429 OSL_ENSURE(_rxColProp
.is(),"OTables::getColumnSqlNotNullDefault: Column is null!");
430 ::rtl::OUString sSql
;
431 ::rtl::OUString aDefault
= getString(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE
)));
432 if(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE
))) == ColumnValue::NO_NULLS
)
434 sSql
+= ::rtl::OUString::createFromAscii(" NOT NULL");
435 if(aDefault
.getLength())
436 sSql
+= ::rtl::OUString::createFromAscii(" WITH DEFAULT");
438 else if(aDefault
.getLength())
440 sSql
+=::rtl::OUString::createFromAscii(" DEFAULT '") + aDefault
;
441 sSql
+= ::rtl::OUString::createFromAscii("'");
445 // -----------------------------------------------------------------------------
446 ::rtl::OUString
OTables::getTypeString(const Reference
< XPropertySet
>& _rxColProp
)
448 ::rtl::OUString aValue
;
449 switch(getINT32(_rxColProp
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE
))))
452 aValue
= ::rtl::OUString::createFromAscii("BOOLEAN");
454 case DataType::TINYINT
:
455 aValue
= ::rtl::OUString::createFromAscii("SMALLINT");
457 case DataType::SMALLINT
:
458 aValue
= ::rtl::OUString::createFromAscii("SMALLINT");
460 case DataType::INTEGER
:
461 aValue
= ::rtl::OUString::createFromAscii("INT");
463 case DataType::FLOAT
:
464 aValue
= ::rtl::OUString::createFromAscii("FLOAT");
467 aValue
= ::rtl::OUString::createFromAscii("REAL");
469 case DataType::DOUBLE
:
470 aValue
= ::rtl::OUString::createFromAscii("DOUBLE");
472 case DataType::NUMERIC
:
473 aValue
= ::rtl::OUString::createFromAscii("DECIMAL");
475 case DataType::DECIMAL
:
476 aValue
= ::rtl::OUString::createFromAscii("DECIMAL");
479 aValue
= ::rtl::OUString::createFromAscii("CHAR");
481 case DataType::VARCHAR
:
482 aValue
= ::rtl::OUString::createFromAscii("VARCHAR");
484 case DataType::LONGVARCHAR
:
485 aValue
= ::rtl::OUString::createFromAscii("LONG VARCHAR");
488 aValue
= ::rtl::OUString::createFromAscii("DATE");
491 aValue
= ::rtl::OUString::createFromAscii("TIME");
493 case DataType::TIMESTAMP
:
494 aValue
= ::rtl::OUString::createFromAscii("TIMESTAMP");
496 case DataType::BINARY
:
497 aValue
= ::rtl::OUString::createFromAscii("CHAR () BYTE");
499 case DataType::VARBINARY
:
500 aValue
= ::rtl::OUString::createFromAscii("VARCHAR () BYTE");
502 case DataType::LONGVARBINARY
:
503 aValue
= ::rtl::OUString::createFromAscii("LONG BYTE");
508 // -----------------------------------------------------------------------------
509 ::rtl::OUString
OTables::getNameForObject(const sdbcx::ObjectType
& _xObject
)
511 OSL_ENSURE(_xObject
.is(),"OTables::getNameForObject: Object is NULL!");
512 ::rtl::OUString sName
,sTemp
;
513 _xObject
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCHEMANAME
)) >>= sName
;
514 if( sName
.getLength() )
516 const ::rtl::OUString
& sDot
= OAdabasCatalog::getDot();
520 _xObject
->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME
)) >>= sTemp
;
525 // -----------------------------------------------------------------------------