Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## net.java.ao
Annotation Type Generator

    @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.

Author:
  Daniel Spiewak
See Also:
  `OnUpdate`, `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

### value

    public abstract Class<? extends ValueGenerator<?>> value

  Specifies the generator class to use in creating new values for the field in question. This generator should be thread-safe and execute very quickly.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2007-2011. All Rights Reserved.