org.apache.tapestry.contrib.table.model
Interface IPrimaryKeyConvertor


public interface IPrimaryKeyConvertor

An interface for converting an object to its primary key and back. Typically used to determine how to store a given object as a hidden value when rendering a form.

Since:
3.0
Author:
mb

Method Summary
 java.lang.Object getPrimaryKey(java.lang.Object objValue)
          Gets the serializable primary key of the given value
 java.lang.Object getValue(java.lang.Object objPrimaryKey)
          Gets the value corresponding the given primary key
 

Method Detail

getPrimaryKey

java.lang.Object getPrimaryKey(java.lang.Object objValue)
Gets the serializable primary key of the given value

Parameters:
objValue - the value for which a primary key needs to be extracted
Returns:
the serializable primary key of the value

getValue

java.lang.Object getValue(java.lang.Object objPrimaryKey)
Gets the value corresponding the given primary key

Parameters:
objPrimaryKey - the primary key for which a value needs to be generated
Returns:
the generated value corresponding to the given primary key