All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sso.Registry

java.lang.Object
   |
   +----sso.Registry

public final class Registry
extends Object

Variable Index

 o ID_DEFAULT_GRAPHIC
 o ID_INVALID

Constructor Index

 o Registry()

Method Index

 o get(int)
Get the reference to this object if loaded.
 o getConnection()
Get the database connection.
 o getXY(int, int)
Get the tile at the given location
 o isLoaded(int)
Returns true if an object is loaded.
 o load(int)
Load the given object by id.
 o main(String[])
Tester.
 o markLoaded(Persistant)
Set an object as loaded.
 o register(Persistant)
Register a new object with the database.
 o unload(Persistant)
Unload an object.
 o unregister(Persistant)
Unregister the given object with the database.

Variables

 o ID_INVALID
 public static final int ID_INVALID
 o ID_DEFAULT_GRAPHIC
 public static final int ID_DEFAULT_GRAPHIC

Constructors

 o Registry
 public Registry()

Methods

 o register
 public static synchronized int register(Persistant po)
Register a new object with the database. Return the next unique object id. Synchronized, mostly because I don't have a lot of choice.

 o unregister
 public static void unregister(Persistant po)
Unregister the given object with the database. The caller should have removed their type rows from the database already.

 o load
 public static Persistant load(int id)
Load the given object by id. This will ensure the object get loaded completely...however all objects returned are Persistant object type.

 o getConnection
 public static Connection getConnection()
Get the database connection.

 o markLoaded
 public static void markLoaded(Persistant po)
Set an object as loaded.

 o isLoaded
 public static boolean isLoaded(int id)
Returns true if an object is loaded.

 o unload
 public static void unload(Persistant po)
Unload an object.

 o get
 public static Persistant get(int id)
Get the reference to this object if loaded.

 o getXY
 public static Tile getXY(int x,
                          int y)
Get the tile at the given location

 o main
 public static void main(String args[])
Tester.


All Packages  Class Hierarchy  This Package  Previous  Next  Index