Package org.wicketstuff.minis.model
Interface IDetachCodec<T>
-
- Type Parameters:
T-
public interface IDetachCodec<T>A codec used to convert an object between its attached and detached representations. Detached representation should be something small so it is suitable for storage inside session. For example, in a database entity the detached state would be the primary key of that entity.- Author:
- Igor Vaynberg (ivaynberg)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tattach(Serializable detached)Converts an object into its attached representation.Serializabledetach(T object)Converts an object to its detached representation
-
-
-
Method Detail
-
detach
Serializable detach(T object)
Converts an object to its detached representation- Parameters:
object-- Returns:
- detached representation of
object
-
attach
T attach(Serializable detached)
Converts an object into its attached representation. Usually the returned object is equal to the object that was passed intodetach(Object)method to obtain the detached state.- Parameters:
detached- detached representation obtained via a previous call todetach(Object)- Returns:
- attached representation
-
-