Search in sources :

Example 1 with CodeListItemView

use of org.openforis.collect.metamodel.view.CodeListItemView in project collect by openforis.

the class CodeListController method toViews.

private List<CodeListItemView> toViews(List<CodeListItem> items) {
    List<CodeListItemView> views = new ArrayList<CodeListItemView>(items.size());
    for (CodeListItem item : items) {
        CodeListItemView view = new CodeListItemView();
        view.setCode(item.getCode());
        view.setLabel(item.getLabel());
        views.add(view);
    }
    return views;
}
Also used : ArrayList(java.util.ArrayList) CodeListItemView(org.openforis.collect.metamodel.view.CodeListItemView) CodeListItem(org.openforis.idm.metamodel.CodeListItem)

Aggregations

ArrayList (java.util.ArrayList)1 CodeListItemView (org.openforis.collect.metamodel.view.CodeListItemView)1 CodeListItem (org.openforis.idm.metamodel.CodeListItem)1