29#include <com/sun/star/beans/PropertyAttribute.hpp>
30#include <com/sun/star/sdbcx/CompareBookmark.hpp>
41using namespace css::uno;
42using namespace css::lang;
43using namespace css::beans;
44using namespace css::sdbc;
45using namespace css::sdbcx;
46using namespace css::io;
47using namespace css::util;
78 allRecords = pConnection->getAddressBook()->getMacabRecords(
m_sTableName);
81 if(allRecords ==
nullptr)
98 for (iterator = allRecords->
begin();
99 iterator != allRecords->
end();
102 if (pCondition->
eval(*iterator))
112 sal_Int32
i, j,
size, smallest;
118 for( j =
i + 1; j <
size; j++)
155 if (!aRet.hasValue())
156 aRet = MacabResultSet_BASE::queryInterface(rType);
162 MacabResultSet_BASE::acquire();
167 MacabResultSet_BASE::release();
182 return ::cppu::OPropertySetHelper::createPropertySetInfo(
getInfoHelper());
187 ::osl::MutexGuard aGuard(
m_aMutex );
191 Reference< XResultSetMetaData > xMeta =
getMetaData();
192 sal_Int32 nLen = xMeta->getColumnCount();
194 for (sal_Int32
i = 1;
i <= nLen; ++
i)
196 if (xMeta->isCaseSensitive(
i) ?
198 columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(
i)))
209 ::osl::MutexGuard aGuard(
m_aMutex );
218 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
220 if(aField !=
nullptr)
222 if(aField->
type == kABStringProperty)
236 ::osl::MutexGuard aGuard(
m_aMutex );
246 ::osl::MutexGuard aGuard(
m_aMutex );
256 ::osl::MutexGuard aGuard(
m_aMutex );
266 ::osl::MutexGuard aGuard(
m_aMutex );
275 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
277 if(aField !=
nullptr)
279 if(aField->
type == kABIntegerProperty)
281 CFNumberType numberType = CFNumberGetType(
static_cast<CFNumberRef
>(aField->
value) );
284 m_bWasNull = !CFNumberGetValue(
static_cast<CFNumberRef
>(aField->
value), numberType, &nRet);
295 ::osl::MutexGuard aGuard(
m_aMutex );
304 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
306 if(aField !=
nullptr)
308 if(aField->
type == kABIntegerProperty)
310 CFNumberType numberType = CFNumberGetType(
static_cast<CFNumberRef
>(aField->
value) );
313 m_bWasNull = !CFNumberGetValue(
static_cast<CFNumberRef
>(aField->
value), numberType, &nRet);
324 ::osl::MutexGuard aGuard(
m_aMutex );
333 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
335 if(aField !=
nullptr)
337 if(aField->
type == kABRealProperty)
339 CFNumberType numberType = CFNumberGetType(
static_cast<CFNumberRef
>(aField->
value) );
342 m_bWasNull = !CFNumberGetValue(
static_cast<CFNumberRef
>(aField->
value), numberType, &nVal);
353 ::osl::MutexGuard aGuard(
m_aMutex );
362 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
364 if(aField !=
nullptr)
366 if(aField->
type == kABRealProperty)
368 CFNumberType numberType = CFNumberGetType(
static_cast<CFNumberRef
>(aField->
value) );
371 m_bWasNull = !CFNumberGetValue(
static_cast<CFNumberRef
>(aField->
value), numberType, &nVal);
382 ::osl::MutexGuard aGuard(
m_aMutex );
387 return Sequence< sal_Int8 >();
392 ::osl::MutexGuard aGuard(
m_aMutex );
403 ::osl::MutexGuard aGuard(
m_aMutex );
408 css::util::Time nRet;
414 ::osl::MutexGuard aGuard(
m_aMutex );
423 sal_Int32 nFieldNumber =
m_xMetaData->fieldAtColumn(columnIndex);
425 if(aField !=
nullptr)
427 if(aField->
type == kABDateProperty)
441 ::osl::MutexGuard aGuard(
m_aMutex );
451 ::osl::MutexGuard aGuard(
m_aMutex );
461 ::osl::MutexGuard aGuard(
m_aMutex );
471 ::osl::MutexGuard aGuard(
m_aMutex );
481 ::osl::MutexGuard aGuard(
m_aMutex );
491 ::osl::MutexGuard aGuard(
m_aMutex );
501 ::osl::MutexGuard aGuard(
m_aMutex );
511 ::osl::MutexGuard aGuard(
m_aMutex );
517 Reference< XResultSetMetaData > xMetaData =
m_xMetaData;
523 ::osl::MutexGuard aGuard(
m_aMutex );
534 ::osl::MutexGuard aGuard(
m_aMutex );
546 ::osl::MutexGuard aGuard(
m_aMutex );
557 ::osl::MutexGuard aGuard(
m_aMutex );
569 ::osl::MutexGuard aGuard(
m_aMutex );
578 ::osl::MutexGuard aGuard(
m_aMutex );
589 ::osl::MutexGuard aGuard(
m_aMutex );
597 ::osl::MutexGuard aGuard(
m_aMutex );
610 ::osl::MutexGuard aGuard(
m_aMutex );
623 ::osl::MutexGuard aGuard(
m_aMutex );
631 ::osl::MutexGuard aGuard(
m_aMutex );
645 ::osl::MutexGuard aGuard(
m_aMutex );
653 ::osl::MutexGuard aGuard(
m_aMutex );
661 ::osl::MutexGuard aGuard(
m_aMutex );
669 ::osl::MutexGuard aGuard(
m_aMutex );
678 ::osl::MutexGuard aGuard(
m_aMutex );
686 ::osl::MutexGuard aGuard(
m_aMutex );
694 ::osl::MutexGuard aGuard(
m_aMutex );
702 ::osl::MutexGuard aGuard(
m_aMutex );
710 ::osl::MutexGuard aGuard(
m_aMutex );
725 ::osl::MutexGuard aGuard(
m_aMutex );
733 ::osl::MutexGuard aGuard(
m_aMutex );
741 ::osl::MutexGuard aGuard(
m_aMutex );
747 ::osl::MutexGuard aGuard(
m_aMutex );
753 ::osl::MutexGuard aGuard(
m_aMutex );
761 ::osl::MutexGuard aGuard(
m_aMutex );
767 ::osl::MutexGuard aGuard(
m_aMutex );
773 ::osl::MutexGuard aGuard(
m_aMutex );
780 ::osl::MutexGuard aGuard(
m_aMutex );
785 ::osl::MutexGuard aGuard(
m_aMutex );
792 ::osl::MutexGuard aGuard(
m_aMutex );
797 ::osl::MutexGuard aGuard(
m_aMutex );
803 ::osl::MutexGuard aGuard(
m_aMutex );
809 ::osl::MutexGuard aGuard(
m_aMutex );
815 ::osl::MutexGuard aGuard(
m_aMutex );
821 ::osl::MutexGuard aGuard(
m_aMutex );
827 ::osl::MutexGuard aGuard(
m_aMutex );
833 ::osl::MutexGuard aGuard(
m_aMutex );
839 ::osl::MutexGuard aGuard(
m_aMutex );
845 ::osl::MutexGuard aGuard(
m_aMutex );
851 ::osl::MutexGuard aGuard(
m_aMutex );
857 ::osl::MutexGuard aGuard(
m_aMutex );
863 ::osl::MutexGuard aGuard(
m_aMutex );
869 ::osl::MutexGuard aGuard(
m_aMutex );
876 ::osl::MutexGuard aGuard(
m_aMutex );
884 if(uidField !=
nullptr)
886 if(uidField->
type == kABStringProperty)
897 ::osl::MutexGuard aGuard(
m_aMutex );
903 for (sal_Int32 nRow = 0; nRow < nRecords; nRow++)
906 if(uidField !=
nullptr)
908 if(uidField->
type == kABStringProperty)
911 if (sUniqueIdentifier == sBookmark)
924 ::osl::MutexGuard aGuard(
m_aMutex );
945 ::osl::MutexGuard aGuard(
m_aMutex );
951 if (sFirst < sSecond)
952 return CompareBookmark::LESS;
953 if (sFirst > sSecond)
954 return CompareBookmark::GREATER;
955 return CompareBookmark::EQUAL;
965 ::osl::MutexGuard aGuard(
m_aMutex );
970 return sBookmark.hashCode();
976 ::osl::MutexGuard aGuard(
m_aMutex );
979 return Sequence< sal_Int32 >();
991 PropertyAttribute::READONLY
1009 PropertyAttribute::READONLY
1015 PropertyAttribute::READONLY
1021 PropertyAttribute::READONLY
1044 throw css::lang::IllegalArgumentException();
1077 sal_Int32 nHandle)
const
IMPLEMENT_SERVICE_INFO(MacabResultSet, "com.sun.star.sdbc.drivers.MacabResultSet", "com.sun.star.sdbc.ResultSet")
::cppu::IPropertyArrayHelper * getArrayHelper()
void disposing(std::unique_lock< std::mutex > &rGuard)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual bool isAlwaysFalse() const =0
virtual bool eval(const MacabRecord *aRecord) const =0
virtual sal_Int32 compare(const MacabRecord *record1, const MacabRecord *record2) const =0
void swap(const sal_Int32 _id1, const sal_Int32 _id2)
macabfield * getField(const sal_Int32 _recordNumber, const sal_Int32 _columnNumber) const
MacabRecord * insertRecord(MacabRecord *_newRecord, const sal_Int32 _location)
MacabRecord * getRecord(const sal_Int32 _location) const
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
void sortMacabRecords(const class MacabOrder *pOrder)
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual void SAL_CALL updateRow() override
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL isLast() override
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL isAfterLast() override
virtual sal_Bool SAL_CALL previous() override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
virtual void SAL_CALL clearWarnings() override
void someMacabRecords(const class MacabCondition *pCondition)
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual void SAL_CALL moveToInsertRow() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
void setTableName(const OUString &_sTableName)
virtual void SAL_CALL release() noexcept override
virtual sal_Int32 SAL_CALL getRow() override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
::rtl::Reference< MacabCommonStatement > m_xStatement
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
virtual void SAL_CALL beforeFirst() override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual void SAL_CALL moveToCurrentRow() override
virtual sal_Bool SAL_CALL rowDeleted() override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL disposing() override
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
MacabRecords * m_aMacabRecords
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
virtual void SAL_CALL cancelRowUpdates() override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual void SAL_CALL refreshRow() override
virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any &bookmark, sal_Int32 rows) override
virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any &firstItem, const css::uno::Any &secondItem) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL afterLast() override
virtual sal_Bool SAL_CALL isFirst() override
virtual sal_Bool SAL_CALL wasNull() override
virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any &bookmark) override
::rtl::Reference< MacabResultSetMetaData > m_xMetaData
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual sal_Bool SAL_CALL hasOrderedBookmarks() override
virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any &bookmark) override
virtual void SAL_CALL insertRow() override
virtual void SAL_CALL close() override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual sal_Bool SAL_CALL isBeforeFirst() override
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual sal_Bool SAL_CALL next() override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL getWarnings() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
virtual ~MacabResultSet() override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual void SAL_CALL cancel() override
virtual css::uno::Any SAL_CALL getBookmark() override
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual sal_Bool SAL_CALL rowUpdated() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL last() override
virtual void SAL_CALL acquire() noexcept override
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Bool SAL_CALL rowInserted() override
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual sal_Bool SAL_CALL first() override
virtual void SAL_CALL deleteRow() override
mutable::osl::Mutex m_aMutex
css::uno::Type const & get()
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
OUString getString(const Any &_rAny)
::cppu::WeakComponentImplHelper< css::sdbc::XResultSet, css::sdbc::XRow, css::sdbc::XResultSetMetaDataSupplier, css::util::XCancellable, css::sdbc::XWarningsSupplier, css::sdbc::XResultSetUpdate, css::sdbc::XRowUpdate, css::sdbcx::XRowLocate, css::sdbcx::XDeleteRows, css::sdbc::XCloseable, css::sdbc::XColumnLocate, css::lang::XServiceInfo > MacabResultSet_BASE
css::util::DateTime CFDateToDateTime(const CFDateRef _cfDate)
OUString CFStringToOUString(const CFStringRef sOrig)
void checkDisposed(bool _bThrow)
#define PROPERTY_ID_ISBOOKMARKABLE
#define PROPERTY_ID_RESULTSETTYPE
#define PROPERTY_ID_CURSORNAME
#define PROPERTY_ID_RESULTSETCONCURRENCY
#define PROPERTY_ID_FETCHSIZE
#define PROPERTY_ID_FETCHDIRECTION