Change Notes item #850919, was opened at 2003-11-29 00:12
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=381174&aid=850919&group_id=22866
Category: JBossCMP
Group: v3.2
Status: Open
Priority: 5
Submitted By: Alexey Loubyansky (loubyansky)
Assigned to: Nobody/Anonymous (nobody)
Summary: CMP field <state-factory>
Initial Comment:
In jbosscmp-jdbc.xml, a cmp-field may have an optional
element <state-factory>. The value should the fully
qualified class name of the implementation of
org.jboss.ejb.plugins.cmp.jdbc.CMPFieldStateFactory
interface which has the following two methods:
/**
* 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.
*
* @param fieldValue field's value.
* @return an object representing the field's state.
*/
Object getFieldState(Object fieldValue);
/**
* Checks whether the field's state <code>state</code>
* is equal to the field value's state (possibly,
calculated with
* the <code>getFieldState()</code> method).
*
* @param state the state to compare with field
value's state.
* @param fieldValue field's value, the state of
which will be compared
* with <code>state</code>.
* @return true if <code>state</code> equals to
<code>fieldValue</code>'s state.
*/
boolean isStateValid(Object state, Object fieldValue);
There are default implementations for Map, List, Set
and arrays which are set automatically for fields of
the corresponding types.
For primitives, their wrappers and java.lang.String,
the implementation relies on equals(Object o) method to
check the dirty state.
The default implementation for other types always
returns false from isStateValid() unless one of the
arguments is null and the other one is not.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=381174&aid=850919&group_id=22866
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development