Example usage for org.apache.wicket.util.string StringList join

List of usage examples for org.apache.wicket.util.string StringList join

Introduction

In this page you can find the example usage for org.apache.wicket.util.string StringList join.

Prototype

public final String join() 

Source Link

Document

Joins this sequence of strings using a comma separator.

Usage

From source file:com.locke.library.persistence.dao.jpa.JpaQuery.java

License:Apache License

/**
 * Override this method to provide multi-level sorting for a field
 * //from  w ww  .  ja  v  a  2  s. co m
 * @param ascending
 *            Order by clause
 */
protected void onAscending(final Ascending ascending) {
    final StringList fields = new StringList();
    for (final String field : ascending.getFields()) {
        fields.add("target." + field);
    }
    this.queryText.add("order by " + fields.join() + " asc");
}

From source file:com.locke.library.persistence.dao.jpa.JpaQuery.java

License:Apache License

/**
 * Override this method to provide multi-level sorting for a field
 * /* w  w  w.  j  a va 2s .c  o  m*/
 * @param descending
 *            Order by clause
 */
protected void onDescending(final Descending descending) {
    final StringList fields = new StringList();
    for (final String field : descending.getFields()) {
        fields.add("target." + field);
    }
    this.queryText.add("order by " + fields.join() + " desc");
}