com.sibvisions.rad.server.annotation
Annotation Type Inherit


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

The Inherit annotation should be used if an action was defined in a parent LCO and the action call through the LCO should be executed with the scope of the caller LCO and not with parent scope, e.g.

 public class Session extends Application
 {
     public long getId()
     {
         return System.identityHashCode(this);
     }

     public long getId2()
     {
         return System.identityHashCode(this);
     }
     
     @Inherit
     public long getIdInherit()
     {
         return System.identityHashCode(this);
     }
 }
 
 public class Students extends Session
 {
     public long getId2()
     {
         return super.getId2();
     }
 }
 
 studentsConnection.callAction("getId");
 
The action call of getId will be executed in the Session LCO (scope) and the action call of getIdInherit will be executed in the Students LCO (scope). Different LCO means different states and different instances of objects. An action call of getId2 would be executed in the Students LCO because the action was overwritten.



Copyright © 2009 SIB Visions GmbH. All Rights Reserved.