com.enspire.gemini.annotation
Annotation Type BidirectionalOne


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface BidirectionalOne

e-nspire site

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...
 }
 

Since:
1.0
Author:
Dragan Djuric 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

oppositeName

public abstract java.lang.String oppositeName
The name of the opposite property.

Returns:
the name of the opposite property

oppositeType

public abstract java.lang.Class oppositeType
The type of the opposite property. Default value is BidirectionalOne.class

Default:
com.enspire.gemini.annotation.BidirectionalOne.class


Copyright © 2005 e-nspire. All Rights Reserved.