|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sourceforge.jemm.client.DelegatingObjectDatabase
public abstract class DelegatingObjectDatabase
An ObjectDatabase implementation that delegates all its calls to the ObjectDatabase passed into the constructor.
| Constructor Summary | |
|---|---|
DelegatingObjectDatabase(ObjectDatabase database)
|
|
| Method Summary | |
|---|---|
void |
acquireLock(ClientThreadId threadId,
ID jemmId)
Asynchronous request to acquire a lock. |
ClassInfo |
getClassInfo(ClassId classId)
Returns the class information for the given class id. |
EnumInfo |
getEnumInfo(EnumId enumId)
Returns the classname for the given enum type id. |
JEMMObject |
getObject(ID jemmId)
Retrieves an object's information from the database or a local cache if the object has already been retrieved and still in memory. |
JEMMObject |
getRefreshedObject(ID jemmId)
Retrieves an object's information from the database but always calls the underlying database, updating the cache. |
JEMMObject |
getRoot(java.lang.String rootName)
Returns the object stored in the persistent root called 'rootName' |
ID |
newObject(ClassId classId,
JEMMObject obj)
Notification of a new user object creation by the client. |
TypeResponse<?> |
processTypeRequest(JEMMObject jemmObject,
ClassId classId,
TypeRequest<?> request)
|
void |
refreshObject(JEMMObject obj)
Retrieves the fields of the object again from the store and updates the passed object with all the values. |
ClassId |
registerClass(ClassInfo classInfo)
Register a user class. |
EnumId |
registerEnum(EnumInfo enumInfo)
Register an enumerated type. |
void |
releaseLock(ClientThreadId threadId,
ID jemmId)
Release the given lock held by the thread. |
void |
removeLockAcquiredListener(ClientId clientId)
Remove a lock listener |
void |
setClientLockAcquiredListener(ClientId clientId,
LockAcquiredListener listener)
Register a lock listener |
void |
setRoot(java.lang.String rootName,
JEMMObject newValue)
Set the persistent root reference to the given object. |
JEMMObject |
setRootIfNull(java.lang.String rootName,
JEMMObject newValue)
Sets the persistent root reference to the given object, if the root is currently null. |
void |
synchroniseObject(JEMMObject syncData)
Synchronise a client held object with the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatingObjectDatabase(ObjectDatabase database)
| Method Detail |
|---|
public void acquireLock(ClientThreadId threadId,
ID jemmId)
ObjectDatabase
acquireLock in interface ObjectDatabasethreadId - The requesting thread.jemmId - The id of the object to lock.
public void setClientLockAcquiredListener(ClientId clientId,
LockAcquiredListener listener)
ObjectDatabase
setClientLockAcquiredListener in interface ObjectDatabaseclientId - The client who is interested in their lock event notifications.listener - The listener to register.public ClassInfo getClassInfo(ClassId classId)
ObjectDatabase
getClassInfo in interface ObjectDatabaseclassId - The id of the held class.
public EnumInfo getEnumInfo(EnumId enumId)
ObjectDatabase
getEnumInfo in interface ObjectDatabaseenumId - The enum type id.
public JEMMObject getObject(ID jemmId)
ObjectDatabase
getObject in interface ObjectDatabasegetObject in interface ObjectSourcejemmId - The id of the object to retrieve.
public JEMMObject getRefreshedObject(ID jemmId)
ObjectDatabase
getRefreshedObject in interface ObjectDatabasejemmId - The id of the object to retrieve.
public JEMMObject getRoot(java.lang.String rootName)
ObjectDatabase
getRoot in interface ObjectDatabaserootName - The name of the persistent root.
public ID newObject(ClassId classId,
JEMMObject obj)
ObjectDatabase
newObject in interface ObjectDatabaseclassId - The class id of the new object (must be previously registered).
public ClassId registerClass(ClassInfo classInfo)
throws StructureModifiedException
ObjectDatabase
registerClass in interface ObjectDatabaseclassInfo - The information about the loaded user class (name/fields).
StructureModifiedException - if the class has been modified
and the Database does not accept the change
public EnumId registerEnum(EnumInfo enumInfo)
throws StructureModifiedException
ObjectDatabase
registerEnum in interface ObjectDatabaseenumInfo - The enumeration type information
StructureModifiedException - If a modification to the enum is detected.
public void releaseLock(ClientThreadId threadId,
ID jemmId)
ObjectDatabase
releaseLock in interface ObjectDatabasethreadId - The thread currently holding the lock.jemmId - The id of the object to release.public void removeLockAcquiredListener(ClientId clientId)
ObjectDatabase
removeLockAcquiredListener in interface ObjectDatabaseclientId - The id the the client who is no longer interested in lock events.
public void setRoot(java.lang.String rootName,
JEMMObject newValue)
ObjectDatabase
setRoot in interface ObjectDatabaserootName - The name of the persistent root.newValue - The new value of the root.
public JEMMObject setRootIfNull(java.lang.String rootName,
JEMMObject newValue)
ObjectDatabase
setRootIfNull in interface ObjectDatabaserootName - The name of the persistent root.newValue - The new value of the root.
public void synchroniseObject(JEMMObject syncData)
ObjectDatabase
synchroniseObject in interface ObjectDatabasesyncData - The object being synchronized.public void refreshObject(JEMMObject obj)
ObjectDatabase
refreshObject in interface ObjectDatabaseobj - The object to retrieve and update
public TypeResponse<?> processTypeRequest(JEMMObject jemmObject,
ClassId classId,
TypeRequest<?> request)
processTypeRequest in interface TypeRequestHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||