My Project
 All Classes Functions Properties
Instance Methods | Properties | List of all members
CBItem Class Reference

#import <CBItem.h>

Inheritance diagram for CBItem:

Instance Methods

(CBItem *) - initWithData:collectionID:
 
(void) - save
 
(void) - refresh
 
(void) - destroy
 
(id) - getValueFor:
 

Properties

NSMutableDictionary * data
 
NSString * collectionID
 

Detailed Description

Class that represents an individual item from the platform

Method Documentation

- (void) destroy

Deletes the Item on the server This cannot be undone.

- (id) getValueFor: (NSString *)  key

Gets an item out of the data attribute that matches the given string

Parameters
keyString used to find a value in the dictionary
Returns
The id that is referenced by the value for the given key
- (CBItem *) initWithData: (NSDictionary *)  inputData
collectionID: (NSString *)  colID 

Initializes the Item with data and sets the data and collectionID.

Parameters
inputDataA dictionary that holds data for the item
colIDA string that holds the ID of the collection to which this item belongs
Returns
the newly created CBItem
- (void) refresh

Pulls down any changes that have been made on the server to the item since being instantiated. This updates the data attribute to reflect the current state of the Item on the server

- (void) save

Saves any changes that have been made to the data property to the Platform This will update the server

Property Documentation

- (NSString*) collectionID
readwritenonatomicstrong

A string holding the ID of the collection to which this item belongs

- (NSMutableDictionary*) data
readwritenonatomicstrong

A dictionary that holds the data that was stored in the platform.


The documentation for this class was generated from the following files: