use of ai.elimu.model.gson.project.AppGroupGson in project webapp by elimu-ai.
the class JavaToGsonConverter method getAppGroupGson.
public static AppGroupGson getAppGroupGson(AppGroup appGroup) {
if (appGroup == null) {
return null;
} else {
AppGroupGson appGroupGson = new AppGroupGson();
appGroupGson.setId(appGroup.getId());
List<ApplicationGson> applications = new ArrayList<>();
for (Application application : appGroup.getApplications()) {
ApplicationGson applicationGson = getApplicationGson(application);
applications.add(applicationGson);
}
appGroupGson.setApplications(applications);
return appGroupGson;
}
}
use of ai.elimu.model.gson.project.AppGroupGson in project webapp by elimu-ai.
the class JavaToGsonConverter method getAppCategoryGson.
public static AppCategoryGson getAppCategoryGson(AppCategory appCategory) {
if (appCategory == null) {
return null;
} else {
AppCategoryGson appCategoryGson = new AppCategoryGson();
appCategoryGson.setId(appCategory.getId());
appCategoryGson.setName(appCategory.getName());
List<AppGroupGson> appGroups = new ArrayList<>();
for (AppGroup appGroup : appCategory.getAppGroups()) {
AppGroupGson appGroupGson = getAppGroupGson(appGroup);
appGroups.add(appGroupGson);
}
appCategoryGson.setAppGroups(appGroups);
return appCategoryGson;
}
}
Aggregations