Tabnine Logo
Sort$Order.with
Code IndexAdd Tabnine to your IDE (free)

How to use
with
method
in
org.springframework.data.domain.Sort$Order

Best Java code snippets using org.springframework.data.domain.Sort$Order.with (Showing top 6 results out of 315)

origin: apache/servicemix-bundles

/**
 * Converts the given {@link OrderSpecifier} into an {@link Order}.
 *
 * @param orderSpecifier must not be {@literal null}.
 * @return
 */
private static Order toOrder(OrderSpecifier<?> orderSpecifier) {
  Assert.notNull(orderSpecifier, "Order specifier must not be null!");
  Expression<?> target = orderSpecifier.getTarget();
  Object targetElement = target instanceof Path ? preparePropertyPath((Path<?>) target) : target;
  Assert.notNull(targetElement, "Target element must not be null!");
  return Order.by(targetElement.toString()).with(orderSpecifier.isAscending() ? Direction.ASC : Direction.DESC);
}
origin: spring-projects/spring-data-r2dbc

@Override
public Sort getMappedSort(Class<?> typeToRead, Sort sort) {
  RelationalPersistentEntity<?> entity = getPersistentEntity(typeToRead);
  if (entity == null) {
    return sort;
  }
  List<Order> mappedOrder = new ArrayList<>();
  for (Order order : sort) {
    RelationalPersistentProperty persistentProperty = entity.getPersistentProperty(order.getProperty());
    if (persistentProperty == null) {
      mappedOrder.add(order);
    } else {
      mappedOrder
          .add(Order.by(persistentProperty.getColumnName()).with(order.getNullHandling()).with(order.getDirection()));
    }
  }
  return Sort.by(mappedOrder);
}
origin: org.springframework.data/spring-data-r2dbc

@Override
public Sort getMappedSort(Class<?> typeToRead, Sort sort) {
  RelationalPersistentEntity<?> entity = getPersistentEntity(typeToRead);
  if (entity == null) {
    return sort;
  }
  List<Order> mappedOrder = new ArrayList<>();
  for (Order order : sort) {
    RelationalPersistentProperty persistentProperty = entity.getPersistentProperty(order.getProperty());
    if (persistentProperty == null) {
      mappedOrder.add(order);
    } else {
      mappedOrder
          .add(Order.by(persistentProperty.getColumnName()).with(order.getNullHandling()).with(order.getDirection()));
    }
  }
  return Sort.by(mappedOrder);
}
origin: apache/servicemix-bundles

/**
 * Returns a {@link Order} with {@link NullHandling#NULLS_FIRST} as null handling hint.
 *
 * @return
 * @since 1.8
 */
public Order nullsFirst() {
  return with(NullHandling.NULLS_FIRST);
}
origin: apache/servicemix-bundles

/**
 * Returns a {@link Order} with {@link NullHandling#NATIVE} as null handling hint.
 *
 * @return
 * @since 1.7
 */
public Order nullsNative() {
  return with(NullHandling.NATIVE);
}
origin: apache/servicemix-bundles

/**
 * Returns a {@link Order} with {@link NullHandling#NULLS_LAST} as null handling hint.
 *
 * @return
 * @since 1.7
 */
public Order nullsLast() {
  return with(NullHandling.NULLS_LAST);
}
org.springframework.data.domainSort$Orderwith

Javadoc

Returns a new Order with the given Direction.

Popular methods of Sort$Order

  • getProperty
    Returns the property to order for.
  • getDirection
    Returns the order the property shall be sorted for.
  • <init>
  • isAscending
    Returns whether sorting for this property shall be ascending.
  • isIgnoreCase
  • getNullHandling
  • ignoreCase
  • by
  • desc
    Creates a new Order instance. Takes a single property. Direction is Direction#ASC and NullHandling N
  • asc
    Creates a new Order instance. Takes a single property. Direction is Direction#ASC and NullHandling N
  • isDescending
    Returns whether sorting for this property shall be descending.
  • withProperty
  • isDescending,
  • withProperty

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now