public abstract class NameDescription extends JPAObject
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 2007, 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.
|
| 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(JPAObject 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, getStartLetter, jdoPostLoad, 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()
JPAObject.toXML()
and JPAObject.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(JPAObject object)
Compare the values of name
compareTo in interface Comparable<JPAObject>compareTo in class JPAObjectobject - 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.