Package com.adobe.reef.siren.converter
Interface Converter<T>
-
public interface Converter<T>
Converter
is an interface describing a Java class that can perform Object-to-Entity and Entity-to-Object conversions between model data objects and a Entity representation of those objects that is suitable for rendering.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
fromEntity(ConverterContext<T> context, Entity entity)
Converts anEntity
into a resource of typeT
.Entity
toEntity(ConverterContext<T> context, T resource)
-
-
-
Method Detail
-
toEntity
Entity toEntity(ConverterContext<T> context, T resource) throws ConverterException
- Parameters:
context
-resource
-- Returns:
- Throws:
ConverterException
-
fromEntity
T fromEntity(ConverterContext<T> context, Entity entity) throws ConverterException
Converts anEntity
into a resource of typeT
.- Parameters:
context
-entity
-- Returns:
- Throws:
ConverterException
-
-