/** * Appends the Id property to the OrderBy clause if it is not believed * to be already contained in the order by. * <p> * This is primarily used for paging queries to ensure that an order by clause is provided and that the order by * provides unique ordering of the rows (so that the paging is predicable). * </p> */ public void appendOrderById(SpiQuery<T> query) { if (idProperty != null && !idProperty.isEmbedded() && !query.order().containsProperty(idProperty.getName())) { query.order().asc(idProperty.getName()); } }
/** * Appends the Id property to the OrderBy clause if it is not believed * to be already contained in the order by. * <p> * This is primarily used for paging queries to ensure that an order by clause is provided and that the order by * provides unique ordering of the rows (so that the paging is predicable). * </p> */ public void appendOrderById(SpiQuery<T> query) { if (idProperty != null && !idProperty.isEmbedded() && !query.order().containsProperty(idProperty.getName())) { query.order().asc(idProperty.getName()); } }