com.holonplatform.core.datastore

## Interface DataTarget<T>

- Type Parameters:
    `T` - Target type
  All Superinterfaces:
    DataMappable, Expression, Path<T>, Path.FinalPath<T>, Serializable, TypedExpression<T>
  All Known Subinterfaces:
    BeanDataTarget<T>, RelationalTarget<T>

      public interface DataTarget<T>
      extends Path.FinalPath<T>

  Representation of the target element of a data model persistence/query operation.

  A DataTarget is a `Path`, so the target data model entity is represented by a String path name. The path is final, i.e. does not support a parent.

  A `DataTarget.DataTargetResolver` can be used to resolve a symbolic named data target into a persistence model specific data target representation.

  Since:
    5.0.0
  See Also:
    `Datastore`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `DataTarget.DataTargetResolver<T extends DataTarget>` Convenience interface to create an `ExpressionResolver` to resolve a custom `DataTarget` class into a standard `DataTarget`.
    `static interface` | `DataTarget.DataTargetSupport<C extends DataTarget.DataTargetSupport<C>>` Interface implemented by classes which support `DataTarget` setting.

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

      `Path.FinalPath.FinalPathBuilder<T>`

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

      `Path.Builder<T,B extends Path.Builder<T,B>>, 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`

    - ### 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
    --- | ---
    `static DataTarget<String>` | `named(String name)` Build a `String` type data target using root path `name`.
    `static <T> DataTarget<T>` | `of(String name, Class<T> type)` Build a typed data target using root path `name`.
    `default BooleanProperty` | `property(BooleanProperty fromProperty)` Create a new `BooleanProperty` cloned from the given property, setting this `DataTarget` as property parent path.
    `default <N extends Number> NumericProperty<N>` | `property(NumericProperty<N> fromProperty)` Create a new `NumericProperty` cloned from the given property, setting this `DataTarget` as property parent path.
    `default <V,P extends CloneableProperty.CloneablePathProperty<V,P>> P` | `property(P fromProperty)` Create a new `Path` type `Property` cloned from the given property, setting this `DataTarget` as property parent path.
    `default PropertyBoxProperty` | `property(PropertyBoxProperty fromProperty)` Create a new `PropertyBoxProperty` cloned from the given property, setting this `DataTarget` as property parent path.
    `default <P> PathProperty.PathPropertyBuilder<P>` | `property(String name, Class<? extends P> type)` Create a new `PathProperty` with given `name` and `type`, setting this `DataTarget` as property parent path.
    `default StringProperty` | `property(StringProperty fromProperty)` Create a new `StringProperty` cloned from the given property, setting this `DataTarget` as property parent path.
    `default <TT> TemporalProperty<TT>` | `property(TemporalProperty<TT> fromProperty)` Create a new `TemporalProperty` cloned from the given property, setting this `DataTarget` as property parent path.

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

- - ### Method Detail

    - #### property

          default <P> PathProperty.PathPropertyBuilder<P> property(String name,
                                                                   Class<? extends P> type)

      Create a new `PathProperty` with given `name` and `type`, setting this `DataTarget` as property parent path.
      Type Parameters:
        `P` - Property type
      Parameters:
        `name` - Property name (not null)
        `type` - Property value type (not null)
      Returns:
        Property builder

    - #### property

          default <V,P extends CloneableProperty.CloneablePathProperty<V,P>> P property(P fromProperty)

      Create a new `Path` type `Property` cloned from the given property, setting this `DataTarget` as property parent path.
      Type Parameters:
        `V` - Property value type
        `P` - Property type
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### property

          default StringProperty property(StringProperty fromProperty)

      Create a new `StringProperty` cloned from the given property, setting this `DataTarget` as property parent path.
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### property

          default <N extends Number> NumericProperty<N> property(NumericProperty<N> fromProperty)

      Create a new `NumericProperty` cloned from the given property, setting this `DataTarget` as property parent path.
      Type Parameters:
        `N` - Number type
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### property

          default <TT> TemporalProperty<TT> property(TemporalProperty<TT> fromProperty)

      Create a new `TemporalProperty` cloned from the given property, setting this `DataTarget` as property parent path.
      Type Parameters:
        `TT` - Property type
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### property

          default BooleanProperty property(BooleanProperty fromProperty)

      Create a new `BooleanProperty` cloned from the given property, setting this `DataTarget` as property parent path.
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### property

          default PropertyBoxProperty property(PropertyBoxProperty fromProperty)

      Create a new `PropertyBoxProperty` cloned from the given property, setting this `DataTarget` as property parent path.
      Parameters:
        `fromProperty` - The property to clone (not null)
      Returns:
        The cloned property

    - #### named

          static DataTarget<String> named(String name)

      Build a `String` type data target using root path `name`.
      Parameters:
        `name` - Path name (not null)
      Returns:
        DataTarget instance

    - #### of

          static <T> DataTarget<T> of(String name,
                                      Class<T> type)

      Build a typed data target using root path `name`.
      Type Parameters:
        `T` - Target type
      Parameters:
        `name` - Path name (not null)
        `type` - Data target type (not null)
      Returns:
        DataTarget instance

Copyright © 2019 The Holon Platform. All rights reserved.