WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

Property

A Property object represents a property of an object.

Inheritance hierarchy:
None
A Property object has three attributes:
Property name
The name of the property
Property value
The value of the property
Property type
The data type of the value of the property

If an application sets the property value attribute of a Property object, the property value replaces any previous value the attribute had.

This class is a helper class.

Constructors

Summary of constructors:
Constructor Description
Property Copy the Property object.
Property Create a Property object with a property name, a property value, and a property type.
Property Create a Property object with no property value or property type.

Property – Copy Property

Interface:
Property(const Property & property);

Property & duplicate(const Property & property);

Copy the Property object.

Parameters:
property (input)
The Property object.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Property – Create Property

Interface:
Property(const String & propertyName,
         const xmsBOOL propertyValue);

Property(const String & propertyName,
         const xmsSBYTE *propertyValue,
         xmsINT length);

Property(const String & propertyName,
         const xmsSBYTE propertyValue);

Property(const String & propertyName,
         const xmsCHAR16 propertyValue);

Property(const String & propertyName,
         const xmsDOUBLE propertyValue);

Property(const String & propertyName,
         const xmsFLOAT propertyValue);

Property(const String & propertyName,
         const xmsINT propertyValue);

Property(const String & propertyName,
         const xmsLONG propertyValue);

Property(const String & propertyName,
         const xmsSHORT propertyValue);

Property(const String & propertyName,
         const String & propertyValue);

Create a Property object with a property name, a property value, and a property type.

Parameters:
propertyName (input)
A String object encapsulating the property name.
propertyValue (input)
The property value. The property type is determined by the data type of the property value.
length (input)
The length of the property value in bytes. This parameter is applicable only if the property value is an array of bytes.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Property – Create Property (with no property value or property type)

Interface:
Property(const String & propertyName);

Property & create(const String & propertyName);

Create a Property object with no property value or property type.

Parameters:
propertyName (input)
A String object encapsulating the property name.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Methods

Summary of methods:
Method Description
~Property Delete the Property object.
getBoolean Get the boolean property value from the Property object.
getByte Get the byte property value from the Property object.
getByteArray Get the byte array property value from the Property object.
getChar Get the 2-byte character property value from the Property object.
getDouble Get the double precision floating point property value from the Property object.
getFloat Get the floating point property value from the Property object.
getHandle Get the handle that a C application would use to access the Property object.
getInt Get the integer property value from the Property object.
getLong Get the long integer property value from the Property object.
getShort Get the short integer property value from the Property object.
getString Get the string property value from the Property object.
getTypeId Get the property type from the Property object.
isNull Determine whether the Property object is a null object.
isTypeId Check whether the Property object has the specified property type.
name Get the property name from the Property object.
setBoolean Set a boolean property value in the Property object and set the property type.
setByte Set a byte property value in the Property object and set the property type.
setByteArray Set a byte array property value in the Property object and set the property type.
setChar Set a 2-byte character property value in the Property object and set the property type.
setDouble Set a double precision floating point property value in the Property object and set the property type.
setFloat Set a floating point property value in the Property object and set the property type.
setInt Set an integer property value in the Property object and set the property type.
setLong Set a long integer property value in the Property object and set the property type.
setShort Set a short integer property value in the Property object and set the property type.
setString Set a string property value in the Property object and set the property type.

~Property – Delete Property

Interface:
virtual ~Property();

Delete the Property object.

If an application tries to delete a Property object that is already deleted, the call is ignored.

Parameters:
None
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getBoolean – Get Boolean Property Value

Interface:
xmsBOOL getBoolean() const;

Get the boolean property value from the Property object.

Parameters:
None
Returns:
The boolean property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getByte – Get Byte Property Value

Interface:
xmsSBYTE getByte() const;

Get the byte property value from the Property object.

Parameters:
None
Returns:
The byte property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getByteArray – Get Byte Array Property Value

Interface:
xmsINT getByteArray(xmsSBYTE *propertyValue,
                    const xmsINT length,
                    xmsINT *actualLength) const;

Get the byte array property value from the Property object.

For more information about how to use this method, see C++ methods that return a byte array.

Parameters:
propertyValue (output)
The buffer to contain the property value, which is an array of bytes.
length (input)
The length of the buffer in bytes. If you specify XMSC_QUERY_SIZE instead, the property value is not returned, but its length is returned in the actualLength parameter.
actualLength (output)
The length of the property value in bytes. If you specify a null pointer on input, the length is not returned.
Returns:
The length of the property value in bytes.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getChar – Get Character Property Value

Interface:
xmsCHAR16 getChar() const;

Get the 2-byte character property value from the Property object.

Parameters:
None
Returns:
The 2-byte character property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getDouble – Get Double Precision Floating Point Property Value

Interface:
xmsDOUBLE getDouble() const;

Get the double precision floating point property value from the Property object.

Parameters:
None
Returns:
The double precision floating point property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getFloat – Get Floating Point Property Value

Interface:
xmsFLOAT getFloat() const;

Get the floating point property value from the Property object.

Parameters:
None
Returns:
The floating point property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getHandle – Get Handle

Interface:
xmsHProperty getHandle() const;

Get the handle that a C application would use to access the Property object.

Parameters:
None
Returns:
The handle for the Property object.
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getInt – Get Integer Property Value

Interface:
xmsINT getInt() const;

Get the integer property value from the Property object.

Parameters:
None
Returns:
The integer property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getLong – Get Long Integer Property Value

Interface:
xmsLONG getLong() const;

Get the long integer property value from the Property object.

Parameters:
None
Returns:
The long integer property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getShort – Get Short Integer Property Value

Interface:
xmsSHORT getShort() const;

Get the short integer property value from the Property object.

Parameters:
None
Returns:
The short integer property value.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getString – Get String Property Value

Interface:
String getString() const;

Get the string property value from the Property object.

Parameters:
None
Returns:
A String object encapsulating the string property value. If data conversion is required, this is the string after conversion.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

getTypeId – Get Property Type

Interface:
xmsPROPERTY_TYPE getTypeId() const;

Get the property type from the Property object.

Parameters:
None
Returns:
The property type, which is one of the following values:
  • XMS_PROPERTY_TYPE_UNKNOWN
  • XMS_PROPERTY_TYPE_BOOL
  • XMS_PROPERTY_TYPE_BYTE
  • XMS_PROPERTY_TYPE_BYTEARRAY
  • XMS_PROPERTY_TYPE_CHAR
  • XMS_PROPERTY_TYPE_STRING
  • XMS_PROPERTY_TYPE_SHORT
  • XMS_PROPERTY_TYPE_INT
  • XMS_PROPERTY_TYPE_LONG
  • XMS_PROPERTY_TYPE_FLOAT
  • XMS_PROPERTY_TYPE_DOUBLE
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

isNull – Check Whether Null

Interface:
xmsBOOL isNull() const;

Determine whether the Property object is a null object.

Parameters:
None
Returns:
  • xmsTRUE, if the Property object is a null object.
  • xmsFALSE, if the Property object is not a null object.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

isTypeId – Check Property Type

Interface:
xmsBOOL isTypeId(const xmsPROPERTY_TYPE propertyType) const;

Check whether the Property object has the specified property type.

Parameters:
propertyType (input)
The property type, which must be one of the following values:
  • XMS_PROPERTY_TYPE_UNKNOWN
  • XMS_PROPERTY_TYPE_BOOL
  • XMS_PROPERTY_TYPE_BYTE
  • XMS_PROPERTY_TYPE_BYTEARRAY
  • XMS_PROPERTY_TYPE_CHAR
  • XMS_PROPERTY_TYPE_STRING
  • XMS_PROPERTY_TYPE_SHORT
  • XMS_PROPERTY_TYPE_INT
  • XMS_PROPERTY_TYPE_LONG
  • XMS_PROPERTY_TYPE_FLOAT
  • XMS_PROPERTY_TYPE_DOUBLE
Returns:
  • xmsTRUE, if the Property object has the specified property type.
  • xmsFALSE, if the Property object does not have the specified property type.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

name – Get Property Name

Interface:
String name() const;

Get the property name from the Property object.

Parameters:
None
Returns:
A String object encapsulating the property name.
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setBoolean – Set Boolean Property Value

Interface:
xmsVOID setBoolean(const xmsBOOL propertyValue);

Set a boolean property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The boolean property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setByte – Set Byte Property Value

Interface:
xmsVOID setByte(const xmsSBYTE propertyValue);

Set a byte property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The byte property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setByteArray – Set Byte Array Property Value

Interface:
xmsVOID setByteArray(const xmsBYTE *propertyValue,
                     const xmsINT length);

Set a byte array property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The property value, which is an array of bytes.
length (input)
The length of the property value in bytes.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setChar – Set Character Property Value

Interface:
xmsVOID setChar(const xmsCHAR16 propertyValue);

Set a 2-byte character property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The 2-byte character property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setDouble – Set Double Precision Floating Point Property Value

Interface:
xmsVOID setDouble(const xmsDOUBLE propertyValue);

Set a double precision floating point property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The double precision floating point property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setFloat – Set Floating Point Property Value

Interface:
xmsVOID setFloat(const xmsFLOAT propertyValue);

Set a floating point property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The floating point property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setInt – Set Integer Property Value

Interface:
xmsVOID setInt(const xmsINT propertyValue);

Set an integer property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The integer property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setLong – Set Long Integer Property Value

Interface:
xmsVOID setLong(const xmsLONG propertyValue);

Set a long integer property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The long integer property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setShort – Set Short Integer Property Value

Interface:
xmsVOID setShort(const xmsSHORT propertyValue);

Set a short integer property value in the Property object and set the property type.

Parameters:
propertyValue (input)
The short integer property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

setString – Set String Property Value

Interface:
xmsVOID setString(const String & propertyValue);

Set a string property value in the Property object and set the property type.

Parameters:
propertyValue (input)
A String object encapsulating the string property value.
Returns:
Void
Thread context:
Any
Exceptions:
  • XMS_X_GENERAL_EXCEPTION

Reference topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.