use of ai.elimu.model.gson.project.AppCategoryGson 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;
}
}
use of ai.elimu.model.gson.project.AppCategoryGson in project webapp by elimu-ai.
the class JavaToGsonConverter method getAppCollectionGson.
public static AppCollectionGson getAppCollectionGson(AppCollection appCollection) {
if (appCollection == null) {
return null;
} else {
AppCollectionGson appCollectionGson = new AppCollectionGson();
appCollectionGson.setId(appCollection.getId());
List<AppCategoryGson> appCategories = new ArrayList<>();
for (AppCategory appCategory : appCollection.getAppCategories()) {
AppCategoryGson appCategoryGson = getAppCategoryGson(appCategory);
appCategories.add(appCategoryGson);
}
appCollectionGson.setAppCategories(appCategories);
return appCollectionGson;
}
}
Aggregations