|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.api.rest.RESTUtils
public class RESTUtils
Series of convenience methods for manipulating JSONObject objects.
| Constructor Summary | |
|---|---|
RESTUtils()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
getIdentityForURLToken(org.datanucleus.metadata.AbstractClassMetaData cmd,
java.lang.String token,
org.datanucleus.NucleusContext nucCtx)
|
static JSONArray |
getJSONArrayFromCollection(java.util.Collection coll,
org.datanucleus.store.ExecutionContext ec)
Method to convert the provided POJO into its equivalent JSONObject. |
static JSONObject |
getJSONObjectFromPOJO(java.lang.Object obj,
org.datanucleus.store.ExecutionContext ec)
Method to convert the provided POJO into its equivalent JSONObject. |
static java.lang.Object |
getNonPersistableObjectFromJSONObject(JSONObject jsonobj,
java.lang.Class cls,
org.datanucleus.NucleusContext nucCtx)
Deserialise from JSON to an object. |
static java.lang.Object |
getObjectFromJSONObject(JSONObject jsonobj,
java.lang.String className,
org.datanucleus.store.ExecutionContext ec)
Method to convert the provided JSONObject into its equivalent object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RESTUtils()
| Method Detail |
|---|
public static JSONArray getJSONArrayFromCollection(java.util.Collection coll,
org.datanucleus.store.ExecutionContext ec)
coll - Collection of POJOsec - ExecutionContext
public static JSONObject getJSONObjectFromPOJO(java.lang.Object obj,
org.datanucleus.store.ExecutionContext ec)
obj - The objectec - ExecutionContext
public static java.lang.Object getObjectFromJSONObject(JSONObject jsonobj,
java.lang.String className,
org.datanucleus.store.ExecutionContext ec)
jsonobj - JSONObjectclassName - Name of the classec - ExecutionContext
org.datanucleus.exceptions.ClassNotResolvedException - when the class is not found
{@link - JDOFatalUserException} If other error occurred
public static java.lang.Object getIdentityForURLToken(org.datanucleus.metadata.AbstractClassMetaData cmd,
java.lang.String token,
org.datanucleus.NucleusContext nucCtx)
public static java.lang.Object getNonPersistableObjectFromJSONObject(JSONObject jsonobj,
java.lang.Class cls,
org.datanucleus.NucleusContext nucCtx)
jsonobj - JSONObjectcls - The classnucCtx - NucleusContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||