private Criteria buildFromODataElement() {
List<Criteria> criterias = new ArrayList<Criteria>();
for (String key : oDataInputElement.getIdentifierKeys()) {
String value = oDataInputElement.getIdentifier(key);
Criteria criteria = parseCriteria(key, value, FieldOperator.EQUAL);
log.debug("Add Criteria from identifiers " + criteria);
criterias.add(criteria);
}
if (requestParametersMap.containsKey($FILTER)) {
filter = requestParametersMap.get($FILTER);
Criteria criteria = buildFromFilter();
log.debug("Add Criteria from $filter " + criteria);
criterias.add(criteria);
}
Criteria result = new AndCriteria(criterias.toArray(new Criteria[0]));
return result;
}