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

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

Introduction

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

Prototype

public void add(final StringValue value) 

Source Link

Document

Adds a string value to this list as a string.

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
 * /*  w w w .j  a  v a2s .c  om*/
 * @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
 * //from  w  ww.j  av a2 s  . com
 * @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");
}