|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.game.inventory.GenericItemReferenceSQLLoader
public class GenericItemReferenceSQLLoader
WRITEME: Document this type.
| Constructor Summary | |
|---|---|
GenericItemReferenceSQLLoader()
|
|
| Method Summary | |
|---|---|
void |
changed(GenericItemReference changedRecord)
accept a notification from a record that it has been changed. |
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()
|
GenericItemReference |
loadRecord(int id)
Load the record with the given ID number from the storage system |
GenericItemReference |
loadRecord(String identifier)
Load the data record identified from the storage system. |
void |
refresh(GenericItemReference record)
Refreshes the record: Re-read the contents of the database into the given record. |
private GenericItemReference |
reload(ResultSet rs,
GenericItemReference rec)
Loads the result set into the record |
void |
removeRecord(GenericItemReference record)
|
void |
saveRecord(GenericItemReference record)
Save a record back to the storage system |
private GenericItemReference |
set(ResultSet rs)
WRITEME: Document this method brpocock@star-hope.org |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericItemReferenceSQLLoader()
| Method Detail |
|---|
public void changed(GenericItemReference changedRecord)
RecordLoader
changed in interface RecordLoader<GenericItemReference>changedRecord - the record that has been changedRecordLoader.changed(org.starhope.appius.util.DataRecord)public String getSubversionRevision()
HasSubversionRevisionReturn 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 HasSubversionRevisionHasSubversionRevision.getSubversionRevision()
public void initializeStorage(String storageURL)
throws NotReadyException
RecordLoader
initializeStorage in interface RecordLoader<GenericItemReference>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<GenericItemReference>RecordLoader.isRealtime()
public GenericItemReference loadRecord(int id)
throws NotFoundException
RecordLoader
loadRecord in interface RecordLoader<GenericItemReference>id - the ID number for the record
NotFoundException - if the record can't be loadedRecordLoader.loadRecord(int)
public GenericItemReference loadRecord(String identifier)
throws NotFoundException
RecordLoader
loadRecord in interface RecordLoader<GenericItemReference>identifier - the identifier for the record
NotFoundException - if the record can't be loadedRecordLoader.loadRecord(java.lang.String)public void refresh(GenericItemReference record)
RecordLoaderSimpleDataRecord.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<GenericItemReference>record - the record to be reloaded.
private GenericItemReference reload(ResultSet rs,
GenericItemReference rec)
throws SQLException
rs - Result Setrec - GenericItemReference record
SQLException - if the record can't be parsedpublic void removeRecord(GenericItemReference record)
removeRecord in interface RecordLoader<GenericItemReference>record - Record to be deleted/removedRecordLoader.removeRecord(org.starhope.appius.util.DataRecord)public void saveRecord(GenericItemReference record)
RecordLoader
saveRecord in interface RecordLoader<GenericItemReference>record - the record to be savedRecordLoader.saveRecord(org.starhope.appius.util.DataRecord)
private GenericItemReference set(ResultSet rs)
throws SQLException
rs - result set
SQLException - WRITEME
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||