com.holonplatform.core.property

## Interface Property.Builder<T,B extends Property.Builder<T,B>>

- Type Parameters:
    `T` - Property type
    `B` - Concrete builder type
  All Superinterfaces:
    Localizable.Builder<B>
  All Known Subinterfaces:
    BeanProperty.Builder<T>, PathProperty.Builder<T,B>, PathProperty.PathPropertyBuilder<T>, VirtualProperty.Builder<T,B>
  Enclosing interface:
    Property<T>

      public static interface Property.Builder<T,B extends Property.Builder<T,B>>
      extends Localizable.Builder<B>

  Base `Property` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <C> B` | `configuration(ConfigProperty<C> configurationProperty, C value)` Add a property configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
    `B` | `configuration(String parameterName, Object value)` Add a property configuration parameter
    `<MODEL> B` | `converter(Class<MODEL> modelType, Function<MODEL,T> fromModel, Function<T,MODEL> toModel)` Create a `PropertyValueConverter` for given `modelType` using given conversion `Function`s: the `fromModel` function to convert a model type value into property value type, and the `toModel` function to perform the inverse operation, i.e. convert the property value type into model type.
    `B` | `converter(PropertyValueConverter<T,?> converter)` Sets the `PropertyValueConverter`.
    `B` | `localization(Localizable localizable)` Set the property localization using given `Localizable` definition.
    `B` | `temporalType(TemporalType temporalType)` Set the optional `TemporalType` specification for `Date` or `Calendar` type properties, which can be used to perform consistent operations on property value, such as presentation, rendering or persistence data manipulation.
    `B` | `validator(Validator<T> validator)` Add a property value `Validator`

    - ### Methods inherited from interface com.holonplatform.core.i18n.Localizable.Builder

      `message, messageArguments, messageCode`

- - ### Method Detail

    - #### localization

          B localization(Localizable localizable)

      Set the property localization using given `Localizable` definition.
      Parameters:
        `localizable` - The localizable to use to obtain property localization attributes (not null)
      Returns:
        this

    - #### configuration

          B configuration(String parameterName,
                          Object value)

      Add a property configuration parameter
      Parameters:
        `parameterName` - Parameter name to add to property configuration (not null)
        `value` - Configuration parameter value
      Returns:
        this

    - #### configuration

          default <C> B configuration(ConfigProperty<C> configurationProperty,
                                      C value)

      Add a property configuration parameter using a `ConfigProperty`, with `ConfigProperty.getKey()` as parameter name.
      Type Parameters:
        `C` - Config property type
      Parameters:
        `configurationProperty` - ConfigProperty to add to property configuration (not null)
        `value` - Configuration parameter value
      Returns:
        this

    - #### temporalType

          B temporalType(TemporalType temporalType)

      Set the optional `TemporalType` specification for `Date` or `Calendar` type properties, which can be used to perform consistent operations on property value, such as presentation, rendering or persistence data manipulation.
      Parameters:
        `temporalType` - the property `TemporalType` to set
      Returns:
        this

    - #### converter

          B converter(PropertyValueConverter<T,?> converter)

      Sets the `PropertyValueConverter`.
      Parameters:
        `converter` - The converter to set
      Returns:
        this

    - #### converter

          <MODEL> B converter(Class<MODEL> modelType,
                              Function<MODEL,T> fromModel,
                              Function<T,MODEL> toModel)

      Create a `PropertyValueConverter` for given `modelType` using given conversion `Function`s: the `fromModel` function to convert a model type value into property value type, and the `toModel` function to perform the inverse operation, i.e. convert the property value type into model type. Then set this converter as `PropertyValueConverter` for the property.
      Type Parameters:
        `MODEL` - Model type
      Parameters:
        `modelType` - Model type class (not null)
        `fromModel` - Function to convert a model type value into property value type (not null)
        `toModel` - Function to convert a property value type value into model type (not null)
      Returns:
        this

    - #### validator

          B validator(Validator<T> validator)

      Add a property value `Validator`
      Parameters:
        `validator` - Validator to add (not null)
      Returns:
        this

Copyright © 2017 The Holon Platform. All rights reserved.