public abstract class NameDescription extends JDOObject
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.
| Modifier and Type | Field and Description |
|---|---|
protected String |
description
A textual description for the name.
|
protected String |
name
The name fulfilled by the person.
|
hash, HASH, logger, startLetter| Modifier | Constructor and Description |
|---|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(JDOObject object)
Compares this object with the specified object for order.
|
protected static com.thoughtworks.xstream.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. |
clone, fromXML, getObjectId, getPersistenceManager, getStartLetter, jdoPostLoad, jdoPreClear, jdoPreDelete, jdoPreStore, resetHash, toString, toXMLprotected String name
protected String description
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.protected static com.thoughtworks.xstream.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.public int hashCode()
public 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 getDescription()
description.public void setDescription(String description)
description.description - The value to set.