/** * Move a OrderBy.Property from the main query to this query join. */ @SuppressWarnings("rawtypes") public void addSecJoinOrderProperty(OrderBy.Property orderProp) { if (orderBy == null){ orderBy = new OrderBy(); } orderBy.add(orderProp); }
/** * Move a OrderBy.Property from the main query to this query join. */ @SuppressWarnings("rawtypes") void addSecJoinOrderProperty(OrderBy.Property orderProp) { if (orderBy == null) { orderBy = new OrderBy(); } orderBy.add(orderProp); }
/** * Move a OrderBy.Property from the main query to this query join. */ @SuppressWarnings("rawtypes") public void addSecJoinOrderProperty(OrderBy.Property orderProp) { if (orderBy == null){ orderBy = new OrderBy(); } orderBy.add(orderProp); }
/** * Return a copy of the OrderBy. */ public OrderBy<T> copy() { OrderBy<T> copy = new OrderBy<T>(); for (int i = 0; i < list.size(); i++) { copy.add(list.get(i).copy()); } return copy; }
/** * Return a copy of the OrderBy. */ public OrderBy<T> copy() { OrderBy<T> copy = new OrderBy<T>(); for (int i = 0; i < list.size(); i++) { copy.add(list.get(i).copy()); } return copy; }
/** * Return a copy of the OrderBy. */ public OrderBy<T> copy() { OrderBy<T> copy = new OrderBy<>(); for (Property aList : list) { copy.add(aList.copy()); } return copy; }
@Override public void enterOrderby_property(EQLParser.Orderby_propertyContext ctx) { int childCount = ctx.getChildCount(); String path = child(ctx, 0); boolean asc = true; String nulls = null; String nullsFirstLast = null; if (childCount == 3) { asc = child(ctx, 1).startsWith(ASC); nullsFirstLast = ctx.getChild(2).getChild(1).getText(); nulls = NULLS; } else if (childCount == 2) { String firstChild = child(ctx, 1); if (firstChild.startsWith(NULLS)) { nullsFirstLast = ctx.getChild(1).getChild(1).getText(); nulls = NULLS; } else { asc = firstChild.startsWith(ASC); } } query.orderBy().add(new OrderBy.Property(path, asc, nulls, nullsFirstLast)); }