/** * Generates QueryOrderByConfig list from the given Siddhi OrderByAttribute list * @param orderByAttributeList Siddhi OrderByAttribute list * @return QueryOrderByConfig list */ private List<QueryOrderByConfig> generateOrderBy(List<OrderByAttribute> orderByAttributeList) { List<QueryOrderByConfig> orderBy = new ArrayList<>(); for (OrderByAttribute orderByAttribute : orderByAttributeList) { orderBy.add(new QueryOrderByConfig( orderByAttribute.getVariable().getAttributeName(), orderByAttribute.getOrder().name())); } return orderBy; }
compiledSelectionList.append(SEPARATOR); } else { compiledSelectionList.append(WHITESPACE).append(order.toString()).append(SEPARATOR);
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof OrderByAttribute)) { return false; } OrderByAttribute that = (OrderByAttribute) o; if (order != null ? !order.equals(that.order) : that.order != null) { return false; } return variable != null ? variable.equals(that.variable) : that.variable == null; }
@Override public int hashCode() { int result = order != null ? order.hashCode() : 0; result = 31 * result + (variable != null ? variable.hashCode() : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof OrderByAttribute)) { return false; } OrderByAttribute that = (OrderByAttribute) o; if (order != null ? !order.equals(that.order) : that.order != null) { return false; } return variable != null ? variable.equals(that.variable) : that.variable == null; }
@Override public int hashCode() { int result = order != null ? order.hashCode() : 0; result = 31 * result + (variable != null ? variable.hashCode() : 0); return result; }