|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.sql.SQLPeerDatum
org.starhope.appius.sql.SQLPeerEnum
org.starhope.appius.user.AvatarClass
public class AvatarClass
The avatar class defines a type of avatar which can be used by a game player or NPC. Different avatar classes may use different physical models, accept different clothing, &c. For example, different alien races or mythical species might be represented by different avatar classes.
Field Summary | |
---|---|
private static HashMap<Integer,Boolean> |
canColor
A cache of whether the avatar class can be colorised |
private static HashMap<Integer,Long> |
defaultBaseColor
A cache of the default base colour for the avatar class |
private static HashMap<Integer,Long> |
defaultExtraColor
A cache of the default extra/highlight/feature colour for the avatar class |
private static HashMap<Integer,Long> |
defaultPatternColor
A cache of the default pattern/hair/additional colour for the avatar class |
private static HashMap<Integer,Integer> |
defaultPatternID
A cache of the default pattern/hairstyle type for the avatar class |
private static HashMap<Integer,String> |
filenames
A cache of avatar class filenames |
private static HashMap<Integer,Boolean> |
forFree
A cache of whether each avatar class is available to free users |
private static HashMap<Integer,Boolean> |
forVIT
A cache of whether each avatar class is available to paid users |
private static long |
serialVersionUID
Java serialisation unique ID |
Fields inherited from class org.starhope.appius.sql.SQLPeerEnum |
---|
enumeration, instance |
Constructor Summary | |
---|---|
AvatarClass(int id)
|
|
AvatarClass(String avatarTitle)
|
Method Summary | |
---|---|
protected void |
cache(ResultSet set)
This is an overriding method. |
boolean |
canColor()
Return whether this avatar class can be colorised (2 planes) or not. |
void |
flush()
This is an overriding method. |
String |
getAvatarString(int avatarNum)
TODO: document this method (brpocock, Oct 13, 2009) |
static AvatarClass |
getByID(int newID)
WRITEME: document this method (brpocock, Aug 27, 2009) |
Colour |
getDefaultBaseColor()
|
Colour |
getDefaultExtraColor()
|
org.starhope.appius.game.inventory.ClothingItem |
getDefaultPattern()
|
Colour |
getDefaultPatternColor()
|
String |
getFilename()
|
private static int |
getIDForAvatarTitle(String avatarTitle)
TODO: document this method (brpocock, Dec 11, 2009) |
protected PreparedStatement |
getStatement(Connection connection)
This is an overriding method. |
static void |
invalidateCache()
Demolish caches |
boolean |
isForFree()
|
boolean |
isForVIT()
|
protected void |
set(ResultSet rs)
This is an overriding method. |
org.json.JSONObject |
toJSON()
This is an overriding method. |
String |
toString()
String representation is currently the JSON data |
Methods inherited from class org.starhope.appius.sql.SQLPeerEnum |
---|
doRealCacheResetStatic, equals, equals, get, get, getCacheUniqueID, getEnumeration, getID, getID, getString, getString, hashCode, invalidateCaches, prepCache, resetCache, set, set |
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
---|
changed, findInCache, get, saveInCache, set |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final HashMap<Integer,Boolean> canColor
private static final HashMap<Integer,Long> defaultBaseColor
private static final HashMap<Integer,Long> defaultExtraColor
private static final HashMap<Integer,Long> defaultPatternColor
private static final HashMap<Integer,Integer> defaultPatternID
private static final HashMap<Integer,String> filenames
private static final HashMap<Integer,Boolean> forFree
private static final HashMap<Integer,Boolean> forVIT
private static final long serialVersionUID
Constructor Detail |
---|
public AvatarClass(int id)
id
- Instantiate the AvatarClass represented by this ID
number.public AvatarClass(String avatarTitle)
avatarTitle
- WRITEMEMethod Detail |
---|
public static AvatarClass getByID(int newID)
newID
- WRITEME
private static int getIDForAvatarTitle(String avatarTitle)
avatarTitle
- WRITEME
public static void invalidateCache()
protected void cache(ResultSet set) throws SQLException
cache
in class SQLPeerEnum
set
- The ResultSet containing this AvatarClass object's
values
SQLException
- if the database has sadness upon usSQLPeerEnum.cache(java.sql.ResultSet)
public boolean canColor()
public void flush()
flush
in class SQLPeerDatum
SQLPeerDatum.flush()
public String getAvatarString(int avatarNum)
avatarNum
- WRITEME
public Colour getDefaultBaseColor()
public Colour getDefaultExtraColor()
public org.starhope.appius.game.inventory.ClothingItem getDefaultPattern()
public Colour getDefaultPatternColor()
public String getFilename()
protected PreparedStatement getStatement(Connection connection)
getStatement
in class SQLPeerEnum
connection
- WRITEME
SQLPeerEnum.getStatement(java.sql.Connection)
public boolean isForFree()
public boolean isForVIT()
protected void set(ResultSet rs) throws SQLException
set
in class SQLPeerDatum
rs
- The result of an SQL query, with the cursor already
pointed at the row describing this specific instance
of the object.
SQLException
- if the database fails somehowSQLPeerDatum.set(java.sql.ResultSet)
public org.json.JSONObject toJSON()
SQLPeerEnum
toJSON
in class SQLPeerEnum
SQLPeerDatum.toJSON()
public String toString()
toString
in class SQLPeerEnum
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |