|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.jdo.JDOObject
com.sptci.jdo.NameDescription
public abstract class NameDescription
A JavaBean that represents a simple name and
description pair. This may be used as the base class for
a number of data types that represent similar data. This
object will be enhanced by a JDO byte code enhancer to
convert into a persistence aware object.
© Copyright 2006, Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected String |
description
A textual description for the name. |
protected String |
name
The name fulfilled by the person. |
| Fields inherited from class com.sptci.jdo.JDOObject |
|---|
hash, HASH, logger, startLetter |
| Constructor Summary | |
|---|---|
protected |
NameDescription()
Default constructor. |
|
NameDescription(String name)
Create a new instance of the class with the specified values. |
|
NameDescription(String name,
String description)
Create a new instance of the class with the specified values. |
| Method Summary | |
|---|---|
int |
compareTo(JDOObject object)
Compares this object with the specified object for order. |
protected static XStream |
createXStream()
Return the utility used to convert the object to and from XML representation. |
boolean |
equals(Object object)
Compare the specified object with this object for equality. |
String |
getDescription()
Returns description. |
String |
getName()
Returns name. |
int |
hashCode()
Return a hash code for this object. |
void |
setDescription(String description)
Set description. |
void |
setName(String name)
Set name. |
| Methods inherited from class com.sptci.jdo.JDOObject |
|---|
clone, fromXML, getObjectId, getPersistenceManager, getStartLetter, jdoPostLoad, jdoPreClear, jdoPreDelete, jdoPreStore, resetHash, toString, toXML |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String name
protected String description
| Constructor Detail |
|---|
protected NameDescription()
public NameDescription(String name)
NameDescription( String, String ) with a value of
null for description.
name - The name value to set.
public NameDescription(String name,
String description)
name - The name value to set.description - The description value to set.| Method Detail |
|---|
protected static XStream createXStream()
JDOObject.toXML()
and JDOObject.fromXML(java.lang.String) methods to initialise the serialiser in a
standard manner.
public boolean equals(Object object)
true if the specified object is of the
same type as this object, and the values of all the fields
match.
equals in class JDOObjectobject - The object that is to compared with this object.
true if the objects have
the same field values.public int hashCode()
hashCode in class JDOObjectpublic int compareTo(JDOObject object)
Compare the values of name
compareTo in interface Comparable<JDOObject>compareTo in class JDOObjectobject - The object that is to be compared with this object.
public String getName()
name.
public void setName(String name)
name.
name - The value to set.public String getDescription()
description.
public void setDescription(String description)
description.
description - The value to set.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||