/** * Append an order object to the end of the order list. * * @param order * the order object to append * @return whether it was added (true if added, false if already * exists/ignored) */ boolean append(final Order order) { if (m_orders.add(order)) { m_lastAttribute = order.getAttribute(); return true; } else { m_lastAttribute = null; return false; } }
/** * Append an order object to the end of the order list. * * @param order * the order object to append * @return whether it was added (true if added, false if already * exists/ignored) */ boolean append(final Order order) { if (m_orders.add(order)) { m_lastAttribute = order.getAttribute(); return true; } else { m_lastAttribute = null; return false; } }
public void asc() { synchronized (m_orders) { if (m_orders.isEmpty()) { LOG.debug("asc() called, but no orderBy has been specified."); } else if (m_lastAttribute == null) { LOG.debug("asc() called on an attribute that can't be changed."); } else { for (final Order o : m_orders) { if (o.getAttribute().equals(m_lastAttribute)) { m_orders.remove(o); m_orders.add(Order.asc(m_lastAttribute)); break; } } } } }
public void desc() { synchronized (m_orders) { if (m_orders.isEmpty()) { LOG.debug("desc() called, but no orderBy has been specified."); } else if (m_lastAttribute == null) { LOG.debug("desc() called on an attribute that can't be changed."); } else { for (final Order o : m_orders) { if (o.getAttribute().equals(m_lastAttribute)) { m_orders.remove(o); m_orders.add(Order.desc(m_lastAttribute)); break; } } } } }
public void asc() { synchronized (m_orders) { if (m_orders.isEmpty()) { LOG.debug("asc() called, but no orderBy has been specified."); } else if (m_lastAttribute == null) { LOG.debug("asc() called on an attribute that can't be changed."); } else { for (final Order o : m_orders) { if (o.getAttribute().equals(m_lastAttribute)) { m_orders.remove(o); m_orders.add(Order.asc(m_lastAttribute)); break; } } } } }
public void desc() { synchronized (m_orders) { if (m_orders.isEmpty()) { LOG.debug("desc() called, but no orderBy has been specified."); } else if (m_lastAttribute == null) { LOG.debug("desc() called on an attribute that can't be changed."); } else { for (final Order o : m_orders) { if (o.getAttribute().equals(m_lastAttribute)) { m_orders.remove(o); m_orders.add(Order.desc(m_lastAttribute)); break; } } } } }
public void visit(final OrderVisitor visitor) { visitor.visitAttribute(getAttribute()); visitor.visitAscending(asc()); }
public void visit(final OrderVisitor visitor) { visitor.visitAttribute(getAttribute()); visitor.visitAscending(asc()); }
entityCriteria.addOrder(org.hibernate.criterion.Order.asc(eachOnmsOrder.getAttribute())); } else { entityCriteria.addOrder(org.hibernate.criterion.Order.desc(eachOnmsOrder.getAttribute()));
entityCriteria.addOrder(org.hibernate.criterion.Order.asc(eachOnmsOrder.getAttribute())); } else { entityCriteria.addOrder(org.hibernate.criterion.Order.desc(eachOnmsOrder.getAttribute()));