use of com.axelor.studio.db.Filter in project axelor-open-suite by axelor.
the class ChartRecordViewServiceImpl method getYearMonthFilters.
protected List<Filter> getYearMonthFilters(Filter filter, long startId, long endId) {
List<Filter> startEndFilter = new ArrayList<>();
Filter startDateFilter = JPA.copy(filter, false);
startDateFilter.setId(startId);
startDateFilter.setOperator(">=");
Filter endDateFilter = JPA.copy(filter, false);
endDateFilter.setId(endId);
endDateFilter.setOperator("<=");
startEndFilter.add(startDateFilter);
startEndFilter.add(endDateFilter);
return startEndFilter;
}
use of com.axelor.studio.db.Filter in project axelor-open-suite by axelor.
the class ChartRecordViewServiceImpl method createFilter.
protected Filter createFilter(Long id, Boolean isTargetJson, Boolean isJson, MetaJsonField jsonField, MetaField metaField, String targetField, String targetType, boolean isNull, String operator) {
Filter filter = new Filter();
filter.setId(id);
filter.setIsTargetJson(isTargetJson);
if (isJson) {
filter.setIsJson(true);
filter.setMetaJsonField(jsonField);
} else {
filter.setMetaField(metaField);
}
filter.setTargetField(targetField);
filter.setTargetType(targetType);
if (isNull) {
filter.setOperator("isNull");
} else {
filter.setOperator(operator);
filter.setIsParameter(true);
}
return filter;
}
Aggregations