|
||||||||||
| 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
org.starhope.appius.sql.SQLPeerEnum
public abstract class SQLPeerEnum
This is a class for infrequently-changed objects that are enumerated types referenced by integer ID columns. Things like the set of available avatar classes fall into this category.
| Field Summary | |
|---|---|
protected static ConcurrentHashMap<Integer,String> |
enumeration
enumeration of all possible values |
protected int |
instance
instance ID |
(package private) static int |
tinySpinner
|
| Constructor Summary | |
|---|---|
|
SQLPeerEnum()
TODO |
protected |
SQLPeerEnum(int id)
TODO |
| Method Summary | |
|---|---|
protected void |
cache(ResultSet set)
This method caches into the internal "enumeration" hashmap the results of an SQL query specific to this SQLPeerEnum class of object. |
protected String |
getCacheUniqueID()
This is an overriding method. |
int |
getID()
WRITEME: document this method (brpocock, Aug 14, 2009) |
static int |
getID(String s)
WRITEME: document this method (brpocock, Jul 8, 2009) |
protected abstract PreparedStatement |
getStatement(Connection connection)
WRITEME: document this method (brpocock, Aug 14, 2009) |
String |
getString()
|
static String |
getString(int id)
WRITEME: document this method (brpocock, Jul 8, 2009) |
protected void |
prepCache()
|
org.json.JSONObject |
toJSON()
This is an overriding method. |
| Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
|---|
changed, findInCache, flush, get, prepare, prepare, saveInCache, set, set |
| 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 |
| Field Detail |
|---|
protected static final ConcurrentHashMap<Integer,String> enumeration
static int tinySpinner
protected int instance
| Constructor Detail |
|---|
public SQLPeerEnum()
protected SQLPeerEnum(int id)
id - the specific ID| Method Detail |
|---|
public static int getID(String s)
s - the string value for which to search
public static String getString(int id)
id - The value
protected void cache(ResultSet set)
throws SQLException
set - The ResultSet from the SQL query
SQLException - if anything goes wrong from the queryprotected String getCacheUniqueID()
getCacheUniqueID in class SQLPeerDatumSQLPeerDatum.getCacheUniqueID()public int getID()
protected abstract PreparedStatement getStatement(Connection connection)
connection -
public String getString()
protected void prepCache()
public org.json.JSONObject toJSON()
toJSON in class SQLPeerDatumSQLPeerDatum.toJSON()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||