DataAccessReply

Since: BlackBerry 10.0.0

#include <bb/data/DataAccessReply>

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

The reply from an asynchronous data access operation.

Returns the results for AsyncDataAccess and SqlConnection. See SqlConnection for a complete example including the processing of the reply data.

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


Overview

Public Functions Index

DataAccessReply ()
DataAccessReply (const DataAccessReply &other)
~DataAccessReply ()
QStringerrorMessage () const
DataAccessErrorType::TypeerrorType () const
boolhasError () const
intid () const
DataAccessReply &operator= (const DataAccessReply &other)
QVariantresult () const
voidsetError (DataAccessErrorType::Type errorType, const QString &errorMessage)
voidsetId (int id)
voidsetResult (const QVariant &result)

Public Functions

DataAccessReply ()

Constructs an empty DataAccessReply object.

Since:

BlackBerry 10.0.0

DataAccessReply (

Copy constructor.

Parameters
other

The DataAccessReply object to copy.

Since:

BlackBerry 10.0.0

~DataAccessReply ()

Destructor.

Since:

BlackBerry 10.0.0

QString errorMessage ()

Returns the detailed error message for the error that's associated with this reply.

Return:

The detailed error message or empty string if no error.

Since:

BlackBerry 10.0.0

DataAccessErrorType::Type errorType ()

Returns the error type for the error that's associated with this reply.

The error type indicates what kind of error occurred. An example of an error type is DataAccessErrorType::SourceNotFound, which indicates that the source database, URL, or file was not found.

Return:

The error type, or DataAccessErrorType::None if this reply doesn't include an error.

Since:

BlackBerry 10.0.0

bool hasError ()

Indicates whether the database operation that's associated with this reply ended with an error.

Return:

true if an error occurred, false otherwise.

Since:

BlackBerry 10.0.0

int id ()

Returns the ID of this reply data.

This ID can be used in reply handling code to identify the execution request that matches this reply data.

Return:

The ID that was specified with the execute request.

Since:

BlackBerry 10.0.0

DataAccessReply & operator= (

Assignment constructor.

Parameters
other

The DataAccessReply object to assign from.

Return:

The constructed DataAccessReply instance.

Since:

BlackBerry 10.0.0

QVariant result ()

Returns the result of the data access operation.

This result will typically be a set of row data for load operations or a row count for save operations. If there are errors, then no result is expected.

Return:

The result for data access operation or empty QVariant of errors.

Since:

BlackBerry 10.0.0

void setError (

Sets the error type and detailed error message for this reply.

Parameters
errorType

The new error type.

errorMessage

The new detailed error message.

Since:

BlackBerry 10.0.0

void setId (
  • intid)

Sets the ID for this reply.

Parameters
id

The new ID.

Since:

BlackBerry 10.0.0

void setResult (

Sets the result for this reply.

Parameters
result

The new result.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus