com.holonplatform.core.property

## Interface PathProperty<T>

- Type Parameters:
    `T` - Property value type
  All Superinterfaces:
    Expression, Localizable, Path<T>, PathExpression<T>, Property<T>, QueryExpression<T>, QueryProjection<T>, Serializable, Validator.Validatable<T>
  All Known Subinterfaces:
    BeanProperty<T>, BeanProperty.Builder<T>, PathProperty.PathPropertyBuilder<T>

      public interface PathProperty<T>
      extends Property<T>, PathExpression<T>, QueryProjection<T>

  A `Property` bound to a `Path`, using `Path.getName()` as property name.

  This property can be used as `QueryExpression` and `QueryProjection`, and provides useful methods to create query clauses such as filters, sorts and aggregations.

  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `PathProperty.Builder<T,B extends PathProperty.Builder<T,B>>` Base interface for `PathProperty` building.
    `static interface` | `PathProperty.PathPropertyBuilder<T>` `PathProperty` builder.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.property.Property

      `Property.PropertyAccessException, Property.PropertyNotFoundException, Property.PropertyReadException, Property.PropertyReadOnlyException, Property.PropertyWriteException`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.i18n.Localizable

      `Localizable.LocalizableBuilder, Localizable.LocalizationException`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Path

      `Path.FinalPath<T>, Path.PathBuilder<T>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.Expression

      `Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.core.Path

      `PATH_HIERARCHY_SEPARATOR`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default QuerySort` | `asc()` Build a `QuerySort.SortDirection.ASCENDING` sort using this property.
    `default FunctionExpression.PathFunctionExpressionProperty<T,Double>` | `avg()` Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Avg` function, which returns the average value of the property.
    `default QueryFilter` | `between(T from, T to)` Build a `QueryFilter.FilterOperator.BETWEEN` filter using this property as expression, which checks if property value is between given `from` and `to` values.
    `PathProperty.PathPropertyBuilder<T>` | `clone()` Clone this property.
    `default QueryFilter` | `contains(String value)` Build a contains query filter, checking if the property value contains given value, in a case-sentive fashion.
    `default QueryFilter` | `contains(String value, boolean ignoreCase)` Build a contains query filter, checking if the property value contains given value.
    `default QueryFilter` | `containsIgnoreCase(String value)` Build a contains query filter, checking if the property value contains given value, ignoring case.
    `default FunctionExpression.PathFunctionExpressionProperty<T,Long>` | `count()` Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Count` function, which returns the count of the values of the property.
    `static <T> PathProperty.PathPropertyBuilder<T>` | `create(Path<T> path)` Create a new `PathProperty` from given `path`, using given `Path` `name` and `type`.
    `static <T> PathProperty.PathPropertyBuilder<T>` | `create(String name, Class<? extends T> type)` Create a new `PathProperty` with given `name` and `type`.
    `default QuerySort` | `desc()` Build a `QuerySort.SortDirection.DESCENDING` sort using this property.
    `default QueryFilter` | `endsWith(String value)` Build a ends with query filter, checking if the property value ends with given value, in a case-sentive fashion.
    `default QueryFilter` | `endsWith(String value, boolean ignoreCase)` Build a ends with query filter, checking if the property value ends with given value.
    `default QueryFilter` | `endsWithIgnoreCase(String value)` Build a ends with query filter, checking if the property value ends with given value, ignoring case.
    `default QueryFilter` | `eq(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.EQUAL` filter using this property as expression, which checks if property value is equal to given `expression` value.
    `default QueryFilter` | `eq(T value)` Build a `QueryFilter.FilterOperator.EQUAL` filter using this property as expression, which checks if property value is equal to given constant value.
    `default QueryFilter` | `goe(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.GREATER_OR_EQUAL` filter using this property as expression, which checks if property value is greater than or equal to given `expression` value.
    `default QueryFilter` | `goe(T value)` Build a `QueryFilter.FilterOperator.GREATER_OR_EQUAL` filter using this property as expression, which checks if property value is greater than or equal to given constant value.
    `default QueryFilter` | `gt(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.GREATER_THAN` filter using this property as expression, which checks if property value is greater than given `expression` value.
    `default QueryFilter` | `gt(T value)` Build a `QueryFilter.FilterOperator.GREATER_THAN` filter using this property as expression, which checks if property value is greater than given constant value.
    `default QueryFilter` | `in(Collection<T> values)` Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given constant values.
    `default QueryFilter` | `in(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given `expression` values.
    `default QueryFilter` | `in(T... values)` Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given constant values.
    `default QueryFilter` | `isNotNull()` Build a `QueryFilter.FilterOperator.NOT_NULL` filter using this property as expression, which checks if property value is not `null`.
    `default QueryFilter` | `isNull()` Build a `QueryFilter.FilterOperator.NULL` filter using this property as expression, which checks if property value is `null`.
    `default boolean` | `isReadOnly()` Gets whether property is read-only, i.e. does not support value setting.
    `default QueryFilter` | `loe(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.LESS_OR_EQUAL` filter using this property as expression, which checks if property value is less than or equal to given `expression` value.
    `default QueryFilter` | `loe(T value)` Build a `QueryFilter.FilterOperator.LESS_OR_EQUAL` filter using this property as expression, which checks if property value is less than or equal to given constant value.
    `default QueryFilter` | `lt(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.LESS_THAN` filter using this property as expression, which checks if property value is less than given `expression` value.
    `default QueryFilter` | `lt(T value)` Build a `QueryFilter.FilterOperator.LESS_THAN` filter using this property as expression, which checks if property value is less than given constant value.
    `default FunctionExpression.PathFunctionExpressionProperty<T,T>` | `max()` Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Max` function, which returns the largest value of the property.
    `default FunctionExpression.PathFunctionExpressionProperty<T,T>` | `min()` Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Min` function, which returns the smallest value of the property.
    `default QueryFilter` | `neq(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.NOT_EQUAL` filter using this property as expression, which checks if property value is not equal to given `expression` value.
    `default QueryFilter` | `neq(T value)` Build a `QueryFilter.FilterOperator.NOT_EQUAL` filter using this property as expression, which checks if property value is not equal to given constant value.
    `default QueryFilter` | `nin(Collection<T> values)` Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given constant values.
    `default QueryFilter` | `nin(QueryExpression<? super T> expression)` Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given `expression` values.
    `default QueryFilter` | `nin(T... values)` Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given constant values.
    `default QueryFilter` | `startsWith(String value)` Build a starts with query filter, checking if the property value starts with given value, in a case-sentive fashion.
    `default QueryFilter` | `startsWith(String value, boolean ignoreCase)` Build a starts with query filter, checking if the property value starts with given value.
    `default QueryFilter` | `startsWithIgnoreCase(String value)` Build a starts with query filter, checking if the property value starts with given value, ignoring case.
    `default FunctionExpression.PathFunctionExpressionProperty<T,T>` | `sum()` Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Sum` function, which returns the sum of the property values.

    - ### Methods inherited from interface com.holonplatform.core.property.Property

      `getConfiguration, getConvertedValue, getConverter, getType, present, render, renderIfAvailable`

    - ### Methods inherited from interface com.holonplatform.core.Validator.Validatable

      `getValidators, validate`

    - ### Methods inherited from interface com.holonplatform.core.i18n.Localizable

      `builder, getMessage, getMessageArguments, getMessageCode`

    - ### Methods inherited from interface com.holonplatform.core.query.PathExpression

      `from`

    - ### Methods inherited from interface com.holonplatform.core.Path

      `fullName, getName, getParent, getType, isRootPath, of, relativeName, stream`

    - ### Methods inherited from interface com.holonplatform.core.query.QueryExpression

      `getType`

    - ### Methods inherited from interface com.holonplatform.core.Expression

      `validate`

    - ### Methods inherited from interface com.holonplatform.core.query.QueryProjection

      `getType`

- - ### Method Detail

    - #### isReadOnly

          default boolean isReadOnly()

      Description copied from interface: `Property`
      Gets whether property is read-only, i.e. does not support value setting.

      When a property is read-only, a `Property.PropertyReadOnlyException` should be thrown by property value setting methods.

      Specified by:
        `isReadOnly` in interface `Property<T>`
      Returns:
        `true` if property is read-only

    - #### clone

          PathProperty.PathPropertyBuilder<T> clone()

      Clone this property.
      Returns:
        A new `PathProperty.PathPropertyBuilder` using property name, type and configuration cloned from this property

    - #### create

          static <T> PathProperty.PathPropertyBuilder<T> create(String name,
                                                                Class<? extends T> type)

      Create a new `PathProperty` with given `name` and `type`.
      Specified by:
        `create` in interface `PathExpression<T>`
      Type Parameters:
        `T` - Property (path) type
      Parameters:
        `name` - Property name (not null)
        `type` - Property value type (not null)
      Returns:
        `PathProperty` builder

    - #### create

          static <T> PathProperty.PathPropertyBuilder<T> create(Path<T> path)

      Create a new `PathProperty` from given `path`, using given `Path` `name` and `type`.
      Type Parameters:
        `T` - Property (path) type
      Parameters:
        `path` - Path from which to obtain the property path name and type (not null)
      Returns:
        `PathProperty` builder

    - #### isNull

          default QueryFilter isNull()

      Build a `QueryFilter.FilterOperator.NULL` filter using this property as expression, which checks if property value is `null`.
      Returns:
        QueryFilter

    - #### isNotNull

          default QueryFilter isNotNull()

      Build a `QueryFilter.FilterOperator.NOT_NULL` filter using this property as expression, which checks if property value is not `null`.
      Returns:
        QueryFilter

    - #### eq

          default QueryFilter eq(T value)

      Build a `QueryFilter.FilterOperator.EQUAL` filter using this property as expression, which checks if property value is equal to given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### eq

          default QueryFilter eq(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.EQUAL` filter using this property as expression, which checks if property value is equal to given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### neq

          default QueryFilter neq(T value)

      Build a `QueryFilter.FilterOperator.NOT_EQUAL` filter using this property as expression, which checks if property value is not equal to given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### neq

          default QueryFilter neq(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.NOT_EQUAL` filter using this property as expression, which checks if property value is not equal to given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### lt

          default QueryFilter lt(T value)

      Build a `QueryFilter.FilterOperator.LESS_THAN` filter using this property as expression, which checks if property value is less than given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### lt

          default QueryFilter lt(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.LESS_THAN` filter using this property as expression, which checks if property value is less than given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### loe

          default QueryFilter loe(T value)

      Build a `QueryFilter.FilterOperator.LESS_OR_EQUAL` filter using this property as expression, which checks if property value is less than or equal to given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### loe

          default QueryFilter loe(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.LESS_OR_EQUAL` filter using this property as expression, which checks if property value is less than or equal to given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### gt

          default QueryFilter gt(T value)

      Build a `QueryFilter.FilterOperator.GREATER_THAN` filter using this property as expression, which checks if property value is greater than given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### gt

          default QueryFilter gt(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.GREATER_THAN` filter using this property as expression, which checks if property value is greater than given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### goe

          default QueryFilter goe(T value)

      Build a `QueryFilter.FilterOperator.GREATER_OR_EQUAL` filter using this property as expression, which checks if property value is greater than or equal to given constant value.
      Parameters:
        `value` - Filter value (not null)
      Returns:
        QueryFilter

    - #### goe

          default QueryFilter goe(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.GREATER_OR_EQUAL` filter using this property as expression, which checks if property value is greater than or equal to given `expression` value.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### in

          default QueryFilter in(T... values)

      Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given constant values.
      Parameters:
        `values` - Filter values (not null)
      Returns:
        QueryFilter

    - #### in

          default QueryFilter in(Collection<T> values)

      Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given constant values.
      Parameters:
        `values` - Filter values (not null)
      Returns:
        QueryFilter

    - #### in

          default QueryFilter in(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.IN` filter using this property as expression, which checks if property value is included in given `expression` values.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### nin

          default QueryFilter nin(T... values)

      Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given constant values.
      Parameters:
        `values` - Filter values (not null)
      Returns:
        QueryFilter

    - #### nin

          default QueryFilter nin(Collection<T> values)

      Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given constant values.
      Parameters:
        `values` - Filter values (not null)
      Returns:
        QueryFilter

    - #### nin

          default QueryFilter nin(QueryExpression<? super T> expression)

      Build a `QueryFilter.FilterOperator.NOT_IN` filter using this property as expression, which checks if property value is not included in given `expression` values.
      Parameters:
        `expression` - Right operand expression (not null)
      Returns:
        QueryFilter

    - #### between

          default QueryFilter between(T from,
                                      T to)

      Build a `QueryFilter.FilterOperator.BETWEEN` filter using this property as expression, which checks if property value is between given `from` and `to` values.
      Parameters:
        `from` - From value (not null)
        `to` - To value (not null)
      Returns:
        QueryFilter

    - #### contains

          default QueryFilter contains(String value,
                                       boolean ignoreCase)

      Build a contains query filter, checking if the property value contains given value.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value which must be contained in expression value
        `ignoreCase` - Whether to ignore case
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### startsWith

          default QueryFilter startsWith(String value,
                                         boolean ignoreCase)

      Build a starts with query filter, checking if the property value starts with given value.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must start with
        `ignoreCase` - Whether to ignore case
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### endsWith

          default QueryFilter endsWith(String value,
                                       boolean ignoreCase)

      Build a ends with query filter, checking if the property value ends with given value.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must end with
        `ignoreCase` - Whether to ignore case
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### contains

          default QueryFilter contains(String value)

      Build a contains query filter, checking if the property value contains given value, in a case-sentive fashion.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value which must be contained in expression value
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### containsIgnoreCase

          default QueryFilter containsIgnoreCase(String value)

      Build a contains query filter, checking if the property value contains given value, ignoring case.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value which must be contained in expression value
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### startsWith

          default QueryFilter startsWith(String value)

      Build a starts with query filter, checking if the property value starts with given value, in a case-sentive fashion.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must start with
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### startsWithIgnoreCase

          default QueryFilter startsWithIgnoreCase(String value)

      Build a starts with query filter, checking if the property value starts with given value, ignoring case.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must start with
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### endsWith

          default QueryFilter endsWith(String value)

      Build a ends with query filter, checking if the property value ends with given value, in a case-sentive fashion.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must end with
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### endsWithIgnoreCase

          default QueryFilter endsWithIgnoreCase(String value)

      Build a ends with query filter, checking if the property value ends with given value, ignoring case.

      Only applicable for `String` value type properties.

      Parameters:
        `value` - Value with which the expression value must end with
      Returns:
        QueryFilter
      Throws:
        `UnsupportedOperationException` - If the property is not a `String` type

    - #### asc

          default QuerySort asc()

      Build a `QuerySort.SortDirection.ASCENDING` sort using this property.
      Returns:
        Ascending `QuerySort`

    - #### desc

          default QuerySort desc()

      Build a `QuerySort.SortDirection.DESCENDING` sort using this property.
      Returns:
        Descending `QuerySort`

    - #### count

          default FunctionExpression.PathFunctionExpressionProperty<T,Long> count()

      Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Count` function, which returns the count of the values of the property.
      Returns:
        A `QueryFunction.Count` expression on this property, expressed as a `Property` to allow inclusion in `PropertySet` and `PropertyBox` structures.

    - #### min

          default FunctionExpression.PathFunctionExpressionProperty<T,T> min()

      Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Min` function, which returns the smallest value of the property.
      Returns:
        A `QueryFunction.Min` expression on this property, expressed as a `Property` to allow inclusion in `PropertySet` and `PropertyBox` structures.

    - #### max

          default FunctionExpression.PathFunctionExpressionProperty<T,T> max()

      Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Max` function, which returns the largest value of the property.
      Returns:
        A `QueryFunction.Max` expression on this property, expressed as a `Property` to allow inclusion in `PropertySet` and `PropertyBox` structures.

    - #### avg

          default FunctionExpression.PathFunctionExpressionProperty<T,Double> avg()

      Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Avg` function, which returns the average value of the property.
      Returns:
        A `QueryFunction.Avg` expression on this property, expressed as a `Property` to allow inclusion in `PropertySet` and `PropertyBox` structures.

    - #### sum

          default FunctionExpression.PathFunctionExpressionProperty<T,T> sum()

      Build an aggregation `FunctionExpression` on this property using the `QueryFunction.Sum` function, which returns the sum of the property values.
      Returns:
        A `QueryFunction.Sum` expression on this property, expressed as a `Property` to allow inclusion in `PropertySet` and `PropertyBox` structures.

Copyright © 2017 The Holon Platform. All rights reserved.