|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.marringtons.object.POJO
By inheriting from POJO instead of Object, classes get working deep copy(), equals(), hashCode(), toString() and Comparable methods. Tje toString() method provides a readable XML representation rather than just an address. The only downside is that if the POJO is transmitted to a remote system (RMI, SOAP, etc), that system will need to have marringtons.library.jar on the classpath.
DAO,
ObjectXML,
ObjectScraper| Constructor Summary | |
POJO()
|
|
| Method Summary | |
int |
compareTo(Object that)
DO a deep compare of the objects down to their component primatives and strings. |
POJO |
copy()
Return a deep copy of a POJO. |
boolean |
equals(Object that)
This is a deep equals - all component classes are compared recursively. |
int |
hashCode()
This is a deep hashCode. |
String |
toString()
The String representation of an object is in XML. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public POJO()
| Method Detail |
public POJO copy()
public boolean equals(Object that)
that - to compare against.
Object.equals(java.lang.Object)public int hashCode()
Object.hashCode()public int compareTo(Object that)
compareTo in interface Comparablethat - to compare to.
Comparable.compareTo(java.lang.Object)public String toString()
Object.toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||