use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetMetaNotificationsResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("metas")) {
JsonElement jsonMetas = jsonObject.get("metas");
if (jsonMetas != null) {
metas = new ArrayList<MetaNotification>();
MetaNotification item = null;
for (int i = 0; i < jsonMetas.getAsJsonArray().size(); i++) {
if (jsonMetas.getAsJsonArray().get(i) != null) {
(item = new MetaNotification()).fromJson(jsonMetas.getAsJsonArray().get(i).getAsJsonObject());
metas.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 GetRolesRequest 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());
}
}
if (jsonObject.has("query")) {
JsonElement jsonQuery = jsonObject.get("query");
if (jsonQuery != null) {
query = jsonQuery.getAsString();
}
}
}
use of com.willshex.blogwt.shared.api.Pager in project blogwt by billy1380.
the class GetUsersResponse method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("users")) {
JsonElement jsonUsers = jsonObject.get("users");
if (jsonUsers != null) {
users = new ArrayList<User>();
User item = null;
for (int i = 0; i < jsonUsers.getAsJsonArray().size(); i++) {
if (jsonUsers.getAsJsonArray().get(i) != null) {
(item = new User()).fromJson(jsonUsers.getAsJsonArray().get(i).getAsJsonObject());
users.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 GetMetaNotificationsRequest 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 GetNotificationSettingsRequest method fromJson.
@Override
public void fromJson(JsonObject jsonObject) {
super.fromJson(jsonObject);
if (jsonObject.has("user")) {
JsonElement jsonUser = jsonObject.get("user");
if (jsonUser != null) {
user = new User();
user.fromJson(jsonUser.getAsJsonObject());
}
}
if (jsonObject.has("pager")) {
JsonElement jsonPager = jsonObject.get("pager");
if (jsonPager != null) {
pager = new Pager();
pager.fromJson(jsonPager.getAsJsonObject());
}
}
}
Aggregations