intarsys runtime library

de.intarsys.tools.reflect
Class GenericRelationHandler

java.lang.Object
  extended by de.intarsys.tools.reflect.RelationHandlerAdapter
      extended by de.intarsys.tools.reflect.GenericRelationHandler
All Implemented Interfaces:
IRelationHandler

public class GenericRelationHandler
extends RelationHandlerAdapter

The relation is implemented using basic "intarsys" style reflection.


Constructor Summary
GenericRelationHandler(String attribute)
           
 
Method Summary
 Object[] get(Object owner)
          The objects associated with owner.
 String getAttribute()
           
 Object insert(Object owner, Object value)
          Add a new object to the association in owner.
 Object remove(Object owner, Object value)
          Remove an object from the association in owner.
 Object update(Object owner, Object value, Object newValue)
          Update value in the association for owner to newValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericRelationHandler

public GenericRelationHandler(String attribute)
Method Detail

get

public Object[] get(Object owner)
Description copied from interface: IRelationHandler
The objects associated with owner.

Specified by:
get in interface IRelationHandler
Overrides:
get in class RelationHandlerAdapter
Returns:
The objects associated with owner.

getAttribute

public String getAttribute()

insert

public Object insert(Object owner,
                     Object value)
Description copied from interface: IRelationHandler
Add a new object to the association in owner.

Specified by:
insert in interface IRelationHandler
Overrides:
insert in class RelationHandlerAdapter
Returns:
The object inserted

remove

public Object remove(Object owner,
                     Object value)
Description copied from interface: IRelationHandler
Remove an object from the association in owner.

Specified by:
remove in interface IRelationHandler
Overrides:
remove in class RelationHandlerAdapter
Returns:
The object removed

update

public Object update(Object owner,
                     Object value,
                     Object newValue)
Description copied from interface: IRelationHandler
Update value in the association for owner to newValue

Specified by:
update in interface IRelationHandler
Overrides:
update in class RelationHandlerAdapter
Returns:
The newly associated object

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.