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

com.vaadin.data.provider.GridSortOrderBuilder 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;
import com.vaadin.ui.Grid.Column;

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

    @Override
    public GridSortOrderBuilder thenAsc(Column by) {
        return (GridSortOrderBuilder) super.thenAsc(by);
    }

    @Override
    public GridSortOrderBuilder thenDesc(Column by) {
        return (GridSortOrderBuilder) super.thenDesc(by);
    }

    @Override
    protected GridSortOrder createSortOrder(Column by,
            SortDirection direction) {
        return new GridSortOrder<>(by, direction);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy