All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.hasor.db.jsqlparser.expression.OrderByClause Maven / Gradle / Ivy

There is a newer version: 4.3.5
Show newest version
/*-
 * #%L
 * JSQLParser library
 * %%
 * Copyright (C) 2004 - 2019 JSQLParser
 * %%
 * Dual licensed under GNU LGPL 2.1 or Apache License 2.0
 * #L%
 */
package net.sf.jsqlparser.expression;

import net.sf.jsqlparser.statement.select.OrderByElement;

import java.util.List;

public class OrderByClause {
    private List orderByElements;

    public List getOrderByElements() {
        return orderByElements;
    }

    public void setOrderByElements(List orderByElements) {
        this.orderByElements = orderByElements;
    }

    void toStringOrderByElements(StringBuilder b) {
        if (orderByElements != null && !orderByElements.isEmpty()) {
            b.append("ORDER BY ");
            for (int i = 0; i < orderByElements.size(); i++) {
                if (i > 0) {
                    b.append(", ");
                }
                b.append(orderByElements.get(i).toString());
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy