LCObject class
LeanCloud Object
Object is also called Record (in traditional relational databases) or Document (in some NoSQL databases).
- Implementers
Properties
- acl ↔ LCACL?
-
Gets the ACL for this object.
getter/setter pair
- className → String?
-
The class name of the object.
no setter
- createdAt → DateTime?
-
Gets the object's createdAt attribute.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- objectId → String?
-
Gets the object's objectId.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- updatedAt → DateTime?
-
Gets the object's updatedAt attribute.
no setter
Methods
-
add(
String key, dynamic value) → void -
Atomically add
value
to the end of the arraykey
. -
addAll(
String key, Iterable values) → void -
Atomically add
values
to the end of the arraykey
. -
addAllUnique(
String key, Iterable values) → void -
Atomically add
values
to the arraykey
, only if not already present. -
addRelation(
String key, LCObject value) → void -
Adds a relation
value
tokey
. -
addUnique(
String key, dynamic value) → void -
Atomically add
value
to the arraykey
, only if not already present. -
decrement(
String key, num amount) → void -
Atomically decrements the value of the given
key
withamount
. -
delete(
) → Future - Deletes this object.
-
fetch(
{Iterable< String> ? keys, Iterable<String> ? includes}) → Future<LCObject> - Fetches the object from the cloud.
-
increment(
String key, num amount) → void -
Atomically increments the value of the given
key
withamount
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key, dynamic value) → void -
Atomically remove all
value
from the arraykey
. -
removeAll(
String key, Iterable values) → void -
Atomically remove all
values
from the arraykey
. -
removeRelation(
String key, LCObject value) → void -
Removes relation
value
tokey
. -
save(
{bool fetchWhenSave = false, LCQuery< LCObject> ? query}) → Future<LCObject> - Saves the object to the cloud.
-
toString(
) → String -
Serializes this LCObject to a JSON string.
override
-
unset(
String key) → void -
Removes the
key
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String key) → dynamic -
Gets the value of
key
. -
operator []=(
String key, dynamic value) → void -
Sets
key
tovalue
.
Static Methods
-
createWithoutData(
String className, String objectId) → LCObject -
Constructs a object in
className
ofobjectId
. -
deleteAll(
List< LCObject> objectList) → Future -
Delete all objects in
objectList
. -
fetchAll(
List< LCObject> objectList) → Future<List< LCObject> > -
Fetches all objects in
objectList
. -
parseObject(
String str) → LCObject - The inverse function of toString.
-
registerSubclass<
T extends LCObject> (String className, Function constructor) → void -
Registers a subclass named
className
withconstructor
. -
saveAll(
List< LCObject> objectList) → Future<List< LCObject> > -
Saves all objects in
objectList
.