com.threerings.whirled.server.persist

## Class DummySceneRepository

- java.lang.Object
- - com.threerings.whirled.server.persist.DummySceneRepository

All Implemented Interfaces:
  SceneRepository

    public class DummySceneRepository
    extends Object
    implements SceneRepository

The dummy scene repository just pretends to load and store scenes, but in fact it just creates new blank scenes when requested to load a scene and does nothing when requested to save one.

### Constructor Summary

Constructors
Constructor and Description
`DummySceneRepository()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `applyAndRecordUpdate(SceneModel model, SceneUpdate update)` Applise the supplied scene update to persistent representation of its associated scene, then stores the update persistently for future invocations of the server to load.
`Object` `loadExtras(int sceneId, SceneModel model)` Loads optional additional scene data.
`SceneModel` `loadSceneModel(int sceneId)` Fetches the model for the scene with the specified scene id.
`UpdateList` `loadUpdates(int sceneId)` Fetches the set of updates associated with the specified scene.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DummySceneRepository

    public DummySceneRepository()

### Method Detail

#### loadSceneModel

    public SceneModel loadSceneModel(int sceneId)
                              throws PersistenceException,
                                     NoSuchSceneException

Description copied from interface: `SceneRepository`
Fetches the model for the scene with the specified scene id.

Specified by:
  `loadSceneModel` in interface `SceneRepository`
Throws:
  `PersistenceException` - thrown if an error occurs attempting to load the scene data.
  `NoSuchSceneException` - thrown if no scene exists with the specified scene id.

#### loadUpdates

    public UpdateList loadUpdates(int sceneId)
                           throws PersistenceException

Description copied from interface: `SceneRepository`
Fetches the set of updates associated with the specified scene.

Specified by:
  `loadUpdates` in interface `SceneRepository`
Throws:
  `PersistenceException` - thrown if an error occurs attempting to load the scene updates.

#### loadExtras

    public Object loadExtras(int sceneId,
                             SceneModel model)
                      throws PersistenceException

Description copied from interface: `SceneRepository`
Loads optional additional scene data. This data is loaded during the scene resolution process and made available to the scene manager via `SceneManager.gotSceneData(java.lang.Object)`.

Specified by:
  `loadExtras` in interface `SceneRepository`
Throws:
  `PersistenceException`

#### applyAndRecordUpdate

    public void applyAndRecordUpdate(SceneModel model,
                                     SceneUpdate update)
                              throws PersistenceException

Description copied from interface: `SceneRepository`
Applise the supplied scene update to persistent representation of its associated scene, then stores the update persistently for future invocations of the server to load. Note: the scene update will have already been applied to the supplied scene model.

Specified by:
  `applyAndRecordUpdate` in interface `SceneRepository`
Throws:
  `PersistenceException` - thrown if an error occurs attempting to apply the scene update.