@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Sequence
Storable property capable of selecting its own value on
insert, by a named sequence. Support for sequences is repository dependent,
and if not supported, a PersistException is thrown when trying to
insert. Explicitly specifying a value bypasses the sequence altogether.
Example:
@PrimaryKey("userInfoID")
public interface UserInfo extends Storable<UserInfo> {
@Sequence("USER_ID_SEQ")
long getUserInfoID();
void setUserInfoID(long id);
...
}
Automatic| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
value
Name of the sequence used by the storage layer.
|
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.