com.holonplatform.core.beans

## Interface BeanProperty<T>

- Type Parameters:
    `T` - Property type
  All Superinterfaces:
    CloneableProperty<T,PathProperty<T>,PathProperty.Builder<T,PathProperty<T>,?>>, CloneableProperty.CloneablePathProperty<T,PathProperty<T>>, ConverterExpression<T>, DataMappable, Expression, HasConfiguration<PropertyConfiguration>, Localizable, Path<T>, PathExpression<T>, PathProperty<T>, Property<T>, QueryExpression<T>, QueryProjection<T>, Serializable, TypedExpression<T>, Validator.Validatable<T>
  All Known Subinterfaces:
    BeanProperty.Builder<T>, BooleanBeanProperty, NumericBeanProperty<N>, StringBeanProperty, TemporalBeanProperty<T>

      public interface BeanProperty<T>
      extends PathProperty<T>

  Represents a Java Bean property as a `PathProperty`, providing additional configuration informations and read/write methods.

  This class is mainly intended for internal use.

  Since:
    5.0.0
  See Also:
    `BeanIntrospector`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `BeanProperty.Builder<T>` BeanProperty builder.

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

      `PathProperty.PathPropertyBuilder<T>`

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

      `CloneableProperty.CloneablePathProperty<T,P extends Property<T> & Path<T>>`

    - ### 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.Expression

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

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

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

  - ### Field Summary

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

      `PATH_HIERARCHY_SEPARATOR`

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

      `DEFAULT_CONFIG_PROPERTY_PREFIX, PATH`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> BeanProperty.Builder<T>` | `builder(String name, Class<T> type)` Get a builder to create a `BeanProperty`.
    `<A extends Annotation> Optional<A>` | `getAnnotation(Class<A> annotationClass)` Gets the annotation of given `annotationClass` type declared on this property, if available.
    `Optional<Field>` | `getField()` Get the field to which the bean property is bound
    `Optional<BeanProperty<?>>` | `getParentProperty()` Get the parent bean property, if any
    `Optional<Method>` | `getReadMethod()` Get the bean method to be used to read property value, if available.
    `Optional<Integer>` | `getSequence()` Get the property sequence within a property set, if configured.
    `Optional<Method>` | `getWriteMethod()` Get the bean method to be used to write property value, if available.
    `default <A extends Annotation> boolean` | `hasAnnotation(Class<A> annotationClass)` Checks whether an annotation of given `annotationClass` is present on this property.
    `boolean` | `isIdentifier()` Get whether the property is declared as an identifier for the bean property set.

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

      `create, create, isReadOnly`

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

      `clone`

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

      `getConfiguration, getConvertedValue, getConverter, getExpressionValueConverter, getName, getTemporalType, 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, of, of`

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

      `hasConfiguration`

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

      `getModelType, getModelValue`

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

      `isCollectionExpression, isConverterExpression`

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

      `validate`

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

      `asc, desc, from`

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

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

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

      `getDataPath, isDataMappable`

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

      `between, count, eq, eq, goe, goe, gt, gt, in, in, in, isNotNull, isNull, loe, loe, lt, lt, max, min, neq, neq, nin, nin, nin`

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

      `bean, constant, countAll, path, propertySet, propertySet`

- - ### Method Detail

    - #### getParentProperty

          Optional<BeanProperty<?>> getParentProperty()

      Get the parent bean property, if any
      Returns:
        Optional parent bean property

    - #### getReadMethod

          Optional<Method> getReadMethod()

      Get the bean method to be used to read property value, if available.
      Returns:
        Optional read method

    - #### getWriteMethod

          Optional<Method> getWriteMethod()

      Get the bean method to be used to write property value, if available.
      Returns:
        Optional write method

    - #### getField

          Optional<Field> getField()

      Get the field to which the bean property is bound
      Returns:
        Optional bean property field

    - #### getSequence

          Optional<Integer> getSequence()

      Get the property sequence within a property set, if configured.
      Returns:
        Optional property sequence

    - #### isIdentifier

          boolean isIdentifier()

      Get whether the property is declared as an identifier for the bean property set.
      Returns:
        `true` if it is an identifier property, `false` otherwise
      Since:
        5.1.0

    - #### getAnnotation

          <A extends Annotation> Optional<A> getAnnotation(Class<A> annotationClass)

      Gets the annotation of given `annotationClass` type declared on this property, if available.

      Only annotations declared on the `Field` which corresponds to this property are taken into account, any annotation on read/write methods is ignored.

      Type Parameters:
        `A` - Annotation type
      Parameters:
        `annotationClass` - Annotation class to obtain
      Returns:
        Optional Annotation instance

    - #### hasAnnotation

          default <A extends Annotation> boolean hasAnnotation(Class<A> annotationClass)

      Checks whether an annotation of given `annotationClass` is present on this property.
      Type Parameters:
        `A` - Annotation type
      Parameters:
        `annotationClass` - Annotation class to check
      Returns:
        `true` if an annotation of given type is present on this property, `false` otherwise

    - #### builder

          static <T> BeanProperty.Builder<T> builder(String name,
                                                     Class<T> type)

      Get a builder to create a `BeanProperty`.
      Type Parameters:
        `T` - Property type
      Parameters:
        `name` - Property name (not null)
        `type` - Property type (not null)
      Returns:
        BeanProperty builder

Copyright © 2019 The Holon Platform. All rights reserved.