Package net.java.ao
Annotation Type 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.
- Author:
- Daniel Spiewak
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends ValueGenerator<?>>
Specifies the generator class to use in creating new values for the field in question.
-
Element Details
-
value
Class<? extends ValueGenerator<?>> valueSpecifies the generator class to use in creating new values for the field in question. This generator should be thread-safe and execute very quickly.
-