public class PropertyName<V> extends Object implements DefinitionValueAccessor<V>
Supports type-aware creation of Property
instances and access of Property
instances on DomainObjectDefinition
s. For each PropertyName
instance, a
custom value converter can be set that knows how to serialize/deserialize a given property value to/from a string.
Modifier and Type | Method and Description |
---|---|
static PropertyName<String> |
create(String name)
Creates a new PropertyName instance.
|
static <V> PropertyName<V> |
create(String name,
ValueConverter<V,String> valueConverter)
Creates a new PropertyName instance, configured with the given value converter.
|
String |
getName()
Returns the value name.
|
ValueConverter<V,String> |
getValueConverter()
Returns the value converter for this accessor.
|
public String getName()
DefinitionValueAccessor
Returns the value name.
getName
in interface DefinitionValueAccessor<V>
public ValueConverter<V,String> getValueConverter()
DefinitionValueAccessor
Returns the value converter for this accessor.
getValueConverter
in interface DefinitionValueAccessor<V>
public static PropertyName<String> create(String name)
Creates a new PropertyName instance. No value conversion takes place between transient and persisted value.
name
- the name of the propertypublic static <V> PropertyName<V> create(String name, ValueConverter<V,String> valueConverter)
Creates a new PropertyName instance, configured with the given value converter.
V
- the type of the propertyname
- the name of the propertyvalueConverter
- the value converter of the propertyCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.