public final class PropertyName<V> extends Object implements NamedValueAccessor<V,String>
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.
|
V |
deserialize(String value)
Deserializes the given value to its transient representation.
|
String |
getName()
Returns the named value's name.
|
com.google.common.reflect.TypeToken<String> |
getSerializedValueType()
Returns the named value's type of the serialized value.
|
String |
serialize(V value)
Serializes the given property value to its persistent representation.
|
public String getName()
NamedValueAccessor
getName
in interface NamedValueAccessor<V,String>
public com.google.common.reflect.TypeToken<String> getSerializedValueType()
NamedValueAccessor
getSerializedValueType
in interface NamedValueAccessor<V,String>
public V deserialize(String value)
NamedValueAccessor
deserialize
in interface NamedValueAccessor<V,String>
value
- the value to deserializepublic String serialize(V value)
value
- the property value to serializepublic static PropertyName<String> create(String name)
name
- the name of the propertypublic static <V> PropertyName<V> create(String name, ValueConverter<V,String> valueConverter)
V
- the type of the propertyname
- the name of the propertyvalueConverter
- the value converter of the propertyCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.