com.threerings.admin.server.persist
Class ConfigRepository

java.lang.Object
  extended by com.samskivert.depot.DepotRepository
      extended by com.threerings.admin.server.persist.ConfigRepository

public class ConfigRepository
extends DepotRepository

Stores configuration information in a database table.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.samskivert.depot.DepotRepository
DepotRepository.CacheStrategy
 
Field Summary
 
Fields inherited from class com.samskivert.depot.DepotRepository
_ctx, _dataMigs
 
Constructor Summary
ConfigRepository(PersistenceContext ctx)
          Constructs a new config repository with the specified persistence context.
 
Method Summary
protected  void getManagedRecords(Set<Class<? extends PersistentRecord>> classes)
           
 HashMap<String,String> loadConfig(String node, String object)
          Loads up the configuration data for the specified object.
 void updateConfig(String node, String object, String field, String value)
          Updates the specified configuration datum.
 
Methods inherited from class com.samskivert.depot.DepotRepository
delete, delete, deleteAll, deleteAll, deleteAll, deleteAll, doUpdate, findAll, findAll, findAll, findAll, findAllKeys, findAllKeys, from, init, insert, load, load, load, load, loadAll, loadAll, makeValue, map, registerMigration, requireNotComputed, resolveRecords, runMigration, store, update, update, updatePartial, updatePartial, updatePartial, updatePartial, updatePartial
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigRepository

public ConfigRepository(PersistenceContext ctx)
Constructs a new config repository with the specified persistence context.

Method Detail

loadConfig

public HashMap<String,String> loadConfig(String node,
                                         String object)
Loads up the configuration data for the specified object.

Returns:
a map containing field/value pairs for all stored configuration data.

updateConfig

public void updateConfig(String node,
                         String object,
                         String field,
                         String value)
Updates the specified configuration datum.


getManagedRecords

protected void getManagedRecords(Set<Class<? extends PersistentRecord>> classes)
Specified by:
getManagedRecords in class DepotRepository