Interface PropertySelector<T,​S extends BaseSelector<T,​S>>

  • Type Parameters:
    T - the type of the object the specification applies to.
    S - the type of the selector.
    All Superinterfaces:
    BaseSelector<T,​S>
    All Known Subinterfaces:
    AggregateSelector<A,​I,​S>

    public interface PropertySelector<T,​S extends BaseSelector<T,​S>>
    extends BaseSelector<T,​S>
    An element of the SpecificationBuilder DSL to select a property of the object a specification will apply to.
    • Method Detail

      • property

        SpecificationPicker<T,​S> property​(String path)
        Selects a property of the object to be the subject of a specification. For instance, if an equality specification is chosen, the equality will only apply on the chosen property.

        Property path support the "dot" syntax to specify a property in a nested object. For instance, a "team.leader.name" property path can be specified, meaning that the attribute "name" of the attribute "leader" of the attribute "team" will be selected.

        Collection, Map or array properties are supported, with the semantics that at least one element must satisfy the specification.

        Parameters:
        path - the path of the the property to select.
        Returns:
        the next operation of the builder DSL, allowing to choose the specification.