Search in sources :

Example 6 with ValidationCriteria

use of org.hisp.dhis.validation.ValidationCriteria in project dhis2-core by dhis2.

the class DhisConvenienceTest method createValidationCriteria.

/**
     * @param uniqueCharacter A unique character to identify the object.
     * @return ValidationCriteria
     */
public static ValidationCriteria createValidationCriteria(char uniqueCharacter, String property, int operator, String value) {
    ValidationCriteria validationCriteria = new ValidationCriteria();
    validationCriteria.setAutoFields();
    validationCriteria.setName("ValidationCriteria" + uniqueCharacter);
    validationCriteria.setDescription("Description" + uniqueCharacter);
    validationCriteria.setProperty(property);
    validationCriteria.setOperator(operator);
    validationCriteria.setValue(value);
    return validationCriteria;
}
Also used : ValidationCriteria(org.hisp.dhis.validation.ValidationCriteria)

Aggregations

ValidationCriteria (org.hisp.dhis.validation.ValidationCriteria)6 Date (java.util.Date)1 ValueType (org.hisp.dhis.common.ValueType)1 Program (org.hisp.dhis.program.Program)1 TrackedEntityAttributeValue (org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue)1