org.jboss.test.cmp2.lob
Class ValueHolderStateFactory

java.lang.Object
  extended byorg.jboss.test.cmp2.lob.ValueHolderStateFactory
All Implemented Interfaces:
CMPFieldStateFactory (src)

public class ValueHolderStateFactory
extends java.lang.Object
implements CMPFieldStateFactory (src)


Constructor Summary
ValueHolderStateFactory()
           
 
Method Summary
 java.lang.Object getFieldState(java.lang.Object fieldValue)
          Calculates and returns an object that represents the state of the field value.
 boolean isStateValid(java.lang.Object state, java.lang.Object fieldValue)
          Checks whether the field's state state is equal to the field value's state (possibly, calculated with the getFieldState() method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueHolderStateFactory

public ValueHolderStateFactory()
Method Detail

getFieldState

public java.lang.Object getFieldState(java.lang.Object fieldValue)
Description copied from interface: CMPFieldStateFactory (src)
Calculates and returns an object that represents the state of the field value. The states produced by this method will be used to check whether the field is dirty at synchronization time.

Specified by:
getFieldState in interface CMPFieldStateFactory (src)
Parameters:
fieldValue - field's value.
Returns:
an object representing the field's state.

isStateValid

public boolean isStateValid(java.lang.Object state,
                            java.lang.Object fieldValue)
Description copied from interface: CMPFieldStateFactory (src)
Checks whether the field's state state is equal to the field value's state (possibly, calculated with the getFieldState() method).

Specified by:
isStateValid in interface CMPFieldStateFactory (src)
Parameters:
state - the state to compare with field value's state.
fieldValue - field's value, the state of which will be compared with state.
Returns:
true if state equals to fieldValue's state.