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

com.kenshoo.pl.entity.spi.AncestorsValidator Maven / Gradle / Ivy

Go to download

A Java persistence layer based on JOOQ for high performance and business flow support.

There is a newer version: 0.1.121-jooq-3.16.3
Show newest version
package com.kenshoo.pl.entity.spi;

import com.kenshoo.pl.entity.*;

import java.util.stream.Stream;

public interface AncestorsValidator extends ChangeValidator {

    /**
     * @return the fields of the ancestor entities whose value is required for the validation
     */
    Stream> ancestorsFields();

    /**
     * Called by the framework to check if the change is restricted by ancestors. The implementation can query the entity only for
     * the fields it has declared in {@link #ancestorsFields()}.
     *
     * @param ancestorsFieldsState ancestor's fields
     *
     * @return a validation error if any, null if none
     */
    ValidationError validate(CurrentEntityState ancestorsFieldsState);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy