if(conditions.size() > 0) {
query = query.concat(" AND (");
boolean firstIteration = true;
int i = 0;
for(Iterator<ExtendedCondition> iterator = conditions.iterator(); iterator.hasNext();) {
ExtendedCondition extendedCondition = iterator.next();
String attribute = extendedCondition.getAttribute();
int position = LogModule.getUserPropertyPosition(attribute);
Operator operator = extendedCondition.getOperator();
String value = extendedCondition.getValue();
// Is position equal to 0 then the list userProperties doesn't contain the value of attribute.
if (position > 0 && operator.buildSQLStatement(attribute, value).length() > 0) {
values[i] = value;
String connection = "";
if(!firstIteration) {