|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.jdo.JDOObject
public abstract class JDOObject
A base object from which all the JDO Object
classes will be derived. Provides default implementations for
common methods.
Copyright 2006, Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected int |
hash
The integer that represents the hash code for this object. |
protected static int |
HASH
The default value to use for hash. |
protected java.util.Collection<java.lang.String> |
metaphones
A collection of metaphone words used to perform a search across each Extent in the database for similar sounding
words. |
protected java.util.Collection<java.lang.String> |
words
A collection of words used to perform whole-word search across each Extent in the database. |
| Constructor Summary | |
|---|---|
protected |
JDOObject()
Default constructor. |
| Method Summary | ||
|---|---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
|
int |
compareTo(JDOObject object)
Compares this object with the specified object for order. |
|
protected abstract
|
copy(E object)
Copy constructor equivalent. |
|
protected static com.thoughtworks.xstream.XStream |
createXStream()
Return the utility used to convert the object to and from XML representation. |
|
abstract boolean |
equals(java.lang.Object object)
Compare the specified object with this object for equality. |
|
static JDOObject |
fromXML(java.lang.String xml)
Parse the object out of the XML representation of this object. |
|
abstract int |
hashCode()
Return a hash code for this object. |
|
void |
jdoPostLoad()
InstanceCallbacks method implementation. |
|
void |
jdoPreClear()
InstanceCallbacks method implementation. |
|
void |
jdoPreDelete()
InstanceCallbacks method implementation. |
|
void |
jdoPreStore()
InstanceCallbacks method implementation. |
|
void |
resetHash()
Reset the hash value. |
|
java.lang.String |
toString()
Return a string representation of this object. |
|
java.lang.String |
toXML()
Return an XML representation of the fields of this object. |
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int HASH
hash.
protected int hash
protected transient java.util.Collection<java.lang.String> words
Extent in the database.
protected transient java.util.Collection<java.lang.String> metaphones
Extent in the database for similar sounding
words.
| Constructor Detail |
|---|
protected JDOObject()
words and metaphones
with empty collections. Cannot be instantiated.
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.ObjecttoXML()public abstract int hashCode()
hashCode in class java.lang.Objectpublic abstract boolean equals(java.lang.Object object)
true if the specified object is of the
same type as this object, and the values of hashCode()
match.
equals in class java.lang.Objectobject - The object that is to compared with this object.
true if the objects have
the same hash code.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneable interface. No special actions are
performed. This method simply allows public access to the
Object.clone method.
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - If the super-class implementation
throws an error.public int compareTo(JDOObject object)
Note: The default implementation just compares the
hashCode() values. It is recommended that sub-classes
over-ride this method for appropriate sort order.
compareTo in interface java.lang.Comparable<JDOObject>object - The object that is to be compared with this object.
protected static com.thoughtworks.xstream.XStream createXStream()
toXML()
and fromXML(java.lang.String) methods to initialise the serialiser in a
standard manner.
public java.lang.String toXML()
Note: Currently this method uses the XStream API to convert the object into XML. This may be modified at a later date to convert into a TMS standard XML format.
createXStream(),
fromXML(java.lang.String)public static JDOObject fromXML(java.lang.String xml)
xml - The XML representation of this object.
createXStream(),
toXML()public final void resetHash()
hash value.
protected abstract <E extends JDOObject> void copy(E object)
object - The instance from which the fields of this object
are to be updated.public void jdoPostLoad()
jdoPostLoad in interface javax.jdo.listener.LoadCallbackpublic void jdoPreStore()
jdoPreStore in interface javax.jdo.listener.StoreCallbackpublic void jdoPreClear()
jdoPreClear in interface javax.jdo.listener.ClearCallbackpublic void jdoPreDelete()
jdoPreDelete in interface javax.jdo.listener.DeleteCallback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||