public interface PropertyTypeConverter
| Modifier and Type | Method and Description |
|---|---|
java.io.Serializable |
constructInstance(java.lang.String clazzName)
Construct an instance of an object that was deemed to be
PropertyValueEntity.PersistedType.CONSTRUCTABLE. |
java.lang.Object |
convert(java.lang.Class targetClass,
java.io.Serializable value)
Convert a value to a given type.
|
PropertyValueEntity.PersistedType |
getPersistentType(java.io.Serializable value)
When external to persisted type mappings are not obvious, the persistence framework,
before persisting as
PropertyValueEntity.PersistedType.SERIALIZABLE, will give the converter
a chance to choose how the value must be persisted:
PropertyValueEntity.PersistedType.LONG
PropertyValueEntity.PersistedType.DOUBLE
PropertyValueEntity.PersistedType.STRING
PropertyValueEntity.PersistedType.SERIALIZABLE
PropertyValueEntity.PersistedType.CONSTRUCTABLE
The converter should return PropertyValueEntity.PersistedType.SERIALIZABLE if no further conversions
are possible. |
PropertyValueEntity.PersistedType getPersistentType(java.io.Serializable value)
PropertyValueEntity.PersistedType.SERIALIZABLE, will give the converter
a chance to choose how the value must be persisted:
PropertyValueEntity.PersistedType.LONGPropertyValueEntity.PersistedType.DOUBLEPropertyValueEntity.PersistedType.STRINGPropertyValueEntity.PersistedType.SERIALIZABLEPropertyValueEntity.PersistedType.CONSTRUCTABLEPropertyValueEntity.PersistedType.SERIALIZABLE if no further conversions
are possible. Implicit in the return value is the converter's ability to do the
conversion when required.
If the converter can fully reconstruct an equal instance using just the name of the value's
class, then PropertyValueEntity.PersistedType.CONSTRUCTABLE can be used.value - the value that does not have an obvious persistence slotjava.lang.Object convert(java.lang.Class targetClass,
java.io.Serializable value)
targetClass - the desired type to convert tovalue - the value to convertjava.io.Serializable constructInstance(java.lang.String clazzName)
PropertyValueEntity.PersistedType.CONSTRUCTABLE.clazzName - the name of the classCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.