diff options
Diffstat (limited to 'projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java')
| -rw-r--r-- | projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java | 126 |
1 files changed, 55 insertions, 71 deletions
diff --git a/projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java b/projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java index fca6c98..a98129f 100644 --- a/projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java +++ b/projects/net.wotonomy.test/src/main/java/net/wotonomy/test/DataKeyID.java @@ -4,85 +4,69 @@ import net.wotonomy.control.EOGlobalID; import net.wotonomy.datastore.DataKey; /** -* A test implementation of EOGlobalID that -* wraps a DataKey. -* -* @author michael@mpowers.net -* @author $Author: cgruber $ -* @version $Revision: 893 $ -*/ -public class DataKeyID extends EOGlobalID -{ - private DataKey key; - - /** - * Constructor takes a data key. - */ - public DataKeyID( DataKey aKey ) - { - key = aKey; - } - - /** - * Returns the wrapped data key. - */ - public DataKey getKey() - { - return key; - } + * A test implementation of EOGlobalID that wraps a DataKey. + * + * @author michael@mpowers.net + * @author $Author: cgruber $ + * @version $Revision: 893 $ + */ +public class DataKeyID extends EOGlobalID { + private DataKey key; + + /** + * Constructor takes a data key. + */ + public DataKeyID(DataKey aKey) { + key = aKey; + } + + /** + * Returns the wrapped data key. + */ + public DataKey getKey() { + return key; + } + + public boolean isTemporary() { + return false; + } + + public Object clone() { + return new DataKeyID((DataKey) key.clone()); + } + + public String toString() { + return "[DataKeyID:" + key.toString() + "]"; + } + + public int hashCode() { + return key.hashCode(); + } + + public boolean equals(Object anObject) { + if (anObject instanceof DataKeyID) { + if (((DataKeyID) anObject).key.equals(key)) { + return true; + } + } + return false; + } - public boolean isTemporary() - { - return false; - } - - public Object clone() - { - return new DataKeyID( (DataKey) key.clone() ); - } - - public String toString() - { - return "[DataKeyID:"+key.toString()+"]"; - } - - public int hashCode() - { - return key.hashCode(); - } - - public boolean equals( Object anObject ) - { - if ( anObject instanceof DataKeyID ) - { - if ( ((DataKeyID)anObject).key.equals( key ) ) - { - return true; - } - } - return false; - } - } /* - * $Log$ - * Revision 1.1 2006/02/16 13:22:22 cgruber - * Check in all sources in eclipse-friendly maven-enabled packages. + * $Log$ Revision 1.1 2006/02/16 13:22:22 cgruber Check in all sources in + * eclipse-friendly maven-enabled packages. * - * Revision 1.3 2001/02/23 23:44:44 mpowers - * Fixes for hashcode to ensure proper key comparison. + * Revision 1.3 2001/02/23 23:44:44 mpowers Fixes for hashcode to ensure proper + * key comparison. * - * Revision 1.2 2001/02/22 20:56:07 mpowers - * Tests of notification handling. + * Revision 1.2 2001/02/22 20:56:07 mpowers Tests of notification handling. * - * Revision 1.1 2001/02/15 21:14:45 mpowers - * Test suite now using a persistent object store with editing context. + * Revision 1.1 2001/02/15 21:14:45 mpowers Test suite now using a persistent + * object store with editing context. * - * Revision 1.1 2001/02/05 03:45:37 mpowers - * Starting work on EOEditingContext. + * Revision 1.1 2001/02/05 03:45:37 mpowers Starting work on EOEditingContext. * * */ - - |
