|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.util.SimpleDataRecord<T>
org.starhope.appius.game.SimpleDataEnum<T>
T
- the child class's typepublic abstract class SimpleDataEnum<T extends SimpleDataEnum<?>>
This is a base class used to express enumerated values. It enables a simplified form for SQL record loading, as well. This covers the ground for basic types that simply enumerate int:String mappings.
Field Summary | |
---|---|
private int |
id
The value of this enumerated name |
private String |
name
The name of this enumeration value |
private static long |
serialVersionUID
Java serialisation unique ID |
Fields inherited from class org.starhope.appius.util.SimpleDataRecord |
---|
myLoader, timeLastChanged, timeLastSaved |
Constructor Summary | |
---|---|
|
SimpleDataEnum(Class<? extends SimpleDataRecord<T>> subclass)
WRITEME: Document this constructor brpocock@star-hope.org |
protected |
SimpleDataEnum(RecordLoader<T> loader)
Constructor to be used by derived classes |
Method Summary | |
---|---|
int |
getCacheableID()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
String |
getCacheableIdent()
Note that all records must have either a numeric ID ( DataRecord.getCacheableID() or a string identifier (
DataRecord.getCacheableIdent() or both. |
int |
getID()
|
String |
getName()
|
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
void |
setID(int newID)
|
void |
setName(String newName)
|
Methods inherited from class org.starhope.appius.util.SimpleDataRecord |
---|
changed, checkStale, compareTo, equals, finalize, getRecordLoader, getTimeLastChanged, getTimeLastSaved, hashCode, isBeingLoaded, markAsLoaded, markAsSaved, markForReload, onRemove, onRetrieve, onStore, save, setRecordLoader, toString |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private int id
private String name
Constructor Detail |
---|
public SimpleDataEnum(Class<? extends SimpleDataRecord<T>> subclass)
subclass
- protected SimpleDataEnum(RecordLoader<T> loader)
loader
- the record loaderMethod Detail |
---|
public int getCacheableID() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
NotFoundException
- if the item doesn't have a distinct
numeric IDDataRecord.getCacheableID()
public String getCacheableIdent() throws NotFoundException
DataRecord
DataRecord.getCacheableID()
or a string identifier (
DataRecord.getCacheableIdent()
or both.
NotFoundException
- if the item doesn't have a distinct
string identifierDataRecord.getCacheableIdent()
public int getID()
public String getName()
public String getSubversionRevision()
HasSubversionRevision
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence.
As an example,the Subversion revision string for this file is "$Rev: 1968 $"
@Override public String getSubversionRevision () { return "$Rev: "; }
HasSubversionRevision.getSubversionRevision()
public void setID(int newID)
newID
- the id to setpublic void setName(String newName)
newName
- the name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |