com.enspire.gemini.updaters
Class SimplePropertyRelationshipUpdater

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

public class SimplePropertyRelationshipUpdater
extends java.lang.Object
implements RelationshipUpdater

Updates one end of a relationship, that have the upper multiplicity 1, and is represented as a simple Java property, not including primitive Java types.

Since:
1.0
Author:
Dragan Djuric

Constructor Summary
SimplePropertyRelationshipUpdater()
          Constructs an object leaving its dependencies unset.
SimplePropertyRelationshipUpdater(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)
          Sets the the property to new value if it is diferent from the old value.
 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)
          Sets the property to null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePropertyRelationshipUpdater

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


SimplePropertyRelationshipUpdater

public SimplePropertyRelationshipUpdater(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)
Sets the the property to new value if it is diferent from the old value.

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)
Sets the property to null.

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.