Package com.mysema.query.types

Examples of com.mysema.query.types.OrderSpecifier


   * @return
   */
  @SuppressWarnings({ "rawtypes", "unchecked" })
  private OrderSpecifier<?> toOrderSpecifier(Order order, JPQLQuery query) {

    return new OrderSpecifier(order.isAscending() ? com.mysema.query.types.Order.ASC
        : com.mysema.query.types.Order.DESC, buildOrderPropertyPathFrom(order),
        toQueryDslNullHandling(order.getNullHandling()));
  }
View Full Code Here


        ArgumentCaptor<OrderSpecifier> orderArgument = ArgumentCaptor.forClass(OrderSpecifier.class);
        verify(personRepositoryMock, times(1)).findAll(any(BooleanExpression.class), orderArgument.capture());

        verifyNoMoreInteractions(personRepositoryMock);

        OrderSpecifier actualOrder = orderArgument.getValue();
        assertEquals(Order.ASC, actualOrder.getOrder());
        assertEquals(QPerson.person.lastName, actualOrder.getTarget());

        assertEquals(expected, actual);
    }
View Full Code Here

    }

    public final T orderBy(OrderSpecifier<?> spec) {
        Expression<?> e = convert(spec.getTarget(), true);
        if (!spec.getTarget().equals(e)) {
            metadata.addOrderBy(new OrderSpecifier(spec.getOrder(), e));
        } else {
            metadata.addOrderBy(spec);
        }
        return self;
    }
View Full Code Here

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private OrderSpecifier<?> toOrder(Order order) {

    Expression<Object> property = builder.get(order.getProperty());

    return new OrderSpecifier(order.isAscending() ? com.mysema.query.types.Order.ASC
        : com.mysema.query.types.Order.DESC, property);
  }
View Full Code Here

TOP

Related Classes of com.mysema.query.types.OrderSpecifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.