org.starhope.appius.user
Class AvatarClass

java.lang.Object
  extended by org.starhope.appius.util.ManagedReferenceHolder
      extended by org.starhope.appius.sql.SQLPeerDatum
          extended by org.starhope.appius.sql.SQLPeerEnum
              extended by org.starhope.appius.user.AvatarClass

public class AvatarClass
extends SQLPeerEnum

WRITEME: The documentation for this type (AvatarClass) is incomplete. (brpocock, Jul 8, 2009)

Author:
brpocock

Field Summary
private static HashMap<Integer,Boolean> canColor
           
private static HashMap<Integer,Long> defaultBaseColor
           
private static HashMap<Integer,Long> defaultExtraColor
           
private static HashMap<Integer,String> defaultPattern
           
private static HashMap<Integer,Long> defaultPatternColor
           
private static HashMap<Integer,String> filenames
           
private static HashMap<Integer,Boolean> forFree
           
private static HashMap<Integer,Boolean> forVIT
           
 
Fields inherited from class org.starhope.appius.sql.SQLPeerEnum
enumeration, instance
 
Constructor Summary
protected AvatarClass(int id)
           
  AvatarClass(String avatarTitle)
           
 
Method Summary
protected  void cache(ResultSet set)
          This is an overriding method.
 boolean canColor()
          WRITEME: document this method (brpocock, Sep 2, 2009)
 void flush()
          This is an overriding method.
static AvatarClass getByID(int newID)
          WRITEME: document this method (brpocock, Aug 27, 2009)
 Colour getDefaultBaseColor()
           
 Colour getDefaultExtraColor()
           
 ClothingItem getDefaultPattern()
           
 Colour getDefaultPatternColor()
           
 String getFilename()
           
protected  PreparedStatement getStatement(Connection connection)
          This is an overriding method.
 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
getCacheUniqueID, getID, getID, getString, getString, prepCache
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, findInCache, get, prepare, prepare, saveInCache, 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, wait, wait, wait
 

Field Detail

canColor

private static final HashMap<Integer,Boolean> canColor

defaultBaseColor

private static final HashMap<Integer,Long> defaultBaseColor

defaultExtraColor

private static final HashMap<Integer,Long> defaultExtraColor

defaultPattern

private static final HashMap<Integer,String> defaultPattern

defaultPatternColor

private static final HashMap<Integer,Long> defaultPatternColor

filenames

private static final HashMap<Integer,String> filenames

forFree

private static final HashMap<Integer,Boolean> forFree

forVIT

private static final HashMap<Integer,Boolean> forVIT
Constructor Detail

AvatarClass

protected AvatarClass(int id)
Parameters:
id - Instantiate the AvatarClass represented by this ID number.

AvatarClass

public AvatarClass(String avatarTitle)
Parameters:
avatarTitle -
Method Detail

getByID

public static AvatarClass getByID(int newID)
WRITEME: document this method (brpocock, Aug 27, 2009)

Parameters:
newID -
Returns:

cache

protected void cache(ResultSet set)
              throws SQLException
This is an overriding method.

Overrides:
cache in class SQLPeerEnum
Parameters:
set - The ResultSet containing this AvatarClass object's values
Throws:
SQLException - if the database has sadness upon us
See Also:
SQLPeerEnum.cache(java.sql.ResultSet)

canColor

public boolean canColor()
WRITEME: document this method (brpocock, Sep 2, 2009)

Returns:

flush

public void flush()
This is an overriding method.

Specified by:
flush in class SQLPeerDatum
See Also:
SQLPeerDatum.flush()

getDefaultBaseColor

public Colour getDefaultBaseColor()
Returns:

getDefaultExtraColor

public Colour getDefaultExtraColor()
Returns:

getDefaultPattern

public ClothingItem getDefaultPattern()
Returns:

getDefaultPatternColor

public Colour getDefaultPatternColor()
Returns:
default pattern color

getFilename

public String getFilename()
Returns:
SWF filename/URL

getStatement

protected PreparedStatement getStatement(Connection connection)
This is an overriding method.

Specified by:
getStatement in class SQLPeerEnum
Returns:
See Also:
SQLPeerEnum.getStatement(java.sql.Connection)

isForFree

public boolean isForFree()
Returns:
true if this is available for free users

isForVIT

public boolean isForVIT()
Returns:
true if this is available for paid users

set

protected void set(ResultSet rs)
            throws SQLException
This is an overriding method.

Specified by:
set in class SQLPeerDatum
Throws:
SQLException - if the database fails somehow
See Also:
SQLPeerDatum.set(java.sql.ResultSet)

toJSON

public org.json.JSONObject toJSON()
Description copied from class: SQLPeerEnum
This is an overriding method.

Overrides:
toJSON in class SQLPeerEnum
Returns:
this object cast as an ActionScript Object for the client.
See Also:
SQLPeerDatum.toJSON()

toString

public String toString()
String representation is currently the JSON data

Overrides:
toString in class Object
See Also:
Object.toString()