DataAccessReply
#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.
BlackBerry 10.0.0
Public Functions Index
| DataAccessReply () | |
| DataAccessReply (const DataAccessReply &other) | |
| DataAccessReply & | operator= (const DataAccessReply &other) |
| ~DataAccessReply () | |
| bool | hasError () const |
| DataAccessErrorType::Type | errorType () const |
| QString | errorMessage () const |
| QVariant | result () const |
| int | id () const |
| void | setId (int id) |
| void | setError (DataAccessErrorType::Type errorType, const QString &errorMessage) |
| void | setResult (const QVariant &result) |
Public Functions
DataAccessReply &
Assignment constructor.
| Parameters | |
|---|---|
| other |
The DataAccessReply object to assign from. |
The constructed DataAccessReply instance.
BlackBerry 10.0.0
Destructor.
BlackBerry 10.0.0
bool
Indicates whether the database operation that's associated with this reply ended with an error.
true if an error occurred, false otherwise.
BlackBerry 10.0.0
DataAccessErrorType::Type
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.
The error type, or DataAccessErrorType::None if this reply doesn't include an error.
BlackBerry 10.0.0
QString
Returns the detailed error message for the error that's associated with this reply.
The detailed error message or empty string if no error.
BlackBerry 10.0.0
QVariant
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.
The result for data access operation or empty QVariant of errors.
BlackBerry 10.0.0
int
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.
The ID that was specified with the execute request.
BlackBerry 10.0.0
void
Sets the ID for this reply.
| Parameters | |
|---|---|
| id |
The new ID. |
BlackBerry 10.0.0
void
Sets the error type and detailed error message for this reply.
| Parameters | |
|---|---|
| errorType |
The new error type. |
| errorMessage |
The new detailed error message. |
BlackBerry 10.0.0
void
Sets the result for this reply.
| Parameters | |
|---|---|
| result |
The new result. |
BlackBerry 10.0.0