INTEGRATION: CWS qiq (1.4.104); FILE MERGED
2006/06/27 14:27:31 fs 1.4.104.3: RESYNC: (1.4-1.5); FILE MERGED 2006/06/16 11:32:33 fs 1.4.104.2: during #i51143#: refactored VCollection: - createEmptyObject now named createDescriptor - cloneObject removed - appendObject now returns the newly created object (previously done via a subsequent call to cloneObject) 2006/05/23 13:27:03 fs 1.4.104.1: some refactoring of compose/quoteTableName and friends, in preparation of #i51143#
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* $RCSfile: HTables.cxx,v $
|
||||
*
|
||||
* $Revision: 1.5 $
|
||||
* $Revision: 1.6 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2006-06-20 01:30:42 $
|
||||
* last change: $Author: obo $ $Date: 2006-07-10 14:28:27 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
@@ -152,19 +152,16 @@ void OTables::disposing(void)
|
||||
OCollection::disposing();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
Reference< XPropertySet > OTables::createEmptyObject()
|
||||
Reference< XPropertySet > OTables::createDescriptor()
|
||||
{
|
||||
return new OHSQLTable(this,static_cast<OHCatalog&>(m_rParent).getConnection());
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// XAppend
|
||||
void OTables::appendObject( const Reference< XPropertySet >& descriptor )
|
||||
sdbcx::ObjectType OTables::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
|
||||
{
|
||||
::rtl::OUString aName = getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)));
|
||||
if(!aName.getLength())
|
||||
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(this));
|
||||
|
||||
createTable(descriptor);
|
||||
return createObject( _rForName );
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
// XDrop
|
||||
@@ -189,8 +186,8 @@ void OTables::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
|
||||
else
|
||||
aSql += ::rtl::OUString::createFromAscii("TABLE ");
|
||||
|
||||
::rtl::OUString sComposedName;
|
||||
::dbtools::composeTableName(m_xMetaData,sCatalog,sSchema,sTable,sComposedName,sal_True,::dbtools::eInDataManipulation);
|
||||
::rtl::OUString sComposedName(
|
||||
::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sTable, sal_True, ::dbtools::eInDataManipulation ) );
|
||||
aSql += sComposedName;
|
||||
Reference< XStatement > xStmt = xConnection->createStatement( );
|
||||
if ( xStmt.is() )
|
||||
@@ -235,7 +232,7 @@ void OTables::appendNew(const ::rtl::OUString& _rsNewTable)
|
||||
::rtl::OUString OTables::getNameForObject(const sdbcx::ObjectType& _xObject)
|
||||
{
|
||||
OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!");
|
||||
return ::dbtools::composeTableName(m_xMetaData,_xObject,sal_False,::dbtools::eInDataManipulation);
|
||||
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user