Package com.cmobilecom.af.model.report
Class PeriodConverter<T extends PersistenceEntity>
- java.lang.Object
-
- com.cmobilecom.af.model.report.PeriodConverter<T>
-
- Type Parameters:
T
- entity type, a subclass of PersistenceEntity
- All Implemented Interfaces:
ValueConverter<T>
,java.io.Serializable
public class PeriodConverter<T extends PersistenceEntity> extends java.lang.Object implements ValueConverter<T>, java.io.Serializable
Convert period of format "Year-periodType-periodNumber" to friendly display value for current locale.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PeriodConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValueAsObject(EntityProperty<T> ep, java.lang.String value)
Convert string value to property type.java.lang.String
getValueAsString(EntityProperty<T> ep, T entity)
Convert property value to string.
-
-
-
Method Detail
-
getValueAsObject
public java.lang.Object getValueAsObject(EntityProperty<T> ep, java.lang.String value) throws SystemException
Description copied from interface:ValueConverter
Convert string value to property type. Called before built-in data conversion.- Specified by:
getValueAsObject
in interfaceValueConverter<T extends PersistenceEntity>
- Parameters:
ep
- the EntityProperty whose value is to be convertedvalue
- property value of String type- Returns:
- converted value
- Throws:
SystemException
- throw if a data conversion error occurs
-
getValueAsString
public java.lang.String getValueAsString(EntityProperty<T> ep, T entity) throws SystemException
Description copied from interface:ValueConverter
Convert property value to string. Called before built-in data conversion.- Specified by:
getValueAsString
in interfaceValueConverter<T extends PersistenceEntity>
- Parameters:
ep
- the EntityProperty whose value is to be convertedentity
- the entity of the property- Returns:
- converted value
- Throws:
SystemException
- throw if a data conversion error occurs
-
-