@Documented
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface Alias
Storable or a Storable property. An alias is used
only by a repository to link to entities. Without an alias, the repository will perform
a best guess at finding an entity to use. Aliases may be ignored by repositories that
don't require explicitly named entities.
The most common use for an alias is for a JDBC repository, to link a storable to a table and its properties to the corresponding columns. Naming conventions for databases rarely work well for class and variable names.
Example:
@Alias("USER_INFO")
@PrimaryKey("userInfoID")
public interface UserInfo extends Storable<UserInfo> {
@Alias("USER_ID")
long getUserInfoID();
void setUserInfoID(long id);
...
}
Name| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String[] |
value
Alias values for the storage layer to select from.
|
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.