ORABaseDataContainer Class Reference
Inherits from | NSObject |
---|---|
Declared in | ORABaseDataContainer.h |
Overview
- ORABaseDataContainer is the central abstract class. Its central purpose is to save and retrieve any kind of string values with a unique key which is ORAConfigSetting class instance. Since its an abstract class, we can't use it without subclassing. So to use the methods mentioned in the class, we need to subclass it and override getModuleId method.
- In the implementation of getModuleId method, just return the module id which is provided via documentation. Please note, this class should not be manually initialized.
![Closed](../../../Skins/Default/Stylesheets/Images/transparent.gif)
A mandatory method which will return the module id. Please note, there is no way to procced with data store without providing proper module id. Module id will allow only alphanumeric, no special characters are allowed. In case of invalid(empty or nil) module id, app will get terminated.
- (NSString *)getModuleId
Return Value
The Module ID which is provided as part of package.
Declared In
ORABaseDataContainer.h
![Closed](../../../Skins/Default/Stylesheets/Images/transparent.gif)
Sets value of the key
- (BOOL)putValue:(NSString *)value forKey:(ORAConfigSetting *)key
Parameters
value
|
value of configration key |
---|---|
key
|
name of key for the configuration. This is either the instance of ORAConfigSetting or its child |
Return Value
Returns true if the value is successfully stored. Otherwise, false
Declared In
ORABaseDataContainer.h
![Closed](../../../Skins/Default/Stylesheets/Images/transparent.gif)
This method loads the bulk data into the store While loading, it will check for the version. If the newVersion is greater than exisiting version then only it will store the data The main purpose of versioning is to restore user modified configurations This method is useful to store the default / mandatory config
- (void)loadFromConfigFile
Declared In
ORABaseDataContainer.h
![Closed](../../../Skins/Default/Stylesheets/Images/transparent.gif)
This method is deprecated starting from version 1.1.0 (Deprecated: This method is deprecated starting from version 1.1.0)
- (void)loadConfig:(NSDictionary *)configDict versionNumber:(int)versionNumber
Parameters
configDict
|
A configuration dictionary |
---|---|
versionNumber
|
A version number of your choice |
Discussion
Note: Please use @code loadConfig instead
This method loads the bulk data into the store While loading, it will check for the version. If the newVersion is greater than exisiting version then only it will store the data The main purpose of versioning is to restore user modified configurations This method is useful to store the default / mandatory config
Declared In
ORABaseDataContainer.h