Search in sources :

Example 26 with CategoryOptionGroupSet

use of org.hisp.dhis.category.CategoryOptionGroupSet in project dhis2-core by dhis2.

the class DhisConvenienceTest method createCategoryOptionGroupSet.

/**
 * @param categoryGroupSetUniqueIdentifier A unique character to identify
 *        the category option group set.
 * @param categoryOptionGroups the category option groups.
 * @return CategoryOptionGroupSet
 */
public static CategoryOptionGroupSet createCategoryOptionGroupSet(char categoryGroupSetUniqueIdentifier, CategoryOptionGroup... categoryOptionGroups) {
    CategoryOptionGroupSet categoryOptionGroupSet = new CategoryOptionGroupSet("CategoryOptionGroupSet" + categoryGroupSetUniqueIdentifier);
    categoryOptionGroupSet.setAutoFields();
    for (CategoryOptionGroup categoryOptionGroup : categoryOptionGroups) {
        categoryOptionGroupSet.addCategoryOptionGroup(categoryOptionGroup);
    }
    return categoryOptionGroupSet;
}
Also used : CategoryOptionGroup(org.hisp.dhis.category.CategoryOptionGroup) CategoryOptionGroupSet(org.hisp.dhis.category.CategoryOptionGroupSet)

Aggregations

CategoryOptionGroupSet (org.hisp.dhis.category.CategoryOptionGroupSet)26 Category (org.hisp.dhis.category.Category)14 CategoryOption (org.hisp.dhis.category.CategoryOption)7 OrganisationUnitGroupSet (org.hisp.dhis.organisationunit.OrganisationUnitGroupSet)7 ArrayList (java.util.ArrayList)6 User (org.hisp.dhis.user.User)5 AnalyticsTableColumn (org.hisp.dhis.analytics.AnalyticsTableColumn)4 CategoryOptionGroup (org.hisp.dhis.category.CategoryOptionGroup)4 OrganisationUnitLevel (org.hisp.dhis.organisationunit.OrganisationUnitLevel)4 PeriodType (org.hisp.dhis.period.PeriodType)4 Test (org.junit.jupiter.api.Test)4 Date (java.util.Date)3 HashMap (java.util.HashMap)3 DataElement (org.hisp.dhis.dataelement.DataElement)3 DataElementGroupSet (org.hisp.dhis.dataelement.DataElementGroupSet)3 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 HashSet (java.util.HashSet)2 DimensionalObject (org.hisp.dhis.common.DimensionalObject)2 Expression (org.hisp.dhis.expression.Expression)2 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)2