|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netmera.mobile.BaseContent
public abstract class BaseContent
Constructor Summary | |
---|---|
BaseContent()
|
Method Summary | |
---|---|
void |
add(java.lang.String key,
java.lang.Object value)
Adds key,value pairs into the object. |
java.lang.Object |
get(java.lang.String key)
Gets the Object with the specified key. |
boolean |
getBoolean(java.lang.String key)
Gets the boolean value with the specified key. |
double |
getDouble(java.lang.String key)
Gets the double value with the specified key. |
int |
getInt(java.lang.String key)
Gets the int value with the specified key. |
org.json.JSONArray |
getJSONArray(java.lang.String key)
Gets the JSONArray object with the specified key. |
org.json.JSONObject |
getJSONObject(java.lang.String key)
Gets the JSONObject object with the specified key. |
long |
getLong(java.lang.String key)
Gets the long value with the specified key. |
NetmeraGeoLocation |
getNetmeraGeoLocation(java.lang.String key)
Gets the NetmeraGeoLocation object with the specified key. |
NetmeraUser |
getNetmeraUser()
Gets the NetmeraUser object |
java.lang.String |
getString(java.lang.String key)
Gets the String object with the specified key. |
void |
increment(java.lang.String key,
java.lang.Object value)
Increments the value of a key of the corresponding NetmeraContent by a specified amount, if the content is not created yet or the content doesn't contain the given key, the increment values are used as initial values for the content. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseContent()
Method Detail |
---|
public void add(java.lang.String key, java.lang.Object value) throws NetmeraException
key
- - key to identify specified valuevalue
- - value associates with the specified key
NetmeraException
public void increment(java.lang.String key, java.lang.Object value) throws NetmeraException
key
- - key to identify specified valuevalue
- - value associates with the specified key
NetmeraException
- Throws exception if the value is not an instance of Numberpublic java.lang.Object get(java.lang.String key) throws NetmeraException
Object
with the specified key.
key
- - key to get value
Object
with the specified key.If the object
type is not Object
or key does not exists then it returns
null.
NetmeraException
- Throws exception if it cannot get objectpublic java.lang.String getString(java.lang.String key) throws NetmeraException
String
object with the specified key.
key
- - key to get value
String
with the specified key.If the object
type is not String
or key does not exists then it returns
null.
NetmeraException
- Throws exception if it cannot get objectpublic int getInt(java.lang.String key) throws NetmeraException
key
- - key to get value
NetmeraException
- Throws exception if it cannot get objectpublic long getLong(java.lang.String key) throws NetmeraException
key
- - key to get value
NetmeraException
- Throws exception if it cannot get objectpublic boolean getBoolean(java.lang.String key) throws NetmeraException
key
- - key to get value
NetmeraException
- Throws exception if it cannot get objectpublic double getDouble(java.lang.String key) throws NetmeraException
key
- - key to get value
NetmeraException
- Throws exception if it cannot get objectpublic org.json.JSONObject getJSONObject(java.lang.String key) throws NetmeraException
JSONObject
object with the specified key.
key
- - key to get value
JSONObject
object with the specified key.If
the object type is not an JSONObject
or key does not
exists then it returns null.
NetmeraException
- Throws exception if it cannot get objectpublic org.json.JSONArray getJSONArray(java.lang.String key) throws NetmeraException
JSONArray
object with the specified key.
key
- - key to get value
JSONArray
object with the specified key.If
the object type is not an JSONArray
or key does not
exists then it returns null.
NetmeraException
- Throws exception if it cannot get objectpublic NetmeraGeoLocation getNetmeraGeoLocation(java.lang.String key) throws NetmeraException
NetmeraGeoLocation
object with the specified key.
key
- key to get value
NetmeraGeoLocation
object with the specified
key.If the object type is not an NetmeraGeoLocation
or
key does not exists then it returns null.
NetmeraException
- Throws exception if it cannot get objectpublic NetmeraUser getNetmeraUser() throws NetmeraException
NetmeraUser
object
NetmeraUser
object with the specified key.If
the object type is not an NetmeraUser
or key does not
exists then it returns null.
NetmeraException
- Throws exception if it cannot get object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |