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>
    Creates a new Order instance. if order is null then order defaults to Sort#DEFAULT_DIRECTION
  • 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

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Socket (java.net)
    Provides a client-side TCP socket.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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