T - Property typeB - Concrete builder typepublic static interface Property.Builder<T,B extends Property.Builder<T,B>> extends Localizable.Builder<B>
Property builder.| 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
Functions: 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 |
message, messageArguments, messageCodeB localization(Localizable localizable)
Localizable definition.localizable - The localizable to use to obtain property localization attributes (not null)B configuration(String parameterName, Object value)
parameterName - Parameter name to add to property configuration (not null)value - Configuration parameter valuedefault <C> B configuration(ConfigProperty<C> configurationProperty, C value)
ConfigProperty, with ConfigProperty.getKey()
as parameter name.C - Config property typeconfigurationProperty - ConfigProperty to add to property configuration (not null)value - Configuration parameter valueB temporalType(TemporalType temporalType)
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.temporalType - the property TemporalType to setB converter(PropertyValueConverter<T,?> converter)
PropertyValueConverter.converter - The converter to set<MODEL> B converter(Class<MODEL> modelType, Function<MODEL,T> fromModel, Function<T,MODEL> toModel)
PropertyValueConverter for given modelType using given conversion
Functions: 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.MODEL - Model typemodelType - 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)Copyright © 2017 The Holon Platform. All rights reserved.