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

org.seedstack.business.specification.dsl.AggregateSelector 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.specification.dsl;

import org.seedstack.business.domain.AggregateRoot;

/**
 * An element of the {@link SpecificationBuilder} DSL to select the identity of the aggregate a
 * clause will apply to.
 *
 * @param  the type of the aggregate
 * @param  the type of the identifier of the aggregate.
 * @param  the type of the selector.
 */
public interface AggregateSelector, I, S extends AggregateSelector> extends
        PropertySelector {

    /**
     * Selects the identity of the aggregate to be the subject of a specification.
     *
     * @return the next operation of the builder DSL, allowing to choose the specification.
     */
    IdentityPicker identity();
}