All Packages Class Hierarchy This Package Previous Next Index
Class sso.Registry
java.lang.Object
|
+----sso.Registry
- public final class Registry
- extends Object
-
ID_DEFAULT_GRAPHIC
-
-
ID_INVALID
-
-
Registry()
-
-
get(int)
- Get the reference to this object if loaded.
-
getConnection()
- Get the database connection.
-
getXY(int, int)
- Get the tile at the given location
-
isLoaded(int)
- Returns true if an object is loaded.
-
load(int)
- Load the given object by id.
-
main(String[])
- Tester.
-
markLoaded(Persistant)
- Set an object as loaded.
-
register(Persistant)
- Register a new object with the database.
-
unload(Persistant)
- Unload an object.
-
unregister(Persistant)
- Unregister the given object with the database.
ID_INVALID
public static final int ID_INVALID
ID_DEFAULT_GRAPHIC
public static final int ID_DEFAULT_GRAPHIC
Registry
public Registry()
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.
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.
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.
getConnection
public static Connection getConnection()
- Get the database connection.
markLoaded
public static void markLoaded(Persistant po)
- Set an object as loaded.
isLoaded
public static boolean isLoaded(int id)
- Returns true if an object is loaded.
unload
public static void unload(Persistant po)
- Unload an object.
get
public static Persistant get(int id)
- Get the reference to this object if loaded.
getXY
public static Tile getXY(int x,
int y)
- Get the tile at the given location
main
public static void main(String args[])
- Tester.
All Packages Class Hierarchy This Package Previous Next Index