ParseObject class
The ParseObject is a local representation of data that can be saved and retrieved from the Parse cloud.
The basic workflow for creating new data is to construct a new ParseObject, use set to fill it with data, and then use saveInBackground to persist to the cloud.
The basic workflow for accessing existing data is to use a ParseQuery to specify which existing data to retrieve.
- Implementers
Constructors
- ParseObject(String className, { String objectId, dynamic json })
- Creates a new ParseObject based upon a class name. If the class name is a special type (e.g. for ParseUser), then the appropriate type of ParseObject is returned.
Properties
- className → String
-
final
- createdAt → DateTime
-
This reports time as the server sees it, so that if you create a ParseObject, then wait a
while, and then call saveInBackground, the creation time will be the time of the first
saveInBackground call rather than the time the object was created locally.
read-only
- objectId → String
-
Accessor to the object id. An object id is assigned as soon as an object is saved to the
server. The combination of a className and an objectId uniquely identifies an object in your
application.
read-only
-
selectedKeys
→ List<
String> -
read-only
- updatedAt → DateTime
-
This reports time as the server sees it, so that if you make changes to a ParseObject, then
wait a while, and then call saveInBackground, the updated time will be the time of the
saveInBackground call rather than the time the object was changed locally.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
deleteEventually(
) → Future< void> - Deletes this object from the server at some unspecified time in the future, even if Parse is currently inaccessible. Use this when you may not have a solid network connection, and don't need to know when the delete completes. If there is some problem with the object such that it can't be deleted, the request will be silently discarded. Delete requests made with this method will be stored locally in an on-disk cache until they can be transmitted to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Delete instructions saved this way will persist even after the app is closed, in which case they will be sent the next time the app is opened. If more than 10MB of commands are waiting to be sent, subsequent calls to deleteEventually or saveEventually will cause old instructions to be silently discarded until the connection can be re-established, and the queued objects can be saved.
-
deleteInBackground(
) → Future< void> - Deletes this object on the server in a background thread.
-
fetchInBackground(
) → Future< ParseObject> - Fetches this object with the data from the server in a background thread. [...]
-
get(
String key) → dynamic - Access a value. In most cases it is more convenient to use a helper function such as getString or getInteger. [...]
-
getBoolean(
String key) → bool -
Access a
bool
value. [...] -
getDateTime(
String key) → DateTime -
Access a
DateTime
value. [...] -
getDouble(
String key) → double -
Access a
double
value. [...] -
getInteger(
String key) → int -
Access an
int
value. [...] -
getList(
String key) → List -
Access a
List
value. [...] -
getMap(
String key) → Map< String, dynamic> -
Access a
Map
value. [...] -
getNumber(
String key) → num -
Access a
num
value. [...] -
getParseFile(
String key) → ParseFile - Access a ParseFile value. [...]
-
getParseGeoPoint(
String key) → ParseGeoPoint - Access a ParseGeoPoint value. [...]
-
getParseObject(
String key) → ParseObject - Access a ParseObject value. [...]
-
getString(
String key) → String -
Access a
String
value. [...] -
saveEventually(
) → Future< ParseObject> - Saves this object to the server in a background thread. [...]
-
saveInBackground(
) → Future< ParseObject> - Saves this object to the server in a background thread. [...]
-
set(
String key, dynamic value) → void -
Add a key-value pair to this object. It is recommended to name keys in
camelCaseLikeThis
. -
toJson(
{bool withData: true }) → dynamic - Converts this ParseObject into Map
-
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Constants
- keyClassName → const String
-
"className"
- keyComplete → const String
-
"__complete"
- keyCreatedAt → const String
-
"createdAt"
- keyIsDeletingEventually → const String
-
"__isDeletingEventually"
- keyIsDeletingEventuallyOld → const String
-
"isDeletingEventually"
- keyObjectId → const String
-
"objectId"
- keyOperations → const String
-
"__operations"
- keySelectedKeys → const String
-
"__selectedKeys"
- keyUpdatedAt → const String
-
"updatedAt"