NetmeraContent Class Reference
| Inherits from | NSObject |
| Declared in | NetmeraContent.h NetmeraContent.m |
Overview
The NetmeraContent object is used to run CRUD operations over the data.
After creating object use add method to fill data and call create method to add data into cloud.
\
Tasks
-
objectNameName of the content
property -
pathPath to the content
property -
createDateCreate date of the NetmeraContent object
property -
updateDateUpdate date of the NetmeraContent object
property -
– initWithObjectName:Constructor that takes content name as parameter.
-
– create:Adds data to the cloud.
-
– update:Updates data
-
– delete:Deletes data from the cloud.
-
– add:object:Adds key,value pairs into the object. If the object contains key, the old value is replaced.
-
– setOwner:Set the owner of this content. If it is generic content then do not call setOwner: method.
-
– addBool:object:Adds key,value pairs into the object. If the object contains key, the old value is replaced.
-
– createInBackgroundWithTarget:selector:Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
-
– createInBackgroundWithBlock:Adds data to the cloud in the background thread and executes the given callback block. Since it runs on the background thread it does not block program.It is recommended over create method.
-
– createInBackgroundAdds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
-
– updateInBackgroundWithTarget:selector:Updates data in the background thread. Since it runs on the background thread it does not block program.It is recommended over update method.
-
– updateInBackgroundWithBlock:Updates data in the background thread and executes. Since it runs on the background thread it does not block program.It is recommended over update method.
-
– deleteInBackgroundWithTarget:selector:Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
-
– deleteInBackgroundWithBlock:Deletes data from the cloud in the background thread and executes.Since it runs on the background thread it does not block program.It is recommended over delete method.
-
– deleteInBackgroundDeletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
-
– get:Gets the NSObject with the specified key.
-
– getString:Gets the NSString object with the specified key.
-
– getInt:Gets the int value with the specified key.
-
– getLong:Gets the long value with the specified key.
-
– getBool:Gets the boolean value with the specified key.
-
– getDouble:Gets the double value with the specified key.
-
– getDictionary:Gets the NSDictionary object with the specified key.
-
– getDictionaryArray:Gets the NSArray object with the specified key.
-
– getNetmeraGeoLocation:Gets the NetmeraGeoLocation object with the specified key.
-
– getNetmeraMedia:Gets the NetmeraMedia object with the specified key.
-
– getNetmeraUser:Gets the NetmeraUser object with the specified key.
Properties
createDate
Create date of the NetmeraContent object
@property (readonly) NSString *createDateDiscussion
Create date of the NetmeraContent object
Declared In
NetmeraContent.hobjectName
Name of the content
@property (readonly) NSString *objectNameDiscussion
Name of the content
Declared In
NetmeraContent.hInstance Methods
add:object:
Adds key,value pairs into the object. If the object contains key, the old value is replaced.
- (void)add:(NSString *)key object:(NSObject *)valueParameters
- key
key to identify specified value.
- value
value associates with the specified key. This value can be one of these classes instance;
NSString
NSNumber
NSDate
NSData
NSDictionary – members must be one of the above instance
NSArray – members must be one of the above instance
Discussion
Adds key,value pairs into the object. If the object contains key, the old value is replaced.
Warning: Raises an exception if value is not an object that NSDictionary accepts.
Declared In
NetmeraContent.haddBool:object:
Adds key,value pairs into the object. If the object contains key, the old value is replaced.
- (void)addBool:(NSString *)key object:(BOOL)valueParameters
- key
key to identify specified value
- value
BOOL value associates with the specified key
Discussion
Adds key,value pairs into the object. If the object contains key, the old value is replaced.
Warning: Raises an exception if value is not an object that NSDictionary accepts.
Declared In
NetmeraContent.hcreate:
Adds data to the cloud.
- (BOOL)create:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Adds data to the cloud.
Declared In
NetmeraContent.hcreateInBackground
Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
- (void)createInBackgroundDiscussion
Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
Declared In
NetmeraContent.hcreateInBackgroundWithBlock:
Adds data to the cloud in the background thread and executes the given callback block. Since it runs on the background thread it does not block program.It is recommended over create method.
- (void)createInBackgroundWithBlock:(void ( ^ ) ( NetmeraContent *content , NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NetmeraContent content, NSError error)
Discussion
Adds data to the cloud in the background thread and executes the given callback block. Since it runs on the background thread it does not block program.It is recommended over create method.
Declared In
NetmeraContent.hcreateInBackgroundWithTarget:selector:
Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
- (void)createInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackCreateWithContent:(NetmeraContent )content error:(NSError )error. error will be nil on success and set if there was an error. content will be the new creates NetmeraContent object.
Discussion
Adds data to the cloud in the background thread. Since it runs on the background thread it does not block program.It is recommended over create method.
Declared In
NetmeraContent.hdelete:
Deletes data from the cloud.
- (BOOL)delete:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Deletes data from the cloud.
Warning: Before calling this method path of the data should be setted
Declared In
NetmeraContent.hdeleteInBackground
Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
- (void)deleteInBackgroundDiscussion
Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
Warning: Before calling this method path of the data should be setted
Declared In
NetmeraContent.hdeleteInBackgroundWithBlock:
Deletes data from the cloud in the background thread and executes.Since it runs on the background thread it does not block program.It is recommended over delete method.
- (void)deleteInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Deletes data from the cloud in the background thread and executes.Since it runs on the background thread it does not block program.It is recommended over delete method.
Warning: Before calling this method path of the data should be setted
Declared In
NetmeraContent.hdeleteInBackgroundWithTarget:selector:
Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
- (void)deleteInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The target on which the selector will be called.
- selector
The selector to call. It should have the following signature: (void) callBackDeleteWithError:(NSError *)error. error will be nil on success and set if there was an error.
Discussion
Deletes data from the cloud in the background thread.Since it runs on the background thread it does not block program.It is recommended over delete method.
Warning: Before calling this method path of the data should be setted
Declared In
NetmeraContent.hget:
Gets the NSObject with the specified key.
- (NSObject *)get:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NSObject with the specified key.If the object type is not NSObject or key does not exists then it returns nil.
Discussion
Gets the NSObject with the specified key.
Declared In
NetmeraContent.hgetBool:
Gets the boolean value with the specified key.
- (BOOL)getBool:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the boolean value with the specified key.If value is a boolean or key does not exists then it returns false.
Discussion
Gets the boolean value with the specified key.
Declared In
NetmeraContent.hgetDictionary:
Gets the NSDictionary object with the specified key.
- (NSDictionary *)getDictionary:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NSDictionary object with the specified key.If the object type is not an NSDictionary or key does not exists then it returns nil.
Discussion
Gets the NSDictionary object with the specified key.
Declared In
NetmeraContent.hgetDictionaryArray:
Gets the NSArray object with the specified key.
- (NSArray *)getDictionaryArray:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NSArray object with the specified key.If the object type is not an NSArray or key does not exists then it returns nil.
Discussion
Gets the NSArray object with the specified key.
Declared In
NetmeraContent.hgetDouble:
Gets the double value with the specified key.
- (double)getDouble:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the double value with the specified key.If value is not a double or key does not exists then it returns 0.0.
Discussion
Gets the double value with the specified key.
Declared In
NetmeraContent.hgetInt:
Gets the int value with the specified key.
- (int)getInt:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the int value with the specified key.If value is not an integer or key does not exists then it returns 0.
Discussion
Gets the int value with the specified key.
Declared In
NetmeraContent.hgetLong:
Gets the long value with the specified key.
- (long)getLong:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the long value with the specified key.If value is not a long or key does not exists then it returns 0.
Discussion
Gets the long value with the specified key.
Declared In
NetmeraContent.hgetNetmeraGeoLocation:
Gets the NetmeraGeoLocation object with the specified key.
- (NetmeraGeoLocation *)getNetmeraGeoLocation:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NetmeraGeoLocation object with the specified key.If the object type is not an NetmeraGeoLocation or key does not exists then it returns nil.
Discussion
Gets the NetmeraGeoLocation object with the specified key.
Declared In
NetmeraContent.hgetNetmeraMedia:
Gets the NetmeraMedia object with the specified key.
- (NetmeraMedia *)getNetmeraMedia:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NetmeraMedia object with the specified key.If the object type is not an NetmeraMedia or key does not exists then it returns null.
Discussion
Gets the NetmeraMedia object with the specified key.
Declared In
NetmeraContent.hgetNetmeraUser:
Gets the NetmeraUser object with the specified key.
- (NetmeraUser *)getNetmeraUser:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NetmeraUser object with the specified key.If the object type is not an NetmeraUser or key does not exists then it returns null.
Discussion
Gets the NetmeraUser object with the specified key.
Declared In
NetmeraContent.hgetString:
Gets the NSString object with the specified key.
- (NSString *)getString:(NSString *)keyParameters
- key
key to get value
Return Value
Returns the NSString with the specified key.If the object type is not NSString or key does not exists then it returns nil.
Discussion
Gets the NSString object with the specified key.
Declared In
NetmeraContent.hinitWithObjectName:
Constructor that takes content name as parameter.
- (NetmeraContent *)initWithObjectName:(NSString *)objectNameParameters
- objectName
Name of the content
Discussion
Constructor that takes content name as parameter.
Declared In
NetmeraContent.hsetOwner:
Set the owner of this content. If it is generic content then do not call setOwner: method.
- (void)setOwner:(NetmeraUser *)userParameters
- user
Owner of the content
Discussion
Set the owner of this content. If it is generic content then do not call setOwner: method.
Declared In
NetmeraContent.hupdate:
Updates data
- (BOOL)update:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Updates data
Declared In
NetmeraContent.hupdateInBackgroundWithBlock:
Updates data in the background thread and executes. Since it runs on the background thread it does not block program.It is recommended over update method.
- (void)updateInBackgroundWithBlock:(void ( ^ ) ( NetmeraContent *content , NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NetmeraContent content, NSError error)
Discussion
Updates data in the background thread and executes. Since it runs on the background thread it does not block program.It is recommended over update method.
Declared In
NetmeraContent.hupdateInBackgroundWithTarget:selector:
Updates data in the background thread. Since it runs on the background thread it does not block program.It is recommended over update method.
- (void)updateInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The target on which the selector will be called.
- selector
The selector to call. It should have the following signature: (void)callBackUpdateWithContent:(NetmeraContent )content error:(NSError )error. error will be nil on success and set if there was an error. content will be the NetmeraContent with the updated data.
Discussion
Updates data in the background thread. Since it runs on the background thread it does not block program.It is recommended over update method.
Declared In
NetmeraContent.h