org.starhope.appius.user
Class ClothingItem

java.lang.Object
  extended by org.starhope.appius.util.ManagedReferenceHolder
      extended by org.starhope.appius.sql.SQLPeerDatum
          extended by org.starhope.appius.user.InventoryItem
              extended by org.starhope.appius.user.ClothingItem

public class ClothingItem
extends InventoryItem

Author:
brpocock

Field Summary
private  Colour color
           
 
Fields inherited from class org.starhope.appius.user.InventoryItem
active, id, ownerID, slotNumber, Type_Backpacks, Type_Ceiling, Type_Ceiling_Furniture, Type_Dresses, Type_Ears, Type_Eyes, Type_Floor_Furniture, Type_Flooring, Type_Music, Type_Neck, Type_Orbitz, Type_Pants, Type_Pattern, Type_Pivitz, Type_Shirts, Type_Tops, Type_Wall_Furniture, Type_Wallpaper, typeID
 
Constructor Summary
ClothingItem()
           
ClothingItem(Integer item, Colour colour, int slot)
           
 
Method Summary
protected  void assertValidTypeID(long testTypeID)
          This is an overriding method.
static String[] getClothingLayerNames()
          get the names of layers/mount points for clothing
 Colour getColor()
           
 String getMountPoint()
           
 boolean isADress()
           
 boolean isAShirt()
           
protected  void set(ResultSet rs)
          This is an overriding method.
 void setColor(Colour color)
           
 String toString()
          This is an overriding method.
 
Methods inherited from class org.starhope.appius.user.InventoryItem
asClothing, asHomeDecorItem, flush, getByID, getByID, getCacheUniqueID, getClassForThisType, getClassForType, getID, getItemClass, getOwner, getOwnerID, getSlotNumber, getTypeID, getTypesOfClothing, getTypesOfFurniture, getTypesOfStructure, getTypesOfWearables, identifiesAs, isActive, isClothingOnly, isFurniture, isMusic, isPattern, isPivitz, isStructure, isWearable, setActive, setOwner, setOwnerID, setSlotNumber, setTypeID, toJSON
 
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

color

private Colour color
Constructor Detail

ClothingItem

ClothingItem()

ClothingItem

public ClothingItem(Integer item,
                    Colour colour,
                    int slot)
             throws GameLogicException,
                    NotFoundException
Parameters:
item - the type of item
colour - its colour
slot -
Throws:
GameLogicException - if the item isn't clothing
NotFoundException - if the item can't be found in the database
Method Detail

getClothingLayerNames

public static String[] getClothingLayerNames()
get the names of layers/mount points for clothing

Returns:
an array of valid names

assertValidTypeID

protected void assertValidTypeID(long testTypeID)
                          throws GameLogicException
This is an overriding method.

Specified by:
assertValidTypeID in class InventoryItem
Parameters:
testTypeID - The type ID to be checked
Throws:
GameLogicException - if the type ID is not of the types supported by this class
See Also:
InventoryItem.assertValidTypeID(long)

getColor

public Colour getColor()
Returns:
the colour

getMountPoint

public String getMountPoint()
Overrides:
getMountPoint in class InventoryItem
Returns:
the mount point of the clothing item, or the encoded string describing the location of a furniture item
See Also:
InventoryItem.getMountPoint()

isADress

public boolean isADress()
Returns:
true, if and only if the item is a dress

isAShirt

public boolean isAShirt()
Returns:
true, if and only if the item is a shirt (and not a dress)

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)

setColor

public void setColor(Colour color)
Parameters:
color - the colour

toString

public String toString()
This is an overriding method.

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