change property name
parent
dfff1576c1
commit
ab18d484e8
|
|
@ -11,7 +11,7 @@ import com.nttdata.calender.api.RemedyJavaAPI;
|
||||||
import com.nttdata.calender.errorhandling.ErrorTypes.ValidationError;
|
import com.nttdata.calender.errorhandling.ErrorTypes.ValidationError;
|
||||||
|
|
||||||
public class Filter {
|
public class Filter {
|
||||||
private ArrayList<FilterElement> filter;
|
private ArrayList<FilterElement> filterElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a filter to the list of filters.
|
* Adds a filter to the list of filters.
|
||||||
|
|
@ -19,10 +19,18 @@ public class Filter {
|
||||||
* @param filter the filter to add
|
* @param filter the filter to add
|
||||||
*/
|
*/
|
||||||
public void addFilter(FilterElement filter) {
|
public void addFilter(FilterElement filter) {
|
||||||
if (this.filter == null) {
|
if (this.filterElement == null) {
|
||||||
this.filter = new ArrayList<FilterElement>();
|
this.filterElement = new ArrayList<FilterElement>();
|
||||||
}
|
}
|
||||||
this.filter.add(filter);
|
this.filterElement.add(filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilterElement(ArrayList<FilterElement> filter) {
|
||||||
|
this.filterElement = filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ArrayList<FilterElement> getFilterElement() {
|
||||||
|
return this.filterElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -40,12 +48,12 @@ public class Filter {
|
||||||
public String constructQualifier(Query query, RemedyJavaAPI api) throws ARException, ValidationError {
|
public String constructQualifier(Query query, RemedyJavaAPI api) throws ARException, ValidationError {
|
||||||
var qualifier = "";
|
var qualifier = "";
|
||||||
|
|
||||||
if (this.filter == null) {
|
if (this.filterElement == null) {
|
||||||
return qualifier;
|
return qualifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < this.filter.size(); i++) {
|
for (int i = 0; i < this.filterElement.size(); i++) {
|
||||||
var current_filter = this.filter.get(i);
|
var current_filter = this.filterElement.get(i);
|
||||||
var column = current_filter.getColumn();
|
var column = current_filter.getColumn();
|
||||||
var criterias = current_filter.getCriteria();
|
var criterias = current_filter.getCriteria();
|
||||||
|
|
||||||
|
|
@ -87,7 +95,7 @@ public class Filter {
|
||||||
qualifier += "(" + inner_qualifier + ")";
|
qualifier += "(" + inner_qualifier + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < filter.size() - 1) {
|
if (i < filterElement.size() - 1) {
|
||||||
qualifier += " AND ";
|
qualifier += " AND ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue