Search in sources :

Example 1 with PredictorGroup

use of org.hisp.dhis.predictor.PredictorGroup in project dhis2-core by dhis2.

the class DhisConvenienceTest method createPredictorGroup.

/**
 * Creates a Predictor Group
 *
 * @param uniqueCharacter A unique character to identify the object.
 * @param predictors Predictors to add to the group.
 * @return PredictorGroup
 */
public static PredictorGroup createPredictorGroup(char uniqueCharacter, Predictor... predictors) {
    PredictorGroup group = new PredictorGroup();
    group.setAutoFields();
    group.setName("PredictorGroup" + uniqueCharacter);
    group.setDescription("Description" + uniqueCharacter);
    group.setUid(BASE_PREDICTOR_GROUP_UID + uniqueCharacter);
    for (Predictor p : predictors) {
        group.addPredictor(p);
    }
    return group;
}
Also used : Predictor(org.hisp.dhis.predictor.Predictor) PredictorGroup(org.hisp.dhis.predictor.PredictorGroup)

Aggregations

Predictor (org.hisp.dhis.predictor.Predictor)1 PredictorGroup (org.hisp.dhis.predictor.PredictorGroup)1