![JAR search and dependency download from the Maven repository](/logo.png)
com.vaadin.v7.data.util.DefaultItemSorter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-compatibility-server Show documentation
Show all versions of vaadin-compatibility-server Show documentation
Vaadin 7 compatibility package for Vaadin 8
/*
* 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.v7.data.util;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import com.vaadin.data.provider.AbstractBackEndDataProvider;
import com.vaadin.data.provider.DataProvider;
import com.vaadin.data.provider.ListDataProvider;
import com.vaadin.data.provider.Query;
import com.vaadin.server.SerializableComparator;
import com.vaadin.v7.data.Container;
import com.vaadin.v7.data.Container.Sortable;
import com.vaadin.v7.data.Item;
import com.vaadin.v7.data.Property;
/**
* Provides a default implementation of an ItemSorter. The
* DefaultItemSorter
adheres to the
* {@link Sortable#sort(Object[], boolean[])} rules and sorts the container
* according to the properties given using
* {@link #setSortProperties(Sortable, Object[], boolean[])}.
*
* A Comparator is used for comparing the individual Property
* values. The comparator can be set using the constructor. If no comparator is
* provided a default comparator is used.
*
*
* @deprecated As of 8.0, sorting is integrated into {@link DataProvider} and {@link Query#getSortOrders()}.
* For in-memory case, you can use also {@link ListDataProvider#setSortComparator(SerializableComparator)}.
* For back-end DataProviders, see {@link AbstractBackEndDataProvider#setSortOrders(List)}.
*/
@Deprecated
public class DefaultItemSorter implements ItemSorter {
private Object[] sortPropertyIds;
private boolean[] sortDirections;
private Container container;
private Comparator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy