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

org.seedstack.business.pagination.dsl.KeyValuePicker Maven / Gradle / Ivy

/*
 * Copyright © 2013-2024, The SeedStack authors 
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package org.seedstack.business.pagination.dsl;

import org.seedstack.business.pagination.Slice;

/**
 * An element of the {@link Paginator} DSL allowing to specify the value used as boundary in the
 * case of a key-based pagination.
 *
 * @param  the type of the paginated object.
 */
public interface KeyValuePicker {

    /**
     * Specify the value used as upper-boundary of the previously specified attribute. Objects having
     * an attribute value that is greater than or equal to specified value will be skipped.
     *
     * @param value the value used as upper-boundary.
     * @param    the type of the value.
     * @return the next operation of the paginator DSL, allowing to specify a limit to the number of
     * objects returned.
     */
    > LimitPicker, T> before(C value);

    /**
     * Specify the value used as lower-boundary of the previously specified attribute. Objects having
     * an attribute value that is less than or equal to specified value will be skipped.
     *
     * @param value the value used as lower-boundary.
     * @param    the type of the value.
     * @return the next operation of the paginator DSL, allowing to specify a limit to the number of
     * objects returned.
     */
    > LimitPicker, T> after(C value);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy