|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Generator
Marks a specific method (and thus, database field) to contain
a generated value on INSERT. The precise value and generation
algorithm is specified by the ValueGenerator
class.
This can be used to implement functionality like UUID keys
and other values which must be generated in the application
layer.
This only generates values for INSERT statements, not UPDATE, SELECT or any such statement. It is likely that down the road, such functionality will be added. However, at the moment the designed use-case is something like UUID primary keys, rather than an application-layer ON UPDATE.
ValueGenerator
Required Element Summary | |
---|---|
Class<? extends ValueGenerator<?>> |
value
Specifies the generator class to use in creating new values for the field in question. |
Element Detail |
---|
public abstract Class<? extends ValueGenerator<?>> value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |