com.enspire.gemini.updaters
Class CollectionPropertyRelationshipUpdater

java.lang.Object
  extended by com.enspire.gemini.updaters.CollectionPropertyRelationshipUpdater
All Implemented Interfaces:
RelationshipUpdater

public class CollectionPropertyRelationshipUpdater
extends java.lang.Object
implements RelationshipUpdater

Updates one end of a relationship, that have the upper multiplicity greater than 1, and is represented as a Collection or its subclasses.

Since:
1.0
Author:
Dragan Djuric

Constructor Summary
CollectionPropertyRelationshipUpdater()
          Constructs an object leaving its dependencies unset.
CollectionPropertyRelationshipUpdater(com.enspire.reflection.PropertyReflection reflection)
          Constructs an object and sets the propertyReflection dependency.
 
Method Summary
 com.enspire.reflection.PropertyReflection getPropertyReflection()
          Gets propertyReflection - the object that is used to manipulate JavaBean properties.
 java.lang.Object set(java.lang.Object owner, java.lang.String propertyName, java.lang.Object value)
          Adds the new element to the collection if it does not already contain it.
 void setPropertyReflection(com.enspire.reflection.PropertyReflection propertyReflection)
          Sets propertyReflection - the object that is used to manipulate JavaBean properties.
 java.lang.Object unset(java.lang.Object owner, java.lang.String propertyName, java.lang.Object value)
          Removes the element from the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionPropertyRelationshipUpdater

public CollectionPropertyRelationshipUpdater()
Constructs an object leaving its dependencies unset.


CollectionPropertyRelationshipUpdater

public CollectionPropertyRelationshipUpdater(com.enspire.reflection.PropertyReflection reflection)
Constructs an object and sets the propertyReflection dependency.

Parameters:
reflection - the object that is used to manipulate JavaBean properties.
Method Detail

getPropertyReflection

public com.enspire.reflection.PropertyReflection getPropertyReflection()
Gets propertyReflection - the object that is used to manipulate JavaBean properties.

Returns:
propertyReflection the object that is used to manipulate JavaBean properties

setPropertyReflection

public void setPropertyReflection(com.enspire.reflection.PropertyReflection propertyReflection)
Sets propertyReflection - the object that is used to manipulate JavaBean properties.

Parameters:
propertyReflection - the propertyReflection to set.

set

public java.lang.Object set(java.lang.Object owner,
                            java.lang.String propertyName,
                            java.lang.Object value)
Adds the new element to the collection if it does not already contain it.

Specified by:
set in interface RelationshipUpdater
Parameters:
owner - the owner of the property
propertyName - the name of the property that should be updated
value - the value of the object that is gong to be associated with owner
Returns:
the old value of the property
See Also:
RelationshipUpdater.set(java.lang.Object, java.lang.String, java.lang.Object)

unset

public java.lang.Object unset(java.lang.Object owner,
                              java.lang.String propertyName,
                              java.lang.Object value)
Removes the element from the collection.

Specified by:
unset in interface RelationshipUpdater
Parameters:
owner - the owner of a property
value - the value of the object that is gong to be associated with owner the old value of the property
Returns:
the old value of the property
See Also:
RelationshipUpdater.unset(java.lang.Object, java.lang.String, java.lang.Object)


Copyright © 2005 e-nspire. All Rights Reserved.