use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetPropertiesResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("properties")) {
JsonElement jsonProperties = jsonObject.get("properties");
if (jsonProperties != null) {
properties = new ArrayList<Property>();
Property item = null;
for (int i = 0; i < jsonProperties.getAsJsonArray().size(); i++) {
if (jsonProperties.getAsJsonArray().get(i) != null) {
(item = new Property()).fromJson(jsonProperties.getAsJsonArray().get(i).getAsJsonObject());
properties.add(item);
}
}
}
}
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetRatingsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("ratings")) {
JsonElement jsonRatings = jsonObject.get("ratings");
if (jsonRatings != null) {
ratings = new ArrayList<Rating>();
Rating item = null;
for (int i = 0; i < jsonRatings.getAsJsonArray().size(); i++) {
if (jsonRatings.getAsJsonArray().get(i) != null) {
(item = new Rating()).fromJson(jsonRatings.getAsJsonArray().get(i).getAsJsonObject());
ratings.add(item);
}
}
}
}
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetRelatedPostsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("posts")) {
JsonElement jsonPosts = jsonObject.get("posts");
if (jsonPosts != null) {
posts = new Post();
posts.fromJson(jsonPosts.getAsJsonObject());
}
}
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetGeneratedDownloadsRequest method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetGeneratedDownloadsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("downloads")) {
JsonElement jsonDownloads = jsonObject.get("downloads");
if (jsonDownloads != null) {
downloads = new ArrayList<GeneratedDownload>();
GeneratedDownload item = null;
for (int i = 0; i < jsonDownloads.getAsJsonArray().size(); i++) {
if (jsonDownloads.getAsJsonArray().get(i) != null) {
(item = new GeneratedDownload()).fromJson(jsonDownloads.getAsJsonArray().get(i).getAsJsonObject());
downloads.add(item);
}
}
}
}
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
Aggregations