23#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
24#include <com/sun/star/sdbc/XRow.hpp>
25#include <com/sun/star/sdbc/XColumnLocate.hpp>
26#include <com/sun/star/sdbc/XCloseable.hpp>
27#include <com/sun/star/sdbcx/XRowLocate.hpp>
28#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
29#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
30#include <com/sun/star/lang/XServiceInfo.hpp>
36#include <com/sun/star/sdbc/XRowSet.hpp>
37#include <com/sun/star/util/XNumberFormatTypes.hpp>
38#include <com/sun/star/container/XNameAccess.hpp>
45 namespace sdb {
struct RowChangeEvent; }
46 namespace lang {
struct Locale; }
51 class OEmptyCollection;
55 css::sdbc::XResultSetMetaDataSupplier,
56 css::sdbc::XWarningsSupplier,
57 css::sdbc::XColumnLocate,
58 css::sdbcx::XColumnsSupplier,
59 css::lang::XServiceInfo,
92 css::uno::Reference< css::uno::XComponentContext>
m_aContext;
107 const css::uno::Reference<css::uno::XComponentContext>& _rContext,
109 ::osl::Mutex* _pMutex
116 void firePropertyChange(sal_Int32 _nPos,const ::connectivity::ORowSetValue& _rNewValue);
138 void fireProperty( sal_Int32 _nProperty,
bool _bNew,
bool _bOld );
142 virtual void SAL_CALL
getFastPropertyValue(css::uno::Any& rValue,sal_Int32 nHandle)
const override;
178 void setCurrentRow(
bool _bMoved,
bool _bDoNotify,
const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard);
198 bool SAL_CALL
move( std::function<
bool(
ORowSetBase *)>
const & _aCheckFunctor,
199 std::function<
bool(
ORowSetCache *)>
const & _aMovementFunctor);
236 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
243 virtual ::cppu::IPropertyArrayHelper& SAL_CALL
getInfoHelper()
override;
246 virtual css::uno::Sequence< css::uno::Type > SAL_CALL
getTypes()
override;
249 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
252 virtual css::uno::Any SAL_CALL
getWarnings( )
override;
256 virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL
getMetaData( )
override;
259 virtual sal_Int32 SAL_CALL
findColumn(
const OUString& columnName )
override;
262 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
getColumns( )
override;
266 virtual OUString SAL_CALL
getString( sal_Int32 columnIndex )
override;
269 virtual sal_Int16 SAL_CALL
getShort( sal_Int32 columnIndex )
override;
270 virtual sal_Int32 SAL_CALL
getInt( sal_Int32 columnIndex )
override;
271 virtual sal_Int64 SAL_CALL
getLong( sal_Int32 columnIndex )
override;
272 virtual float SAL_CALL
getFloat( sal_Int32 columnIndex )
override;
273 virtual double SAL_CALL
getDouble( sal_Int32 columnIndex )
override;
274 virtual css::uno::Sequence< sal_Int8 > SAL_CALL
getBytes( sal_Int32 columnIndex )
override;
275 virtual css::util::Date SAL_CALL
getDate( sal_Int32 columnIndex )
override;
276 virtual css::util::Time SAL_CALL
getTime( sal_Int32 columnIndex )
override;
277 virtual css::util::DateTime SAL_CALL
getTimestamp( sal_Int32 columnIndex )
override;
278 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
getBinaryStream( sal_Int32 columnIndex )
override;
279 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL
getCharacterStream( sal_Int32 columnIndex )
override;
280 virtual css::uno::Any SAL_CALL
getObject( sal_Int32 columnIndex,
const css::uno::Reference< css::container::XNameAccess >& typeMap )
override;
281 virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL
getRef( sal_Int32 columnIndex )
override;
282 virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL
getBlob( sal_Int32 columnIndex )
override;
283 virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL
getClob( sal_Int32 columnIndex )
override;
284 virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL
getArray( sal_Int32 columnIndex )
override;
287 virtual css::uno::Any SAL_CALL
getBookmark( )
override;
290 virtual sal_Int32 SAL_CALL
compareBookmarks(
const css::uno::Any&
first,
const css::uno::Any& second )
override;
292 virtual sal_Int32 SAL_CALL
hashBookmark(
const css::uno::Any& bookmark )
override;
301 virtual void SAL_CALL
afterLast( )
override;
304 virtual sal_Int32 SAL_CALL
getRow( )
override;
312 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
getStatement( )
override;
315 virtual void SAL_CALL
execute( )
override = 0;
316 virtual void SAL_CALL
addRowSetListener(
const css::uno::Reference< css::sdbc::XRowSetListener >& listener )
override = 0;
317 virtual void SAL_CALL
removeRowSetListener(
const css::uno::Reference< css::sdbc::XRowSetListener >& listener )
override = 0;
320 void onDeleteRow(
const css::uno::Any& _rBookmark );
322 void onDeletedRow(
const css::uno::Any& _rBookmark, sal_Int32 _nPos );
341 using ::comphelper::OPropertyStateContainer::getFastPropertyValue;
std::vector< VectorVal > Vector
void doCancelModification(const GrantNotifierAccess &)
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
ORowSetCacheIterator m_aCurrentRow
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL getWarnings() override
sal_Int32 m_nLastColumnIndex
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
const connectivity::ORowSetValue & getValue(sal_Int32 columnIndex)
virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any &first, const css::uno::Any &second) override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
TORowSetOldRowHelperRef m_aOldRow
virtual sal_Bool SAL_CALL rowDeleted() override
std::unique_ptr< ORowSetDataColumns > m_pColumns
std::unique_ptr< OEmptyCollection > m_pEmptyCollection
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
bool isModified(const GrantNotifierAccess &)
::connectivity::SQLError m_aErrors
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
::cppu::OBroadcastHelper & m_rBHelper
virtual void notifyAllListenersCursorMoved(::osl::ResettableMutexGuard &_rGuard)
virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any &bookmark) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
bool isModification(const GrantNotifierAccess &)
virtual void fireRowcount()
virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any &bookmark) override
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
void checkPositioningAllowed()
virtual css::uno::Any SAL_CALL getBookmark() override
virtual bool isPropertyChangeNotificationEnabled() const
TDataColumns m_aDataColumns
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL rowUpdated() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
void fireProperty(sal_Int32 _nProperty, bool _bNew, bool _bOld)
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL last() override
virtual bool isModified()=0
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
void onDeleteRow(const css::uno::Any &_rBookmark)
virtual sal_Bool SAL_CALL next() override
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
bool isNew(const GrantNotifierAccess &)
virtual void SAL_CALL clearWarnings() override
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual void SAL_CALL beforeFirst() override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
connectivity::ORowSetValue m_aEmptyValue
virtual sal_Bool SAL_CALL isAfterLast() override
bool isOnFirst()
same meaning as isFirst.
::cppu::OWeakObject * m_pMySelf
virtual void doCancelModification()=0
css::uno::Reference< css::uno::XComponentContext > m_aContext
virtual sal_Bool SAL_CALL first() override
virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any &bookmark, sal_Int32 rows) override
css::uno::Reference< css::util::XNumberFormatTypes > m_xNumberFormatTypes
ORowSetRow getOldRow(bool _bWasNew)
::osl::Mutex m_aColumnsMutex
sal_Int32 impl_getRowCount() const
returns the current row count
css::uno::Any m_aBookmark
sal_Int32 m_nDeletedPosition
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual bool isModification()=0
const connectivity::ORowSetValue & impl_getValue(sal_Int32 columnIndex)
virtual void SAL_CALL removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override=0
virtual sal_Bool SAL_CALL isBeforeFirst() override
virtual bool notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard &_rGuard)
void firePropertyChange(sal_Int32 _nPos, const ::connectivity::ORowSetValue &_rNewValue, const GrantNotifierAccess &)
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL isFirst() override
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
void onDeletedRow(const css::uno::Any &_rBookmark, sal_Int32 _nPos)
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
virtual void SAL_CALL afterLast() override
virtual void SAL_CALL execute() override=0
void setCurrentRow(bool _bMoved, bool _bDoNotify, const ORowSetRow &_rOldValues, ::osl::ResettableMutexGuard &_rGuard)
virtual sal_Bool SAL_CALL rowInserted() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
virtual sal_Bool SAL_CALL hasOrderedBookmarks() override
virtual void SAL_CALL addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override=0
void positionCache(CursorMoveDirection _ePrepareForDirection)
positions the cache in preparation of a cursor move
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
bool isOnLast()
same meaning as isLast.
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
ORowSetBase(const css::uno::Reference< css::uno::XComponentContext > &_rContext, ::cppu::OBroadcastHelper &_rBHelper, ::osl::Mutex *_pMutex)
virtual void SAL_CALL disposing()
void firePropertyChange(const ORowSetRow &_rOldRow)
virtual sal_Bool SAL_CALL wasNull() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual sal_Bool SAL_CALL isLast() override
virtual sal_Int32 SAL_CALL getRow() override
void fireProperty(sal_Int32 _nProperty, bool _bNew, bool _bOld, const GrantNotifierAccess &)
std::shared_ptr< ORowSetCache > m_pCache
bool SAL_CALL move(std::function< bool(ORowSetBase *)> const &_aCheckFunctor, std::function< bool(ORowSetCache *)> const &_aMovementFunctor)
move the cache the position defined by the member functor
sal_Int32 m_nResultSetType
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
std::vector< ORowSetDataColumn * > TDataColumns
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
sal_Int32 m_nResultSetConcurrency
virtual ~ORowSetBase() override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL previous() override
virtual void SAL_CALL refreshRow() override
eases the handling of the doCancelModification and notifyCancelInsert methods
ORowSetNotifier(ORowSetBase *m_pRowSet)
constructs the object, and cancels the insertion
void firePropertyChange()
notifies value change events and notifies IsModified
void fire()
notifies the insertion
ORowSetValueVector::Vector aRow
std::vector< sal_Int32 > aChangedColumns
std::vector< sal_Int32 > & getChangedColumns()
use this one to store the index of the changed column values
::cppu::ImplHelper9< css::sdbcx::XRowLocate, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::sdbc::XWarningsSupplier, css::sdbc::XColumnLocate, css::sdbcx::XColumnsSupplier, css::lang::XServiceInfo, css::sdbc::XRowSet, css::sdbc::XCloseable > ORowSetBase_BASE