T - The model object type of the corresponding JsonUtil.public abstract static class AbstractModelObject.JsonUtil<T> extends Object implements IModelObject.IJsonUtil<T>
| Constructor and Description |
|---|
JsonUtil() |
| Modifier and Type | Method and Description |
|---|---|
T |
createModelObject(String json)
Build a model object with the information given in a json string.
|
T[] |
createModelObjectArray(com.google.gson.JsonArray jsonArray)
Create an array of model objects out of a json array object.
|
<X> X[] |
createModelObjectArray(com.google.gson.JsonArray jsonArray,
Class<X> clazz)
Create an array of model objects out of a json array object and a
Class object. |
T[] |
createModelObjectArray(String json)
Create an array of model objects out of a json string.
|
T[] |
createModelObjectArray(String json,
String key)
Create an array of model objects out of a json array, which is contained in a json object.
|
Paging<T> |
createModelObjectPaging(com.google.gson.JsonObject jsonObject)
Create a paging of model objects out of a json object.
|
Paging<T> |
createModelObjectPaging(String json)
Create a paging of model objects out of a json string.
|
Paging<T> |
createModelObjectPaging(String json,
String key)
Create a paging of model objects out of a json array, which is contained in a json object.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(com.google.gson.JsonObject jsonObject)
Create a cursor-based paging of model objects out of a json object.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(String json)
Create a cursor-based paging of model objects out of a json string.
|
PagingCursorbased<T> |
createModelObjectPagingCursorbased(String json,
String key)
Create a cursor-based paging of model objects out of a json array, which is contained in a json object.
|
boolean |
hasAndNotNull(com.google.gson.JsonObject jsonObject,
String memberName)
Check whether the supplied JSON object contains data in the given member, which is not
null. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateModelObjectpublic boolean hasAndNotNull(com.google.gson.JsonObject jsonObject,
String memberName)
null.hasAndNotNull in interface IModelObject.IJsonUtil<T>jsonObject - The JSON object.memberName - The member name.public T createModelObject(String json)
createModelObject in interface IModelObject.IJsonUtil<T>json - A json object.public T[] createModelObjectArray(com.google.gson.JsonArray jsonArray)
createModelObjectArray in interface IModelObject.IJsonUtil<T>jsonArray - A JsonArray.public T[] createModelObjectArray(String json)
createModelObjectArray in interface IModelObject.IJsonUtil<T>json - A JsonArray.public T[] createModelObjectArray(String json, String key)
createModelObjectArray in interface IModelObject.IJsonUtil<T>json - A JsonObject.key - The key of the json array in the json object.public <X> X[] createModelObjectArray(com.google.gson.JsonArray jsonArray,
Class<X> clazz)
Class object.createModelObjectArray in interface IModelObject.IJsonUtil<T>X - The model object type of the array and class object.jsonArray - A json array object.clazz - The class object.public Paging<T> createModelObjectPaging(com.google.gson.JsonObject jsonObject)
createModelObjectPaging in interface IModelObject.IJsonUtil<T>jsonObject - A json object.public Paging<T> createModelObjectPaging(String json)
createModelObjectPaging in interface IModelObject.IJsonUtil<T>json - A json string.public Paging<T> createModelObjectPaging(String json, String key)
createModelObjectPaging in interface IModelObject.IJsonUtil<T>json - A JsonObject.key - The key of the json array in the json object.public PagingCursorbased<T> createModelObjectPagingCursorbased(com.google.gson.JsonObject jsonObject)
createModelObjectPagingCursorbased in interface IModelObject.IJsonUtil<T>jsonObject - A json object.public PagingCursorbased<T> createModelObjectPagingCursorbased(String json)
createModelObjectPagingCursorbased in interface IModelObject.IJsonUtil<T>json - A json string.public PagingCursorbased<T> createModelObjectPagingCursorbased(String json, String key)
createModelObjectPagingCursorbased in interface IModelObject.IJsonUtil<T>json - A JsonObject.key - The key of the json array in the json object.Copyright © 2020. All rights reserved.