org.wicketstuff.minis.util
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
 T attach(java.io.Serializable detached)
          Converts an object into its attached representation.
 java.io.Serializable detach(T object)
          Converts an object to its detached representation
 

Method Detail

detach

java.io.Serializable detach(T object)
Converts an object to its detached representation

Parameters:
object -
Returns:
detached representation of object

attach

T attach(java.io.Serializable detached)
Converts an object into its attached representation. Usually the returned object is equal to the object that was passed into detach(Object) method to obtain the detached state.

Parameters:
detached - detached representation obtained via a previous call to detach(Object)
Returns:
attached representation


Copyright © 2010. All Rights Reserved.