38#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
39#include <com/sun/star/sdbc/SQLException.hpp>
40#include <com/sun/star/sdbc/XRow.hpp>
55using com::sun::star::uno::Any;
56using com::sun::star::uno::UNO_QUERY;
60using com::sun::star::sdbc::XRow;
61using com::sun::star::sdbc::XResultSet;
62using com::sun::star::sdbc::XDatabaseMetaData;
63using com::sun::star::sdbc::SQLException;
69 const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
70 const css::uno::Reference< css::sdbc::XConnection > & origin,
76 :
Container( refMutex, origin, pSettings,
"KEY_COLUMN" ),
77 m_schemaName(
std::move( schemaName )),
79 m_columnNames( columnNames ),
80 m_foreignColumnNames( foreignColumnNames )
93 osl::MutexGuard guard(
m_xMutex->GetMutex() );
107 sal_Int32 columnIndex = 0;
113 for( keyindex = 0 ; keyindex <
m_columnNames.getLength() ; keyindex ++ )
128 pKeyColumn->setPropertyValue_NoBroadcast_public(
140 catch ( css::sdbc::SQLException & e )
143 throw css::lang::WrappedTargetRuntimeException( e.Message,
152 const css::uno::Reference< css::beans::XPropertySet >& )
154 throw css::sdbc::SQLException(
155 "KeyColumns::appendByDescriptor not implemented yet",
156 *
this, OUString(), 1,
Any() );
170 throw css::sdbc::SQLException(
171 "KeyColumns::dropByIndex not implemented yet",
172 *
this, OUString(), 1,
Any() );
210 const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
211 const css::uno::Reference< css::sdbc::XConnection > & origin,
213 const OUString &schemaName,
219 refMutex, origin, pSettings, schemaName,
tableName, columnNames, foreignColumnNames );
220 pKeyColumns->refresh();
227 const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex,
228 const css::uno::Reference< css::sdbc::XConnection > & origin,
230 :
Container( refMutex, origin, pSettings,
"KEY_COLUMN" )
ConnectionSettings * m_pSettings
void fire(const EventBroadcastHelper &helper)
css::uno::Reference< css::sdbc::XConnection > m_origin
::rtl::Reference< comphelper::RefCountedMutex > m_xMutex
String2IntMap m_name2index
std::vector< css::uno::Any > m_values
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
KeyColumnDescriptors(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &origin, ConnectionSettings *pSettings)
virtual void SAL_CALL refresh() override
virtual ~KeyColumns() override
static css::uno::Reference< css::container::XNameAccess > create(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &origin, ConnectionSettings *pSettings, const OUString &schemaName, const OUString &tableName, const css::uno::Sequence< OUString > &keyColumns, const css::uno::Sequence< OUString > &foreignColumnNames)
virtual void SAL_CALL appendByDescriptor(const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
KeyColumns(const ::rtl::Reference< comphelper::RefCountedMutex > &refMutex, const css::uno::Reference< css::sdbc::XConnection > &origin, ConnectionSettings *pSettings, OUString schemaName, OUString tableName, const css::uno::Sequence< OUString > &keyColumns, const css::uno::Sequence< OUString > &foreignColumnNames)
virtual void SAL_CALL dropByIndex(sal_Int32 index) override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createDataDescriptor() override
css::uno::Sequence< OUString > m_columnNames
css::uno::Sequence< OUString > m_foreignColumnNames
#define SAL_INFO(area, stream)
class SAL_NO_VTABLE XPropertySet
Any SAL_CALL getCaughtException()
std::unordered_map< OUString, sal_Int32 > String2IntMap
OUString columnMetaData2SDBCX(ReflectionBase *pBase, const css::uno::Reference< css::sdbc::XRow > &xRow)
std::map< OUString, rtl::Reference< Entity > > map