use of org.hisp.dhis.common.RepeatableStageParams in project dhis2-core by dhis2.
the class DefaultQueryItemLocator method getRepeatableStageParams.
private static RepeatableStageParams getRepeatableStageParams(String dimension) {
try {
RepeatableStageParams repeatableStageParams = RepeatableStageParamsHelper.getRepeatableStageParams(dimension);
repeatableStageParams.setDimension(dimension);
return repeatableStageParams;
} catch (InvalidRepeatableStageParamsException e) {
ErrorMessage errorMessage = new ErrorMessage(dimension, ErrorCode.E1101);
throw new IllegalQueryException(errorMessage);
}
}
use of org.hisp.dhis.common.RepeatableStageParams in project dhis2-core by dhis2.
the class RepeatableStageParamsHelper method getRepeatableStageParams.
/**
* @param startIndex
* @param count
* @return RepeatableStageParams instance
*/
private static RepeatableStageParams getRepeatableStageParams(int startIndex, int count) {
final RepeatableStageParams repeatableStageParams = new RepeatableStageParams();
repeatableStageParams.setStartIndex(startIndex);
repeatableStageParams.setCount(count);
repeatableStageParams.setDefaultObject(false);
return repeatableStageParams;
}
use of org.hisp.dhis.common.RepeatableStageParams in project dhis2-core by dhis2.
the class RepeatableStageParamsHelper method getRepeatableStageParams.
/**
* @param startIndex
* @param count
* @param startDate
* @param endDate
* @return RepeatableStageParams instance
*/
private static RepeatableStageParams getRepeatableStageParams(int startIndex, int count, Date startDate, Date endDate) {
final RepeatableStageParams repeatableStageParams = new RepeatableStageParams();
repeatableStageParams.setStartIndex(startIndex);
repeatableStageParams.setCount(count);
repeatableStageParams.setStartDate(startDate);
repeatableStageParams.setEndDate(endDate);
repeatableStageParams.setDefaultObject(false);
return repeatableStageParams;
}
use of org.hisp.dhis.common.RepeatableStageParams in project dhis2-core by dhis2.
the class RepeatableStageParamsHelper method getRepeatableStageParams.
/**
* @param startDate
* @param endDate
* @return RepeatableStageParams instance
*/
private static RepeatableStageParams getRepeatableStageParams(Date startDate, Date endDate) {
final RepeatableStageParams repeatableStageParams = new RepeatableStageParams();
repeatableStageParams.setStartIndex(0);
repeatableStageParams.setCount(Integer.MAX_VALUE);
repeatableStageParams.setStartDate(startDate);
repeatableStageParams.setEndDate(endDate);
repeatableStageParams.setDefaultObject(false);
return repeatableStageParams;
}
Aggregations