DataItem

Since: BlackBerry 10.2.0

#include <bb/cascades/datamanager/DataItem>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesdatamanager

This class represents a single item of data in a result set.

This is a Qt value object which supports implicit data sharing.


Overview

Inheritance

bb::cascades::datamanager::DataItem
bb::cascades::datamanager::HeaderDataItem

Public Functions Index

DataItem (const QString &keyId, const DataRevision &revision, const QVariant &payload)
DataItem ()
DataItem (const DataItem &other)
virtual ~DataItem ()
QStringkeyId () const
DataItem &operator= (const DataItem &other)
QVariantpayload () const
DataRevisionrevision () const
voidsetKeyId (const QString &keyId)
voidsetPayload (const QVariant &payload)
voidsetRevision (const DataRevision &revision)
virtual QStringtoString () const

Public Functions

DataItem (

Constructs a DataItem given an ID, revision, and payload.

Parameters
keyId

The ID for this item.

revision

The revision for this item.

payload

The data payload for this item.

Since:

BlackBerry 10.2.0

DataItem ()

Constructs a DataItem.

Since:

BlackBerry 10.2.0

DataItem (

Copy constructor.

This function constructs a DataItem containing exactly the same values as the provided DataItem.

Parameters
other

The DataItem object to copy. This follows the rules of implicit sharing.

Since:

BlackBerry 10.2.0

virtual~DataItem ()

Destructor.

Since:

BlackBerry 10.2.0

QString keyId ()

Get the ID for this item.

This value must uniquely identify this item in the data source across data updates.

Return:

The ID for this item.

Since:

BlackBerry 10.2.0

DataItem & operator= (

Assignment operator.

This function assigns values from the given DataItem to the returned DataItem.

Parameters
other

The DataItem object to assign from. This follows the rules of implicit sharing.

Return:

The revised DataItem instance.

Since:

BlackBerry 10.2.0

QVariant payload ()

Get the data payload for this item.

Return:

The data payload for this item.

Since:

BlackBerry 10.2.0

DataRevision revision ()

Get the revision value for this item.

This value must uniquely identify a discrete state of this item in the data source, including the states of all properties of the item.

Return:

The revision for this item.

Since:

BlackBerry 10.2.0

void setKeyId (

Set the ID for this item.

This value must uniquely identify this item in the data source across data updates.

Parameters
keyId

The ID for this item.

Since:

BlackBerry 10.2.0

void setPayload (

Set the data payload for this item.

Parameters
payload

The data payload for this item.

Since:

BlackBerry 10.2.0

void setRevision (

Set the revision value for this item.

This value must uniquely identify a discrete state of this item in the data source, including the states of all properties of the item.

Parameters
revision

The revision for this item.

Since:

BlackBerry 10.2.0

virtualQString toString ()

Convert this data item to a string representation.

Return:

The string representation.

Since:

BlackBerry 10.2.0

Last modified: 2014-09-29



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus