com.holonplatform.datastore.jpa

## Interface JpaTarget<T>

- Type Parameters:
    `T` - Entity class type
  All Superinterfaces:
    com.holonplatform.core.DataMappable, com.holonplatform.core.datastore.DataTarget<T>, com.holonplatform.core.Expression, com.holonplatform.core.Path<T>, com.holonplatform.core.Path.FinalPath<T>, com.holonplatform.core.query.QueryProjection<T>, Serializable, com.holonplatform.core.TypedExpression<T>
  All Known Implementing Classes:
    DefaultJpaTarget

      public interface JpaTarget<T>
      extends com.holonplatform.core.datastore.DataTarget<T>, com.holonplatform.core.query.QueryProjection<T>

  A `DataTarget` bound to a JPA Entity.
  Since:
    4.5.0

- - ### Nested Class Summary

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

      `com.holonplatform.core.datastore.DataTarget.DataTargetResolver<T extends com.holonplatform.core.datastore.DataTarget>, com.holonplatform.core.datastore.DataTarget.DataTargetSupport<C extends com.holonplatform.core.datastore.DataTarget.DataTargetSupport<C>>`

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

      `com.holonplatform.core.Path.FinalPath.FinalPathBuilder<T>`

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

      `com.holonplatform.core.Path.Builder<T,B extends com.holonplatform.core.Path.Builder<T,B>>, com.holonplatform.core.Path.FinalPath<T>, com.holonplatform.core.Path.PathBuilder<T>`

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

      `com.holonplatform.core.Expression.ExpressionResolverFunction<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression>, com.holonplatform.core.Expression.InvalidExpressionException`

  - ### 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 Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default Class<? extends T>` | `getEntityClass()` Mapped entity class to which this data target is referred
    `static com.holonplatform.core.ExpressionResolver<com.holonplatform.core.datastore.DataTarget,com.holonplatform.core.datastore.DataTarget>` | `nameResolver(String name, Class<?> entityClass)` Convenience method to build a JPA `DataTarget` resolver which translates a symbolic query target name into a valid JPA entity class.
    `static <T> JpaTarget<T>` | `of(Class<T> entityClass)` Build a `JpaTarget` using given `entityClass`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DataTarget

      `named, of, property, property, property, property, property, property, property`

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

      `getParent, of`

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

      `fullName, fullName, getName, isRootPath, relativeName, relativeName, stream`

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

      `getTemporalType, getType, isCollectionExpression, isConverterExpression`

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

      `validate`

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

      `getDataPath, isDataMappable`

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

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

- - ### Method Detail

    - #### getEntityClass

          default Class<? extends T> getEntityClass()

      Mapped entity class to which this data target is referred
      Returns:
        Entity class (not null)

    - #### of

          static <T> JpaTarget<T> of(Class<T> entityClass)

      Build a `JpaTarget` using given `entityClass`
      Type Parameters:
        `T` - Entity class type
      Parameters:
        `entityClass` - JPA entity class (not null)
      Returns:
        A new `JpaTarget`

    - #### nameResolver

          static com.holonplatform.core.ExpressionResolver<com.holonplatform.core.datastore.DataTarget,com.holonplatform.core.datastore.DataTarget> nameResolver(String name,
                                                                                                                                                                 Class<?> entityClass)

      Convenience method to build a JPA `DataTarget` resolver which translates a symbolic query target name into a valid JPA entity class.
      Parameters:
        `name` - Data target symbolic name (not null)
        `entityClass` - JPA entity class associated to given name (not null)
      Returns:
        DataTarget resolver which translates a symbolic query target name into a JPA entity class

Copyright © 2019 The Holon Platform. All rights reserved.