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

com.vaadin.data.provider.QuerySortOrderBuilder Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.data.provider;

import com.vaadin.shared.data.sort.SortDirection;

/**
 * Helper classes with fluent API for constructing {@link QuerySortOrder} lists.
 * When the sort order is ready to be passed on, calling {@link #build()} will
 * create the list of sort orders.
 *
 * @see QuerySortOrder
 * @see #thenDesc(String)
 * @see #thenDesc(String)
 * @see #build()
 * @since 8.0
 */
public class QuerySortOrderBuilder
        extends SortOrderBuilder {

    @Override
    public QuerySortOrderBuilder thenAsc(String by) {
        return (QuerySortOrderBuilder) super.thenAsc(by);
    }

    @Override
    public QuerySortOrderBuilder thenDesc(String by) {
        return (QuerySortOrderBuilder) super.thenDesc(by);
    }

    @Override
    protected QuerySortOrder createSortOrder(String by,
            SortDirection direction) {
        return new QuerySortOrder(by, direction);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy