|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - the type of the primary key, used to identify the value (which must be serializable)V - the type of value identified by the keypublic interface PrimaryKeyEncoder<K extends Serializable,V>
Used by Loop, AjaxFormLoop
and similar components to extract out an identifier, here termed a "primary key", that can be stored on the client
and later used to recover the same, or equivalent, server side object.
DefaultPrimaryKeyEncoder implementation is used in most circumstances.
ValueEncoder| Method Summary | |
|---|---|
void |
prepareForKeys(List<K> keys)
Invoked as part of a form submission to alert the encoder that a series of keys may be converted back to values. |
K |
toKey(V value)
Given a particular value, this method extracts and returns the primary key that identifies the value. |
V |
toValue(K key)
For a particular primary key, previously obtained via toKey(Object), this method returns the same or
equivalent object. |
| Method Detail |
|---|
K toKey(V value)
toValue(Serializable).
value - whose primary key is needed
void prepareForKeys(List<K> keys)
toValue(Serializable) may not include all keys in the
list, or may include keys not in the list. In general, though, the keys passed in will match the actual keys to
be converted, giving the encoder a chance to efficiently fetch the necessary value objects as a group.
V toValue(K key)
toKey(Object), this method returns the same or
equivalent object.
key - used to identify the object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||