org.apache.tapestry.components
Interface IPrimaryKeyConverter


public interface IPrimaryKeyConverter

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

Since:
4.0
Author:
mb

Method Summary
 java.lang.Object getPrimaryKey(java.lang.Object value)
          Returns the primary key of the given value
 java.lang.Object getValue(java.lang.Object primaryKey)
          Returns the value corresponding the given primary key
 

Method Detail

getPrimaryKey

java.lang.Object getPrimaryKey(java.lang.Object value)
Returns the primary key of the given value

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

getValue

java.lang.Object getValue(java.lang.Object primaryKey)
Returns 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