|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.util.ManagedReferenceHolder
org.starhope.appius.sql.SQLPeerDatum
public abstract class SQLPeerDatum
Constructor Summary | |
---|---|
SQLPeerDatum()
|
Method Summary | ||
---|---|---|
void |
changed()
|
|
protected
|
findInCache()
Find the object in the cache, if possible. |
|
abstract void |
flush()
|
|
static SQLPeerDatum |
get(Class<? extends SQLPeerDatum> klass,
org.json.JSONObject object)
throw new Error ("wtf?");
|
|
private String |
getCacheGlobalID()
Get the globally-unique ID for this object, including the canonical class name, for the cache. |
|
protected abstract String |
getCacheUniqueID()
|
|
static PreparedStatement |
prepare(String string)
|
|
static PreparedStatement |
prepare(String string,
int returnGeneratedKeys)
WRITEME: document this method (brpocock, Aug 25, 2009) |
|
protected void |
saveInCache()
Store the local object into the cache |
|
void |
set(org.json.JSONObject o)
|
|
protected abstract void |
set(ResultSet rs)
|
|
org.json.JSONObject |
toJSON()
|
Methods inherited from class org.starhope.appius.util.ManagedReferenceHolder |
---|
deref, setRef |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLPeerDatum()
Method Detail |
---|
public static SQLPeerDatum get(Class<? extends SQLPeerDatum> klass, org.json.JSONObject object)
throw new Error ("wtf?");
klass
- object
-
public static PreparedStatement prepare(String string)
string
- The SQL string to form the prepared statement
PreparedStatement
as from
Connection.prepareStatement(String, int)
public static PreparedStatement prepare(String string, int returnGeneratedKeys)
string
- returnGeneratedKeys
-
public void changed()
protected <T extends SQLPeerDatum> SQLPeerDatum findInCache() throws NotFoundException
T
- type
NotFoundException
- if it's not foundpublic abstract void flush()
private String getCacheGlobalID()
protected abstract String getCacheUniqueID()
protected void saveInCache()
public void set(org.json.JSONObject o) throws NotImplementedException
o
-
NotImplementedException
protected abstract void set(ResultSet rs) throws SQLException
rs
-
SQLException
- if the database fails somehowpublic org.json.JSONObject toJSON()
org.json.JSONException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |