| java.lang.Object | |
| ↳ | com.neomades.contact.ContactResult |
Represents object return by ContactResultListener listener when
operations of ContactManager or ContactDatabase are launched.
This object contains all informations form the operation as :
getData() (it may be a
Contact object, a vector of Contact or null, depending on the
operation type).getResultType()
(for example for addContact(ContactResultListener)
method the result type of the ContactResultListener will be
TYPE_ADD).getMessage().isSuccess() and
isCancelled().| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | TYPE_ADD | addContact(ContactResultListener),
addContact(Contact, ContactResultListener) or
save(Contact, ContactResultListener) operation type
|
|||||||||
| int | TYPE_DELETE | delete(Contact, ContactResultListener) operation type
|
|||||||||
| int | TYPE_EDIT | editContact(Contact, ContactResultListener) or
save(Contact, ContactResultListener) operation type
|
|||||||||
| int | TYPE_GET_ALL | getAllContacts(ContactResultListener) operation type
|
|||||||||
| int | TYPE_PICK_SINGLE | pickSingleContact(ContactResultListener) operation
type
|
|||||||||
| int | TYPE_SHOW | showContact(Contact, ContactResultListener) operation
type
|
|||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Object |
getData()
Returns operation's associated data.
| ||||||||||
| String |
getMessage()
Returns the associated message.
| ||||||||||
| int |
getResultType()
Returns the associated result type.
| ||||||||||
| boolean |
isCancelled()
Returns true if the operation has been cancelled by the user, false if the
operation is a success or has failed.
| ||||||||||
| boolean |
isSuccess()
Returns true if the operation is a success, false if there is an error or has
been cancelled.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
addContact(ContactResultListener),
addContact(Contact, ContactResultListener) or
save(Contact, ContactResultListener) operation type
delete(Contact, ContactResultListener) operation type
getAllContacts(ContactResultListener) operation type
pickSingleContact(ContactResultListener) operation
type
showContact(Contact, ContactResultListener) operation
type
Returns operation's associated data.
If getResultType()'s return is TYPE_SHOW, it returns
null.
Otherwise it returns a single Contact object.
Object (a Contact or a Vector). If the
user doesn't select any contact, it returns null.
Returns the associated message.
If isSuccess() returns true or getResultType()
returns TYPE_SHOW, the message is "SUCCESS".
If isCancelled() returns true, the message is
"CANCELLED".
Otherwise, returns the error message details.
Returns the associated result type.
TYPE_ADD, TYPE_PICK_SINGLE, TYPE_EDIT or
TYPE_SHOW.
Returns true if the operation has been cancelled by the user, false if the operation is a success or has failed.
ContactManager's or ContactDatabase's
operation is cancelled by the user.
Returns true if the operation is a success, false if there is an error or has
been cancelled.
Note: If getResultType() returns TYPE_SHOW, the
method returns always true.
ContactManager's or ContactDatabase's
operation is a success.