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
Version:
$Id: IPrimaryKeyConvertor.java 243791 2004-02-19 17:38:13Z hlship $
Author:
mb

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

Method Detail

getPrimaryKey

Object getPrimaryKey(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

Object getValue(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