|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.user.AvatarClassSQLLoader
public class AvatarClassSQLLoader
Load avatar class data from an SQL database backing store
Constructor Summary | |
---|---|
AvatarClassSQLLoader()
|
Method Summary | |
---|---|
void |
changed(AvatarClass changedRecord)
accept a notification from a record that it has been changed. |
(package private) static String |
getFormat_nasty_hack_FIXME(int someID)
FIXME: Avatar formats need to move into the database! |
(package private) static double |
getHeightScalarByType_HACK_FIXME(int id)
This is a nasty hack to force the right value into the AvatarClass.height field until we get this into the
database, and yes, this sucks. |
String |
getSubversionRevision()
Return the Subversion revision level of this class's source code file, as supplied via the special "$Rev: " sequence. |
void |
initializeStorage(String storageURL)
Prepare the RecordLoader for accessing a given storage medium. |
boolean |
isRealtime()
|
AvatarClass |
loadRecord(int id)
Load the record with the given ID number from the storage system |
private AvatarClass |
loadRecord(ResultSet rs)
load a record (common routine shared by loadRecord(int) ,
loadRecord(String) , and refresh(AvatarClass) |
AvatarClass |
loadRecord(String identifier)
Load the data record identified from the storage system. |
void |
refresh(AvatarClass record)
Refreshes the record: Re-read the contents of the database into the given record. |
void |
removeRecord(AvatarClass record)
|
void |
saveRecord(AvatarClass avatarClass)
Save a record back to the storage system |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvatarClassSQLLoader()
Method Detail |
---|
static String getFormat_nasty_hack_FIXME(int someID)
static double getHeightScalarByType_HACK_FIXME(int id)
AvatarClass.height
field until we get this into the
database, and yes, this sucks. FIXME
public void changed(AvatarClass changedRecord)
RecordLoader
changed
in interface RecordLoader<AvatarClass>
changedRecord
- the record that has been changedRecordLoader.changed(org.starhope.appius.util.DataRecord)
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: "; }
getSubversionRevision
in interface HasSubversionRevision
HasSubversionRevision.getSubversionRevision()
public void initializeStorage(String storageURL) throws NotReadyException
RecordLoader
initializeStorage
in interface RecordLoader<AvatarClass>
storageURL
- A URL or identifier of the storage engine. The
syntax is specific to the RecordLoader implementation.
NotReadyException
- if the storage engine can't be
initialisedRecordLoader.initializeStorage(java.lang.String)
public boolean isRealtime()
isRealtime
in interface RecordLoader<AvatarClass>
RecordLoader.isRealtime()
public AvatarClass loadRecord(int id) throws NotFoundException
RecordLoader
loadRecord
in interface RecordLoader<AvatarClass>
id
- the ID number for the record
NotFoundException
- if the record can't be loadedRecordLoader.loadRecord(int)
private AvatarClass loadRecord(ResultSet rs) throws SQLException
loadRecord(int)
,
loadRecord(String)
, and refresh(AvatarClass)
rs
- record set
SQLException
- if we fuck uppublic AvatarClass loadRecord(String identifier) throws NotFoundException
RecordLoader
loadRecord
in interface RecordLoader<AvatarClass>
identifier
- the identifier for the record
NotFoundException
- if the record can't be loadedRecordLoader.loadRecord(java.lang.String)
public void refresh(AvatarClass record)
RecordLoader
SimpleDataRecord.checkStale()
to try to reload data when
it might have been changed: it's trading elegance and efficiency
for expediency, but eventually, it should be removed.
refresh
in interface RecordLoader<AvatarClass>
record
- the record to be reloaded.RecordLoader.refresh(org.starhope.appius.util.DataRecord)
public void removeRecord(AvatarClass record)
removeRecord
in interface RecordLoader<AvatarClass>
record
- Record to be deleted/removedRecordLoader.removeRecord(org.starhope.appius.util.DataRecord)
public void saveRecord(AvatarClass avatarClass)
RecordLoader
saveRecord
in interface RecordLoader<AvatarClass>
avatarClass
- the record to be savedRecordLoader.saveRecord(org.starhope.appius.util.DataRecord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |