com.holonplatform.datastore.jpa

## Interface JpaTarget<T>

- Type Parameters:
    `T` - Entity class type
  All Superinterfaces:
    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

      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

      `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`

  - ### 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`

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

      `getParent`

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

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

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

      `validate`

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

      `getType`

- - ### 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 mapping class (not null)
      Returns:
        A JpaTarget on given entity class

    - #### 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 © 2017 The Holon Platform. All rights reserved.