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
 
osl::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

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

Definition at line 138 of file propertyvalueset.cxx.

References m_pValues, and m_xContext.

ucbhelper::PropertyValueSet::~PropertyValueSet ( )
overridevirtual

Definition at line 150 of file propertyvalueset.cxx.

Member Function Documentation

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

Definition at line 570 of file propertyvalueset.cxx.

References Boolean.

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

Definition at line 148 of file propertyvalueset.hxx.

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

Definition at line 577 of file propertyvalueset.cxx.

References Long.

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

Definition at line 154 of file propertyvalueset.hxx.

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

Definition at line 166 of file propertyvalueset.hxx.

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.

Parameters
rSetis a property set containing the property values.

Definition at line 604 of file propertyvalueset.cxx.

References Any, appendObject(), and Property.

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.

Parameters
rSetis a property set containing the property values.
rPropertyis the property for that the value shall be obtained from the given property set.
Returns
False, if the property value cannot be obtained from the given property pet. True, otherwise.

Definition at line 660 of file propertyvalueset.cxx.

References Any, and appendObject().

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

Definition at line 563 of file propertyvalueset.cxx.

References String.

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

Definition at line 142 of file propertyvalueset.hxx.

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

Definition at line 160 of file propertyvalueset.hxx.

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

Definition at line 598 of file propertyvalueset.cxx.

References Any, and NONE.

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

Definition at line 172 of file propertyvalueset.hxx.

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

Definition at line 511 of file propertyvalueset.cxx.

References m_aMutex, m_pValues, n, and nCount.

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

Definition at line 501 of file propertyvalueset.cxx.

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

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

Definition at line 487 of file propertyvalueset.cxx.

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

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

Definition at line 257 of file propertyvalueset.cxx.

References Boolean.

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

Definition at line 264 of file propertyvalueset.cxx.

References Byte.

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

Definition at line 307 of file propertyvalueset.cxx.

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

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

Definition at line 494 of file propertyvalueset.cxx.

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

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

Definition at line 314 of file propertyvalueset.cxx.

References Date.

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

Definition at line 299 of file propertyvalueset.cxx.

References Double.

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

Definition at line 292 of file propertyvalueset.cxx.

References Float.

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

Definition at line 278 of file propertyvalueset.cxx.

References Int.

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

Definition at line 285 of file propertyvalueset.cxx.

References Long.

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

Definition at line 480 of file propertyvalueset.cxx.

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

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

Definition at line 271 of file propertyvalueset.cxx.

References Short.

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

Definition at line 250 of file propertyvalueset.cxx.

References String.

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

Definition at line 321 of file propertyvalueset.cxx.

References Time.

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

Definition at line 328 of file propertyvalueset.cxx.

References Timestamp.

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

Definition at line 531 of file propertyvalueset.cxx.

References m_aMutex, m_bTriedToGetTypeConverter, m_xContext, and m_xTypeConverter.

Referenced by getValue().

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

Definition at line 240 of file propertyvalueset.cxx.

References m_bWasNull.

Member Data Documentation

osl::Mutex ucbhelper::PropertyValueSet::m_aMutex
private

Definition at line 64 of file propertyvalueset.hxx.

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

bool ucbhelper::PropertyValueSet::m_bTriedToGetTypeConverter
private

Definition at line 67 of file propertyvalueset.hxx.

Referenced by getTypeConverter().

bool ucbhelper::PropertyValueSet::m_bWasNull
private

Definition at line 66 of file propertyvalueset.hxx.

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

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

Definition at line 65 of file propertyvalueset.hxx.

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

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

Definition at line 62 of file propertyvalueset.hxx.

Referenced by getTypeConverter().

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: