|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface BidirectionalOne
Field annotated as
@BidirectionalOne
represent simple
bidirectional fields. Bidirectional properties are JavaBean properties
that update the opposite property of their newly added valuses.
Example: Company<-->Employee relationship.
public class Employee { @BidirectionalOne( oppositeName = "employees", oppositeType = BidirectionalMany.class) private Company company; //Usual JavaBeans setters and getters go here if needed... } public class Company { @BidirectionalMany( oppositeName = "company") private Collection employees; //Usual JavaBeans setters and getters go here if needed... }
dragandj@dev.java.net
Required Element Summary | |
---|---|
java.lang.String |
oppositeName
The name of the opposite property. |
Optional Element Summary | |
---|---|
java.lang.Class |
oppositeType
The type of the opposite property. |
Element Detail |
---|
public abstract java.lang.String oppositeName
public abstract java.lang.Class oppositeType
BidirectionalOne.class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |