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

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

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

origin: org.avaje.ebeanorm/avaje-ebeanorm-server

private String parseInternal() {
  
  OrderBy<?> orderBy = query.getOrderBy();
  if (orderBy == null){
    return null;
  }
  
  StringBuilder sb = new StringBuilder();
  List<Property> properties = orderBy.getProperties();
  if (properties.isEmpty()){
    // order by clause removed by filterMany()
    return null;
  }
  for (int i = 0; i < properties.size(); i++) {
    if (i > 0){
      sb.append(", ");
    }
    Property p = properties.get(i);
    String expression = parseProperty(p);
    sb.append(expression);
  }
  return sb.toString();
}
 
origin: org.avaje.ebean/ebean

private String parseInternal() {
 OrderBy<?> orderBy = query.getOrderBy();
 if (orderBy == null) {
  return null;
 }
 StringBuilder sb = new StringBuilder();
 List<Property> properties = orderBy.getProperties();
 if (properties.isEmpty()) {
  // order by clause removed by filterMany()
  return null;
 }
 for (int i = 0; i < properties.size(); i++) {
  if (i > 0) {
   sb.append(", ");
  }
  Property p = properties.get(i);
  String expression = parseProperty(p);
  sb.append(expression);
 }
 return sb.toString();
}
origin: org.avaje/ebean

private String parseInternal() {
  
  OrderBy<?> orderBy = query.getOrderBy();
  if (orderBy == null){
    return null;
  }
  
  StringBuilder sb = new StringBuilder();
  List<Property> properties = orderBy.getProperties();
  if (properties.isEmpty()){
    // order by clause removed by filterMany()
    return null;
  }
  for (int i = 0; i < properties.size(); i++) {
    if (i > 0){
      sb.append(", ");
    }
    Property p = properties.get(i);
    String expression = parseProperty(p);
    sb.append(expression);
  }
  return sb.toString();
}
 
origin: org.avaje/ebean

public List<OrmQueryProperties> removeQueryJoins() {
  List<OrmQueryProperties> queryJoins =  detail.removeSecondaryQueries();
  if (queryJoins != null){
    if (orderBy != null){
      // remove any orderBy properties that relate to 
      // paths of the secondary queries
      for (int i = 0; i < queryJoins.size(); i++) {
        OrmQueryProperties joinPath = queryJoins.get(i);
        
        // loop through the orderBy properties and
        // move any ones related to the query join
        List<Property> properties = orderBy.getProperties();
        Iterator<Property> it = properties.iterator();
        while (it.hasNext()) {
          OrderBy.Property property = it.next();
          if (property.getProperty().startsWith(joinPath.getPath())){
            // remove this orderBy segment and 
            // add it to the secondary join
            it.remove();
            joinPath.addSecJoinOrderProperty(property);
          }
        }
      }
    }
  }
  return queryJoins;
}
 
origin: org.avaje.ebean/ebean

private List<OrmQueryProperties> removeQueryJoins() {
 List<OrmQueryProperties> queryJoins = detail.removeSecondaryQueries();
 if (queryJoins != null) {
  if (orderBy != null) {
   // remove any orderBy properties that relate to
   // paths of the secondary queries
   for (OrmQueryProperties joinPath : queryJoins) {
    // loop through the orderBy properties and
    // move any ones related to the query join
    List<Property> properties = orderBy.getProperties();
    Iterator<Property> it = properties.iterator();
    while (it.hasNext()) {
     Property property = it.next();
     if (property.getProperty().startsWith(joinPath.getPath())) {
      // remove this orderBy segment and
      // add it to the secondary join
      it.remove();
      joinPath.addSecJoinOrderProperty(property);
     }
    }
   }
  }
 }
 return queryJoins;
}
origin: org.avaje.ebeanorm/avaje-ebeanorm-server

public List<OrmQueryProperties> removeQueryJoins() {
  List<OrmQueryProperties> queryJoins =  detail.removeSecondaryQueries();
  if (queryJoins != null){
    if (orderBy != null){
      // remove any orderBy properties that relate to 
      // paths of the secondary queries
      for (int i = 0; i < queryJoins.size(); i++) {
        OrmQueryProperties joinPath = queryJoins.get(i);
        
        // loop through the orderBy properties and
        // move any ones related to the query join
        List<Property> properties = orderBy.getProperties();
        Iterator<Property> it = properties.iterator();
        while (it.hasNext()) {
          OrderBy.Property property = it.next();
          if (property.getProperty().startsWith(joinPath.getPath())){
            // remove this orderBy segment and 
            // add it to the secondary join
            it.remove();
            joinPath.addSecJoinOrderProperty(property);
          }
        }
      }
    }
  }
  return queryJoins;
}

origin: org.avaje.ebeanorm/avaje-ebeanorm-server

/**
 * Define the select and joins for this query.
 */
@SuppressWarnings("unchecked")
public void configureBeanQuery(SpiQuery<?> query) {
  if (trimmedProperties != null && trimmedProperties.length() > 0) {
    query.select(trimmedProperties);
    if (filterMany != null){
      query.setFilterMany(path, filterMany);
    }
  }
  if (secondaryChildren != null) {
    int trimPath = path.length() + 1;
    for (int i = 0; i < secondaryChildren.size(); i++) {
      OrmQueryProperties p = secondaryChildren.get(i);
      String path = p.getPath();
      path = path.substring(trimPath);
      query.fetch(path, p.getProperties(), p.getFetchConfig());
      query.setFilterMany(path, p.getFilterManyTrimPath(trimPath));
    }
  }
  
  if (orderBy != null){
    List<Property> orderByProps = orderBy.getProperties();
    for (int i = 0; i < orderByProps.size(); i++) {
      orderByProps.get(i).trim(path);
    }
    query.setOrder(orderBy);
  }
}
origin: org.avaje/ebean

/**
 * Define the select and joins for this query.
 */
@SuppressWarnings("unchecked")
public void configureBeanQuery(SpiQuery<?> query) {
  if (trimmedProperties != null && trimmedProperties.length() > 0) {
    query.select(trimmedProperties);
    if (filterMany != null){
      query.setFilterMany(path, filterMany);
    }
  }
  if (secondaryChildren != null) {
    int trimPath = path.length() + 1;
    for (int i = 0; i < secondaryChildren.size(); i++) {
      OrmQueryProperties p = secondaryChildren.get(i);
      String path = p.getPath();
      path = path.substring(trimPath);
      query.fetch(path, p.getProperties(), p.getFetchConfig());
      query.setFilterMany(path, p.getFilterManyTrimPath(trimPath));
    }
  }
  
  if (orderBy != null){
    List<Property> orderByProps = orderBy.getProperties();
    for (int i = 0; i < orderByProps.size(); i++) {
      orderByProps.get(i).trim(path);
    }
    query.setOrder(orderBy);
  }
}
origin: org.avaje.ebean/ebean

/**
 * Validate all the expression properties/paths given the bean descriptor.
 */
@Override
public Set<String> validate(BeanType<T> desc) {
 SpiExpressionValidation validation = new SpiExpressionValidation(desc);
 if (whereExpressions != null) {
  whereExpressions.validate(validation);
 }
 if (havingExpressions != null) {
  havingExpressions.validate(validation);
 }
 if (orderBy != null) {
  for (Property property : orderBy.getProperties()) {
   validation.validate(property.getProperty());
  }
 }
 return validation.getUnknownProperties();
}
com.avaje.ebeanOrderBygetProperties

Javadoc

Return the properties for this OrderBy.

Popular methods of OrderBy

  • <init>
  • add
    Add to the order by by parsing a raw expression.
  • copy
    Return a copy of the OrderBy.
  • hash
    Return a hash value for this OrderBy. This can be to determine logical equality for OrderBy clauses.
  • isAscending
  • 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

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top Vim plugins
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