AVSubclassing Protocol Reference
Declared in | AVSubclassing.h |
---|
Overview
If a subclass of AVObject conforms to AVSubclassing and calls registerSubclass, LeanCloud will be able to use that class as the native class for a LeanCloud object.
Classes conforming to this protocol should subclass AVObject and include AVObject+Subclass.h in their implementation file. This ensures the methods in the Subclass category of AVObject are exposed in its subclasses only.
+ parseClassName
The name of the class as seen in the REST API.
+ (NSString *)parseClassName
Discussion
The name of the class as seen in the REST API.
Declared In
AVSubclassing.h
+ objectWithoutDataWithObjectId:
Creates a reference to an existing AVObject for use in creating associations between AVObjects. Calling isDataAvailable on this object will return NO until fetchIfNeeded or refresh has been called. No network request will be made. A default implementation is provided by AVObject which should always be sufficient.
+ (instancetype)objectWithoutDataWithObjectId:(NSString *)objectId
Parameters
objectId |
The object id for the referenced object. |
---|
Return Value
A AVObject without data.
Discussion
Creates a reference to an existing AVObject for use in creating associations between AVObjects. Calling isDataAvailable on this object will return NO until fetchIfNeeded or refresh has been called. No network request will be made. A default implementation is provided by AVObject which should always be sufficient.
Declared In
AVSubclassing.h
+ query
Create a query which returns objects of this type. A default implementation is provided by AVObject which should always be sufficient.
+ (AVQuery *)query
Discussion
Create a query which returns objects of this type. A default implementation is provided by AVObject which should always be sufficient.
Declared In
AVSubclassing.h
+ registerSubclass
Lets LeanCloud know this class should be used to instantiate all objects with class type parseClassName. This method must be called before [AVOSCloud setApplicationId:clientKey:]
+ (void)registerSubclass
Discussion
Lets LeanCloud know this class should be used to instantiate all objects with class type parseClassName. This method must be called before [AVOSCloud setApplicationId:clientKey:]
Declared In
AVSubclassing.h