Tabnine Logo
OrderBy.isAscending
Code IndexAdd Tabnine to your IDE (free)

How to use
isAscending
method
in
com.avaje.ebean.OrderBy

Best Java code snippets using com.avaje.ebean.OrderBy.isAscending (Showing top 3 results out of 315)

origin: org.avaje/ebean

private Property parseProperty(String[] pairs) {
  if (pairs.length == 0) {
    return null;
  }
  ArrayList<String> wordList = new ArrayList<String>(pairs.length);
  for (int i = 0; i < pairs.length; i++) {
    if (!isEmptyString(pairs[i])) {
      wordList.add(pairs[i]);
    }
  }
  if (wordList.isEmpty()) {
    return null;
  }
  if (wordList.size() == 1) {
    return new Property(wordList.get(0), true);
  }
  if (wordList.size() == 2) {
    boolean asc = isAscending(wordList.get(1));
    return new Property(wordList.get(0), asc);
  }
  String m = "Expecting a max of 2 words in [" + Arrays.toString(pairs)
      + "] but got " + wordList.size();
  throw new RuntimeException(m);
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-api

private Property parseProperty(String[] pairs) {
 if (pairs.length == 0) {
  return null;
 }
 ArrayList<String> wordList = new ArrayList<String>(pairs.length);
 for (int i = 0; i < pairs.length; i++) {
  if (!isEmptyString(pairs[i])) {
   wordList.add(pairs[i]);
  }
 }
 if (wordList.isEmpty()) {
  return null;
 }
 if (wordList.size() == 1) {
  return new Property(wordList.get(0), true);
 }
 if (wordList.size() == 2) {
  boolean asc = isAscending(wordList.get(1));
  return new Property(wordList.get(0), asc);
 }
 String m = "Expecting a max of 2 words in [" + Arrays.toString(pairs)
   + "] but got " + wordList.size();
 throw new RuntimeException(m);
}
origin: org.avaje.ebean/ebean

private Property parseProperty(String[] pairs) {
 if (pairs.length == 0) {
  return null;
 }
 ArrayList<String> wordList = new ArrayList<>(pairs.length);
 for (String pair : pairs) {
  if (!isEmptyString(pair)) {
   wordList.add(pair);
  }
 }
 if (wordList.isEmpty()) {
  return null;
 }
 if (wordList.size() == 1) {
  return new Property(wordList.get(0), true);
 }
 if (wordList.size() == 2) {
  boolean asc = isAscending(wordList.get(1));
  return new Property(wordList.get(0), asc);
 }
 if (wordList.size() == 4) {
  // nulls high or nulls low as 3rd and 4th
  boolean asc = isAscending(wordList.get(1));
  return new Property(wordList.get(0), asc, wordList.get(2), wordList.get(3));
 }
 String m = "Expecting a 1, 2 or 4 words in [" + Arrays.toString(pairs) + "] but got " + wordList;
 throw new RuntimeException(m);
}
com.avaje.ebeanOrderByisAscending

Popular methods of OrderBy

  • <init>
  • add
    Add to the order by by parsing a raw expression.
  • copy
    Return a copy of the OrderBy.
  • getProperties
    Return the properties for this OrderBy.
  • hash
    Return a hash value for this OrderBy. This can be to determine logical equality for OrderBy clauses.
  • isEmptyString
  • parse
  • parseProperty
  • setQuery
    Associate this OrderBy with a query.
  • toStringFormat
    Returns the OrderBy in string format.
  • desc
    Add a property with descending order to this OrderBy.
  • hashCode
    Return a hash value for this OrderBy. This can be to determine logical equality for OrderBy clauses.
  • desc,
  • hashCode,
  • asc,
  • containsProperty,
  • copyWithTrim,
  • isEmpty

Popular in Java

  • Making http post requests using okhttp
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • From CI to AI: The AI layer in your organization
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