Annotation used for mapping constructor's parameters to key values.
Its is often necessary to
build a new object for its key values,
for example when
searching or
activating a property whose type is an object.
To do so, by default, the default constructor is used, then values for is
keys are set.
It is also possible to define the constructor to be used by explicitly stating which parameter correspond to which key.
For instance:
@Persisting class Storable {
@Key(order=1) public String key1;
@Key(order=2) public String key2;
public Storable ( @KeyMap("key2") String val2, @KeyMap("key1") String val1) {
this.key1 = val1;
this.key2 = val2;
}
}