LibreOffice Module ucbhelper (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ucbhelper::PropertyValueSet Class Referencefinal

This class implements the interface XRow. More...

#include <propertyvalueset.hxx>

Inheritance diagram for ucbhelper::PropertyValueSet:
[legend]
Collaboration diagram for ucbhelper::PropertyValueSet:
[legend]

Public Member Functions

 PropertyValueSet (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~PropertyValueSet () override
 
virtual sal_Bool SAL_CALL wasNull () override
 
virtual OUString SAL_CALL getString (sal_Int32 columnIndex) override
 
virtual sal_Bool SAL_CALL getBoolean (sal_Int32 columnIndex) override
 
virtual sal_Int8 SAL_CALL getByte (sal_Int32 columnIndex) override
 
virtual sal_Int16 SAL_CALL getShort (sal_Int32 columnIndex) override
 
virtual sal_Int32 SAL_CALL getInt (sal_Int32 columnIndex) override
 
virtual sal_Int64 SAL_CALL getLong (sal_Int32 columnIndex) override
 
virtual float SAL_CALL getFloat (sal_Int32 columnIndex) override
 
virtual double SAL_CALL getDouble (sal_Int32 columnIndex) override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes (sal_Int32 columnIndex) override
 
virtual css::util::Date SAL_CALL getDate (sal_Int32 columnIndex) override
 
virtual css::util::Time SAL_CALL getTime (sal_Int32 columnIndex) override
 
virtual css::util::DateTime SAL_CALL getTimestamp (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream (sal_Int32 columnIndex) override
 
virtual css::uno::Any SAL_CALL getObject (sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
 
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob (sal_Int32 columnIndex) override
 
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray (sal_Int32 columnIndex) override
 
virtual sal_Int32 SAL_CALL findColumn (const OUString &columnName) override
 
void appendString (const OUString &rPropName, const OUString &rValue)
 
void appendString (const css::beans::Property &rProp, const OUString &rValue)
 
void appendBoolean (const OUString &rPropName, bool bValue)
 
void appendBoolean (const css::beans::Property &rProp, bool bValue)
 
void appendLong (const OUString &rPropName, sal_Int64 nValue)
 
void appendLong (const css::beans::Property &rProp, sal_Int64 nValue)
 
void appendTimestamp (const OUString &rPropName, const css::util::DateTime &rValue)
 
void appendTimestamp (const css::beans::Property &rProp, const css::util::DateTime &rValue)
 
void appendObject (const OUString &rPropName, const css::uno::Any &rValue)
 
void appendObject (const css::beans::Property &rProp, const css::uno::Any &rValue)
 
void appendVoid (const OUString &rPropName)
 
void appendVoid (const css::beans::Property &rProp)
 
void appendPropertySet (const css::uno::Reference< css::beans::XPropertySet > &rSet)
 This method tries to append all property values contained in a property set to the value set. More...
 
bool appendPropertySetValue (const css::uno::Reference< css::beans::XPropertySet > &rSet, const css::beans::Property &rProperty)
 This method tries to append a single property value contained in a property set to the value set. More...
 

Private Member Functions

UCBHELPER_DLLPRIVATE const css::uno::Reference< css::script::XTypeConverter > & getTypeConverter ()
 
template<class T , T ucbhelper_impl::PropertyValue::* _member_name_>
getValue (PropsSet nTypeName, sal_Int32 columnIndex)
 
template<class T , T ucbhelper_impl::PropertyValue::* _member_name_>
void appendValue (const OUString &rPropName, PropsSet nTypeName, const T &rValue)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
 
std::mutex m_aMutex
 
std::unique_ptr< PropertyValuesm_pValues
 
bool m_bWasNull
 
bool m_bTriedToGetTypeConverter
 

Detailed Description

This class implements the interface XRow.

After construction of a valueset the user can append properties ( incl. its values ) to the set. This class is useful when implementing the command "getPropertyValues", because the values to return can easily appended to a valueset object. That object can directly be returned by the implementation of the command.

Definition at line 57 of file propertyvalueset.hxx.

Constructor & Destructor Documentation

◆ PropertyValueSet()

ucbhelper::PropertyValueSet::PropertyValueSet ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)

Definition at line 129 of file propertyvalueset.cxx.

References m_pValues, and m_xContext.

◆ ~PropertyValueSet()

ucbhelper::PropertyValueSet::~PropertyValueSet ( )
overridevirtual

Definition at line 141 of file propertyvalueset.cxx.

Member Function Documentation

◆ appendBoolean() [1/2]

void ucbhelper::PropertyValueSet::appendBoolean ( const css::beans::Property &  rProp,
bool  bValue 
)
inline

Definition at line 148 of file propertyvalueset.hxx.

◆ appendBoolean() [2/2]

void ucbhelper::PropertyValueSet::appendBoolean ( const OUString &  rPropName,
bool  bValue 
)

Definition at line 561 of file propertyvalueset.cxx.

References Boolean.

◆ appendLong() [1/2]

void ucbhelper::PropertyValueSet::appendLong ( const css::beans::Property &  rProp,
sal_Int64  nValue 
)
inline

Definition at line 154 of file propertyvalueset.hxx.

References nValue.

◆ appendLong() [2/2]

void ucbhelper::PropertyValueSet::appendLong ( const OUString &  rPropName,
sal_Int64  nValue 
)

Definition at line 568 of file propertyvalueset.cxx.

References Long, and nValue.

◆ appendObject() [1/2]

void ucbhelper::PropertyValueSet::appendObject ( const css::beans::Property &  rProp,
const css::uno::Any &  rValue 
)
inline

Definition at line 166 of file propertyvalueset.hxx.

◆ appendObject() [2/2]

void ucbhelper::PropertyValueSet::appendObject ( const OUString &  rPropName,
const css::uno::Any &  rValue 
)

◆ appendPropertySet()

void ucbhelper::PropertyValueSet::appendPropertySet ( const css::uno::Reference< css::beans::XPropertySet > &  rSet)

This method tries to append all property values contained in a property set to the value set.

@param  rSet is a property set containing the property values.

Definition at line 595 of file propertyvalueset.cxx.

References Any, appendObject(), and Property.

◆ appendPropertySetValue()

bool ucbhelper::PropertyValueSet::appendPropertySetValue ( const css::uno::Reference< css::beans::XPropertySet > &  rSet,
const css::beans::Property &  rProperty 
)

This method tries to append a single property value contained in a property set to the value set.

@param  rSet is a property set containing the property values.
@param  rProperty is the property for that the value shall be obtained
    from the given property set.
@return False, if the property value cannot be obtained from the
    given property pet. True, otherwise.

Definition at line 651 of file propertyvalueset.cxx.

References Any, and appendObject().

◆ appendString() [1/2]

void ucbhelper::PropertyValueSet::appendString ( const css::beans::Property &  rProp,
const OUString &  rValue 
)
inline

Definition at line 142 of file propertyvalueset.hxx.

◆ appendString() [2/2]

void ucbhelper::PropertyValueSet::appendString ( const OUString &  rPropName,
const OUString &  rValue 
)

Definition at line 554 of file propertyvalueset.cxx.

References String.

◆ appendTimestamp() [1/2]

void ucbhelper::PropertyValueSet::appendTimestamp ( const css::beans::Property &  rProp,
const css::util::DateTime &  rValue 
)
inline

Definition at line 160 of file propertyvalueset.hxx.

◆ appendTimestamp() [2/2]

void ucbhelper::PropertyValueSet::appendTimestamp ( const OUString &  rPropName,
const css::util::DateTime &  rValue 
)

◆ appendValue()

template<class T , T ucbhelper_impl::PropertyValue::* _member_name_>
void ucbhelper::PropertyValueSet::appendValue ( const OUString &  rPropName,
PropsSet  nTypeName,
const T &  rValue 
)
private

◆ appendVoid() [1/2]

void ucbhelper::PropertyValueSet::appendVoid ( const css::beans::Property &  rProp)
inline

Definition at line 172 of file propertyvalueset.hxx.

◆ appendVoid() [2/2]

void ucbhelper::PropertyValueSet::appendVoid ( const OUString &  rPropName)

Definition at line 589 of file propertyvalueset.cxx.

References Any, and NONE.

◆ findColumn()

sal_Int32 SAL_CALL ucbhelper::PropertyValueSet::findColumn ( const OUString &  columnName)
overridevirtual

Definition at line 502 of file propertyvalueset.cxx.

References columnName, m_aMutex, m_pValues, n, and nCount.

◆ getArray()

Reference< XArray > SAL_CALL ucbhelper::PropertyValueSet::getArray ( sal_Int32  columnIndex)
overridevirtual

Definition at line 492 of file propertyvalueset.cxx.

References Array, and ucbhelper_impl::PropertyValue::xArray.

◆ getBinaryStream()

Reference< XInputStream > SAL_CALL ucbhelper::PropertyValueSet::getBinaryStream ( sal_Int32  columnIndex)
overridevirtual

◆ getBlob()

Reference< XBlob > SAL_CALL ucbhelper::PropertyValueSet::getBlob ( sal_Int32  columnIndex)
overridevirtual

Definition at line 478 of file propertyvalueset.cxx.

References Blob, and ucbhelper_impl::PropertyValue::xBlob.

◆ getBoolean()

sal_Bool SAL_CALL ucbhelper::PropertyValueSet::getBoolean ( sal_Int32  columnIndex)
overridevirtual

Definition at line 248 of file propertyvalueset.cxx.

References Boolean.

◆ getByte()

sal_Int8 SAL_CALL ucbhelper::PropertyValueSet::getByte ( sal_Int32  columnIndex)
overridevirtual

Definition at line 255 of file propertyvalueset.cxx.

References Byte.

◆ getBytes()

Sequence< sal_Int8 > SAL_CALL ucbhelper::PropertyValueSet::getBytes ( sal_Int32  columnIndex)
overridevirtual

Definition at line 298 of file propertyvalueset.cxx.

References ucbhelper_impl::PropertyValue::aBytes, and Bytes.

◆ getCharacterStream()

Reference< XInputStream > SAL_CALL ucbhelper::PropertyValueSet::getCharacterStream ( sal_Int32  columnIndex)
overridevirtual

◆ getClob()

Reference< XClob > SAL_CALL ucbhelper::PropertyValueSet::getClob ( sal_Int32  columnIndex)
overridevirtual

Definition at line 485 of file propertyvalueset.cxx.

References Clob, and ucbhelper_impl::PropertyValue::xClob.

◆ getDate()

Date SAL_CALL ucbhelper::PropertyValueSet::getDate ( sal_Int32  columnIndex)
overridevirtual

Definition at line 305 of file propertyvalueset.cxx.

References Date.

◆ getDouble()

double SAL_CALL ucbhelper::PropertyValueSet::getDouble ( sal_Int32  columnIndex)
overridevirtual

Definition at line 290 of file propertyvalueset.cxx.

References Double.

◆ getFloat()

float SAL_CALL ucbhelper::PropertyValueSet::getFloat ( sal_Int32  columnIndex)
overridevirtual

Definition at line 283 of file propertyvalueset.cxx.

References Float.

◆ getInt()

sal_Int32 SAL_CALL ucbhelper::PropertyValueSet::getInt ( sal_Int32  columnIndex)
overridevirtual

Definition at line 269 of file propertyvalueset.cxx.

References Int.

◆ getLong()

sal_Int64 SAL_CALL ucbhelper::PropertyValueSet::getLong ( sal_Int32  columnIndex)
overridevirtual

Definition at line 276 of file propertyvalueset.cxx.

References Long.

◆ getObject()

Any SAL_CALL ucbhelper::PropertyValueSet::getObject ( sal_Int32  columnIndex,
const css::uno::Reference< css::container::XNameAccess > &  typeMap 
)
overridevirtual

◆ getRef()

Reference< XRef > SAL_CALL ucbhelper::PropertyValueSet::getRef ( sal_Int32  columnIndex)
overridevirtual

Definition at line 471 of file propertyvalueset.cxx.

References Ref, and ucbhelper_impl::PropertyValue::xRef.

◆ getShort()

sal_Int16 SAL_CALL ucbhelper::PropertyValueSet::getShort ( sal_Int32  columnIndex)
overridevirtual

Definition at line 262 of file propertyvalueset.cxx.

References Short.

◆ getString()

OUString SAL_CALL ucbhelper::PropertyValueSet::getString ( sal_Int32  columnIndex)
overridevirtual

Definition at line 241 of file propertyvalueset.cxx.

References String.

◆ getTime()

Time SAL_CALL ucbhelper::PropertyValueSet::getTime ( sal_Int32  columnIndex)
overridevirtual

Definition at line 312 of file propertyvalueset.cxx.

References Time.

◆ getTimestamp()

DateTime SAL_CALL ucbhelper::PropertyValueSet::getTimestamp ( sal_Int32  columnIndex)
overridevirtual

Definition at line 319 of file propertyvalueset.cxx.

References Timestamp.

◆ getTypeConverter()

const Reference< XTypeConverter > & ucbhelper::PropertyValueSet::getTypeConverter ( )
private

Definition at line 522 of file propertyvalueset.cxx.

References m_aMutex, m_bTriedToGetTypeConverter, m_xContext, and m_xTypeConverter.

Referenced by getValue().

◆ getValue()

template<class T , T ucbhelper_impl::PropertyValue::* _member_name_>
T ucbhelper::PropertyValueSet::getValue ( PropsSet  nTypeName,
sal_Int32  columnIndex 
)
private

◆ wasNull()

sal_Bool SAL_CALL ucbhelper::PropertyValueSet::wasNull ( )
overridevirtual

Definition at line 231 of file propertyvalueset.cxx.

References m_bWasNull.

Member Data Documentation

◆ m_aMutex

std::mutex ucbhelper::PropertyValueSet::m_aMutex
private

Definition at line 64 of file propertyvalueset.hxx.

Referenced by appendValue(), findColumn(), getObject(), getTypeConverter(), and getValue().

◆ m_bTriedToGetTypeConverter

bool ucbhelper::PropertyValueSet::m_bTriedToGetTypeConverter
private

Definition at line 67 of file propertyvalueset.hxx.

Referenced by getTypeConverter().

◆ m_bWasNull

bool ucbhelper::PropertyValueSet::m_bWasNull
private

Definition at line 66 of file propertyvalueset.hxx.

Referenced by getObject(), getValue(), and wasNull().

◆ m_pValues

std::unique_ptr<PropertyValues> ucbhelper::PropertyValueSet::m_pValues
private

Definition at line 65 of file propertyvalueset.hxx.

Referenced by appendValue(), findColumn(), getObject(), and getValue().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > ucbhelper::PropertyValueSet::m_xContext
private

Definition at line 62 of file propertyvalueset.hxx.

Referenced by getTypeConverter().

◆ m_xTypeConverter

css::uno::Reference< css::script::XTypeConverter > ucbhelper::PropertyValueSet::m_xTypeConverter
private

Definition at line 63 of file propertyvalueset.hxx.

Referenced by getTypeConverter().


The documentation for this class was generated from the following files: