com.holonplatform.core.query

## Interface BeanProjection<T>

- Type Parameters:
    `T` - Bean result type
  All Superinterfaces:
    Expression, QueryProjection<T>, TypedExpression<T>

      public interface BeanProjection<T>
      extends QueryProjection<T>

  A `QueryProjection` which uses a `BeanPropertySet` to define the projection selection and returns `BeanPropertySet.getBeanClass()` type results.
  Since:
    5.0.0

- - ### Nested Class Summary

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

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<? extends T>` | `getBeanClass()` Get the projection bean class.
    `Optional<Path[]>` | `getSelection()` Get the optional projection selection bean `Path`s.
    `default Class<? extends T>` | `getType()` Get the expression type.
    `static <T> BeanProjection<T>` | `of(Class<? extends T> beanClass, Path... selection)` Create a `BeanProjection` using given bean class.

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

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

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

      `getTemporalType, isCollectionExpression, isConverterExpression`

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

      `validate`

- - ### Method Detail

    - #### getBeanClass

          Class<? extends T> getBeanClass()

      Get the projection bean class.
      Returns:
        Projection bean class (not null)

    - #### getSelection

          Optional<Path[]> getSelection()

      Get the optional projection selection bean `Path`s. If not provided, all valid bean property paths will be used as selection.
      Returns:
        Optional projection selection paths

    - #### getType

          default Class<? extends T> getType()

      Description copied from interface: `TypedExpression`
      Get the expression type.
      Specified by:
        `getType` in interface `TypedExpression<T>`
      Returns:
        Expression type

    - #### of

          static <T> BeanProjection<T> of(Class<? extends T> beanClass,
                                          Path... selection)

      Create a `BeanProjection` using given bean class.
      Type Parameters:
        `T` - Bean and result type
      Parameters:
        `beanClass` - Bean class (not null)
        `selection` - Optional selection paths. If not provided, all valid bean property paths will be used.
      Returns:
        BeanProjection using given bean class

Copyright © 2019 The Holon Platform. All rights reserved.