Tabnine Logo
Sort$NullHandling.equals
Code IndexAdd Tabnine to your IDE (free)

How to use
equals
method
in
org.springframework.data.domain.Sort$NullHandling

Best Java code snippets using org.springframework.data.domain.Sort$NullHandling.equals (Showing top 10 results out of 315)

origin: apache/servicemix-bundles

@Override
public boolean equals(@Nullable Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof Order)) {
    return false;
  }
  Order that = (Order) obj;
  return this.direction.equals(that.direction) && this.property.equals(that.property)
      && this.ignoreCase == that.ignoreCase && this.nullHandling.equals(that.nullHandling);
}
origin: apache/servicemix-bundles

  @Override
  public String toString() {
    String result = String.format("%s: %s", property, direction);
    if (!NullHandling.NATIVE.equals(nullHandling)) {
      result += ", " + nullHandling;
    }
    if (ignoreCase) {
      result += ", ignoring case";
    }
    return result;
  }
}
origin: org.springframework.data/spring-data-keyvalue

if (!NullHandling.NATIVE.equals(order.getNullHandling())) {
  spelSort = NullHandling.NULLS_FIRST.equals(order.getNullHandling()) ? spelSort.nullsFirst()
      : spelSort.nullsLast();
origin: spring-projects/spring-data-keyvalue

if (!NullHandling.NATIVE.equals(order.getNullHandling())) {
  spelSort = NullHandling.NULLS_FIRST.equals(order.getNullHandling()) ? spelSort.nullsFirst()
      : spelSort.nullsLast();
origin: apache/servicemix-bundles

if (!NullHandling.NATIVE.equals(order.getNullHandling())) {
  spelSort = NullHandling.NULLS_FIRST.equals(order.getNullHandling()) ? spelSort.nullsFirst()
      : spelSort.nullsLast();
origin: mmnaseri/spring-data-mock

/**
 * Given a sort parameter from the Spring Data framework, will determine the appropriate sort metadata compatible
 * with this framework
 * @param sort    the sort specification
 * @return converted sort metadata
 */
protected Sort getSort(org.springframework.data.domain.Sort sort) {
  final List<Order> orders = new ArrayList<>();
  for (org.springframework.data.domain.Sort.Order order : sort) {
    final SortDirection sortDirection = order.getDirection().equals(ASC) ? SortDirection.ASCENDING : SortDirection.DESCENDING;
    final NullHandling nullHandling = order.getNullHandling().equals(NULLS_FIRST) ? NullHandling.NULLS_FIRST : (order.getNullHandling().equals(NULLS_LAST) ? NullHandling.NULLS_LAST : NullHandling.DEFAULT);
    orders.add(new ImmutableOrder(sortDirection, order.getProperty(), nullHandling));
  }
  return new ImmutableSort(orders);
}
origin: org.bremersee/bremersee-comparator

/**
 * Transforms a {@code Sort.Order} object into a comparator item.
 * 
 * @param sortOrder
 *            the {@code Sort.Order} object
 * @return the comparator item
 */
public static ComparatorItem fromSortOrder(Sort.Order sortOrder) {
  if (sortOrder == null || sortOrder.getProperty() == null || sortOrder.getProperty().trim().length() == 0) {
    return null;
  }
  boolean nullIsFirst = Sort.NullHandling.NULLS_FIRST.equals(sortOrder.getNullHandling());
  return new ComparatorItem(sortOrder.getProperty(), sortOrder.isAscending(), sortOrder.isIgnoreCase(),
      nullIsFirst);
}
origin: org.springframework.cloud/spring-cloud-gcp-data-datastore

private static StructuredQuery.OrderBy createOrderBy(DatastorePersistentEntity<?> persistentEntity,
    Sort.Order order) {
  if (order.isIgnoreCase()) {
    throw new DatastoreDataException("Datastore doesn't support sorting ignoring case");
  }
  if (!order.getNullHandling().equals(Sort.NullHandling.NATIVE)) {
    throw new DatastoreDataException("Datastore supports only NullHandling.NATIVE null handling");
  }
  return new StructuredQuery.OrderBy(
      persistentEntity.getPersistentProperty(order.getProperty()).getFieldName(),
      (order.getDirection() == Sort.Direction.DESC)
          ? StructuredQuery.OrderBy.Direction.DESCENDING
          : StructuredQuery.OrderBy.Direction.ASCENDING);
}
origin: spring-cloud/spring-cloud-gcp

private static StructuredQuery.OrderBy createOrderBy(DatastorePersistentEntity<?> persistentEntity,
    Sort.Order order) {
  if (order.isIgnoreCase()) {
    throw new DatastoreDataException("Datastore doesn't support sorting ignoring case");
  }
  if (!order.getNullHandling().equals(Sort.NullHandling.NATIVE)) {
    throw new DatastoreDataException("Datastore supports only NullHandling.NATIVE null handling");
  }
  return new StructuredQuery.OrderBy(
      persistentEntity.getPersistentProperty(order.getProperty()).getFieldName(),
      (order.getDirection() == Sort.Direction.DESC)
          ? StructuredQuery.OrderBy.Direction.DESCENDING
          : StructuredQuery.OrderBy.Direction.ASCENDING);
}
origin: com.mmnaseri.utils/spring-data-mock

/**
 * Given a sort parameter from the Spring Data framework, will determine the appropriate sort metadata compatible
 * with this framework
 * @param sort    the sort specification
 * @return converted sort metadata
 */
protected Sort getSort(org.springframework.data.domain.Sort sort) {
  final List<Order> orders = new ArrayList<>();
  for (org.springframework.data.domain.Sort.Order order : sort) {
    final SortDirection sortDirection = order.getDirection().equals(ASC) ? SortDirection.ASCENDING : SortDirection.DESCENDING;
    final NullHandling nullHandling = order.getNullHandling().equals(NULLS_FIRST) ? NullHandling.NULLS_FIRST : (order.getNullHandling().equals(NULLS_LAST) ? NullHandling.NULLS_LAST : NullHandling.DEFAULT);
    orders.add(new ImmutableOrder(sortDirection, order.getProperty(), nullHandling));
  }
  return new ImmutableSort(orders);
}
org.springframework.data.domainSort$NullHandlingequals

Popular methods of Sort$NullHandling

  • hashCode

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Top 12 Jupyter Notebook extensions
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