com.amazon.carbonado
Annotation Type Sequence


@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Sequence

Identifies a 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);

     ...
 }
 

Author:
Brian S O'Neill
See Also:
Automatic

Required Element Summary
 String value
          Name of the sequence used by the storage layer.
 

Element Detail

value

public abstract String value
Name of the sequence used by the storage layer.



Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.