|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface Alias
Identifies alternate names for a 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| Required Element Summary | |
|---|---|
String[] |
value
Alias values for the storage layer to select from. |
| Element Detail |
|---|
public abstract String[] value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||