org.starhope.appius.game.intangible
Class Store

java.lang.Object
  extended by org.starhope.appius.util.ManagedReferenceHolder
      extended by org.starhope.appius.util.BaseDatum
          extended by org.starhope.appius.game.intangible.Store
All Implemented Interfaces:
com.sun.sgs.app.ManagedObject, Externalizable, Serializable, CastsToJSON

public class Store
extends BaseDatum

WRITEME

Author:
brpocock
See Also:
Serialized Form

Field Summary
private  Vector<com.sun.sgs.app.ManagedReference<StoreCategory>> categories
          WRITEME
private  String code
          WRITEME
private  com.sun.sgs.app.ManagedReference<Domain> domain
          WRITEME
private  String title
          WRITEME
 
Fields inherited from class org.starhope.appius.util.BaseDatum
database_id
 
Constructor Summary
Store()
          WRITEME
 
Method Summary
 void add(StoreCategory newCat)
          WRITEME
 Vector<com.sun.sgs.app.ManagedReference<StoreCategory>> getCategories()
          WRITEME
 String getCode()
           
 Domain getDomain()
           
 String getTitle()
           
 void remove(StoreCategory cat)
           
 void set(org.json.JSONObject o)
          This method will attempt to set the data contents of this object to the values derived from the JSON object being passed-in.
 void setCode(String code)
          Unique 5-character internal identifier.
 void setDomain(Domain domain)
           
 void setTitle(String title)
          The user-visible name of the store.
 org.json.JSONObject toJSON()
          This returns a copy of the object's data cast into a JSON form.
 
Methods inherited from class org.starhope.appius.util.BaseDatum
changed, commitToDatabase, delete, equals, flush, get, get, getID, getUniqueBoundName, readExternal, refJSON, setID, sqlDateTime, writeExternal
 
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

categories

private final Vector<com.sun.sgs.app.ManagedReference<StoreCategory>> categories
WRITEME


code

private String code
WRITEME


domain

private com.sun.sgs.app.ManagedReference<Domain> domain
WRITEME


title

private String title
WRITEME

Constructor Detail

Store

public Store()
WRITEME

Method Detail

add

public void add(StoreCategory newCat)
WRITEME

Parameters:
newCat - WRITEME

getCategories

public Vector<com.sun.sgs.app.ManagedReference<StoreCategory>> getCategories()
WRITEME

Returns:
WRITEME

getCode

public String getCode()
Returns:
the code

getDomain

public Domain getDomain()
Returns:
the domain in which this store is found

getTitle

public String getTitle()
Returns:
(potentially user-visible) title of this store

remove

public void remove(StoreCategory cat)
Parameters:
cat - the category to be removed from the store

set

public void set(org.json.JSONObject o)
Description copied from interface: CastsToJSON
This method will attempt to set the data contents of this object to the values derived from the JSON object being passed-in. All exceptions are ignored, but any errors in the JSON data could cause the command to fail, completely or partially.

Specified by:
set in interface CastsToJSON
Overrides:
set in class BaseDatum
Parameters:
o - The JSON object containing a the new data for this object.
See Also:
CastsToJSON.set(org.json.JSONObject)

setCode

public void setCode(String code)
Unique 5-character internal identifier. Must consist of uppercase characters and digits and be 5 characters or less. (Unique within a Domain.)

Parameters:
code - the code to set

setDomain

public void setDomain(Domain domain)
Parameters:
domain - the domain in which this store will now be found

setTitle

public void setTitle(String title)
The user-visible name of the store. Unique within a Domain.

Parameters:
title - the title to set

toJSON

public org.json.JSONObject toJSON()
Description copied from interface: CastsToJSON
This returns a copy of the object's data cast into a JSON form.

Specified by:
toJSON in interface CastsToJSON
Overrides:
toJSON in class BaseDatum
Returns:
The string representing this object in JSON format
See Also:
BaseDatum.toJSON()