org.tentackle.appworx.rmi
Class AppDbObjectRemoteDelegateImpl<T extends AppDbObject>

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.tentackle.db.rmi.RemoteDelegateImpl<T>
                  extended by org.tentackle.db.rmi.DbObjectRemoteDelegateImpl<T>
                      extended by org.tentackle.appworx.rmi.AppDbObjectRemoteDelegateImpl<T>
Type Parameters:
T - the AppDbObject class
All Implemented Interfaces:
Serializable, Remote, AppDbObjectRemoteDelegate, DbObjectRemoteDelegate, RemoteDelegate
Direct Known Subclasses:
HistoryRemoteDelegateImpl, SecurityRemoteDelegateImpl

public abstract class AppDbObjectRemoteDelegateImpl<T extends AppDbObject>
extends DbObjectRemoteDelegateImpl<T>
implements AppDbObjectRemoteDelegate

Implementation of the remote delegate for AppDbObject.
Never instantiated.

Author:
harald
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.tentackle.appworx.rmi.AppDbObjectRemoteDelegate
AppDbObjectRemoteDelegate.BeingEditedToken
 
Field Summary
 
Fields inherited from class org.tentackle.db.rmi.DbObjectRemoteDelegateImpl
dbObject
 
Fields inherited from class org.tentackle.db.rmi.RemoteDelegateImpl
clazz, csf, db, port, session, ssf
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session, Class<T> clazz)
          Creates a delegate on the session socket.
AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session, Class<T> clazz, int socketConfig)
          Create a delegate on a non-default session socket.
AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session, Class<T> clazz, int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
          Creates delegate.
 
Method Summary
 DbObjectResult deleteObject(DbObject obj, boolean withLinkedObjects)
           
 boolean deletePlain(long id, long serial)
           
 boolean dummyUpdate(DbObject obj)
           
 List<Object> getTreeChildObjects(AppDbObject obj)
           
 List<Object> getTreeChildObjects(AppDbObject obj, Object parentObject)
           
 List<Object> getTreeParentObjects(AppDbObject obj)
           
 List<Object> getTreeParentObjects(AppDbObject obj, Object parentObject)
           
 DbObjectResult insertObject(DbObject obj, boolean withLinkedObjects)
           
 boolean insertPlain(DbObject obj)
           
 boolean isReferenced(ContextDb cb, long id)
           
protected  T newObject(ContextDb cb)
          Creates a new instance of the required class in the given context for methods that return a new object.
 QbfCursorResult searchQbfCursor(QbfParameter par)
           
 AppDbObject select(ContextDb cb, long id, boolean withLinkedObjects)
           
 List<? extends AppDbObject> selectAll(boolean withLinkedObjects)
           
 List<? extends AppDbObject> selectAllInContext(ContextDb cb)
           
 RemoteDbCursor selectAllInContextCursor(ContextDb cb)
           
 List<? extends AppDbObject> selectAllInContextFromServerCache(ContextDb cb)
           
 List<? extends AppDbObject> selectByNormText(ContextDb cb, String normText)
           
 RemoteDbCursor selectByNormTextCursor(ContextDb cb, String normText)
           
 AppDbObject selectLocked(ContextDb cb, long id, boolean withLinkedObjects)
           
protected  void setContextDb(ContextDb cb)
          Sets the contextdb in the default object.
protected  void setServerContextDb(ContextDb cb)
          Sets the contextdb in the default object with the Db set to DbGlobal.serverDb.
 AppDbObjectRemoteDelegate.BeingEditedToken transferEditedBy(long id)
           
 AppDbObjectRemoteDelegate.BeingEditedToken updateEditedBy(long id, Timestamp tokenExpiry, long userId, Timestamp curTime)
           
 boolean updateEditedByOnly(long id, long editedBy, Timestamp editedSince, Timestamp editedExpiry)
           
 DbObjectResult updateObject(DbObject obj, boolean withLinkedObjects)
           
 boolean updatePlain(DbObject obj)
           
 boolean updateSerial(long id, long serial)
           
 boolean updateSerialAndTableSerial(long id, long serial, long tableSerial)
           
 boolean updateTableSerial(long id)
           
 
Methods inherited from class org.tentackle.db.rmi.DbObjectRemoteDelegateImpl
getExpirationBacklog, getExpiredTableSerials, isReferenced, newObject, save, select, selectAllCursor, selectExpiredTableSerials, selectExpiredTableSerials, selectInValidContext, selectLocked, selectModification, selectSerial
 
Methods inherited from class org.tentackle.db.rmi.RemoteDelegateImpl
getClientSocketFactory, getPort, getServerSocketFactory, getSession
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.tentackle.db.rmi.DbObjectRemoteDelegate
getExpirationBacklog, getExpiredTableSerials, isReferenced, save, select, selectAllCursor, selectExpiredTableSerials, selectExpiredTableSerials, selectInValidContext, selectLocked, selectModification, selectSerial
 

Constructor Detail

AppDbObjectRemoteDelegateImpl

public AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session,
                                     Class<T> clazz,
                                     int port,
                                     RMIClientSocketFactory csf,
                                     RMIServerSocketFactory ssf)
                              throws RemoteException
Creates delegate.

Parameters:
session - the RMI session
clazz - the class the delegate provides service for
port - the port number on which the remote object receives calls, 0 = system default
csf - the client-side socket factory for making calls to the remote object, null = system default
ssf - the server-side socket factory for receiving remote calls, null = system default
Throws:
RemoteException

AppDbObjectRemoteDelegateImpl

public AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session,
                                     Class<T> clazz)
                              throws RemoteException
Creates a delegate on the session socket.

Parameters:
session - the RMI session
clazz - the subclass of DbObject
Throws:
RemoteException

AppDbObjectRemoteDelegateImpl

public AppDbObjectRemoteDelegateImpl(RemoteDbSessionImpl session,
                                     Class<T> clazz,
                                     int socketConfig)
                              throws RemoteException
Create a delegate on a non-default session socket.

Parameters:
session - is the RMI session
clazz - the subclass of DbObject
socketConfig - is of RemoteDbSessionImpl.SOCKETCONFIG_...
Throws:
RemoteException
Method Detail

setContextDb

protected void setContextDb(ContextDb cb)
Sets the contextdb in the default object.

Parameters:
cb - the db context

setServerContextDb

protected void setServerContextDb(ContextDb cb)
Sets the contextdb in the default object with the Db set to DbGlobal.serverDb.

Parameters:
cb - the db context

newObject

protected T newObject(ContextDb cb)
                                   throws RemoteException
Creates a new instance of the required class in the given context for methods that return a new object.

Parameters:
cb - the db context
Returns:
the created object
Throws:
RemoteException

updatePlain

public boolean updatePlain(DbObject obj)
                    throws RemoteException
Specified by:
updatePlain in interface DbObjectRemoteDelegate
Overrides:
updatePlain in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

dummyUpdate

public boolean dummyUpdate(DbObject obj)
                    throws RemoteException
Specified by:
dummyUpdate in interface DbObjectRemoteDelegate
Overrides:
dummyUpdate in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

updateSerial

public boolean updateSerial(long id,
                            long serial)
                     throws RemoteException
Specified by:
updateSerial in interface DbObjectRemoteDelegate
Overrides:
updateSerial in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

updateTableSerial

public boolean updateTableSerial(long id)
                          throws RemoteException
Specified by:
updateTableSerial in interface DbObjectRemoteDelegate
Overrides:
updateTableSerial in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

updateSerialAndTableSerial

public boolean updateSerialAndTableSerial(long id,
                                          long serial,
                                          long tableSerial)
                                   throws RemoteException
Specified by:
updateSerialAndTableSerial in interface DbObjectRemoteDelegate
Overrides:
updateSerialAndTableSerial in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

deletePlain

public boolean deletePlain(long id,
                           long serial)
                    throws RemoteException
Specified by:
deletePlain in interface DbObjectRemoteDelegate
Overrides:
deletePlain in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

insertPlain

public boolean insertPlain(DbObject obj)
                    throws RemoteException
Specified by:
insertPlain in interface DbObjectRemoteDelegate
Overrides:
insertPlain in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

updateObject

public DbObjectResult updateObject(DbObject obj,
                                   boolean withLinkedObjects)
                            throws RemoteException
Specified by:
updateObject in interface DbObjectRemoteDelegate
Overrides:
updateObject in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

insertObject

public DbObjectResult insertObject(DbObject obj,
                                   boolean withLinkedObjects)
                            throws RemoteException
Specified by:
insertObject in interface DbObjectRemoteDelegate
Overrides:
insertObject in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

deleteObject

public DbObjectResult deleteObject(DbObject obj,
                                   boolean withLinkedObjects)
                            throws RemoteException
Specified by:
deleteObject in interface DbObjectRemoteDelegate
Overrides:
deleteObject in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

selectAll

public List<? extends AppDbObject> selectAll(boolean withLinkedObjects)
                                      throws RemoteException
Specified by:
selectAll in interface AppDbObjectRemoteDelegate
Specified by:
selectAll in interface DbObjectRemoteDelegate
Overrides:
selectAll in class DbObjectRemoteDelegateImpl<T extends AppDbObject>
Throws:
RemoteException

select

public AppDbObject select(ContextDb cb,
                          long id,
                          boolean withLinkedObjects)
                   throws RemoteException
Specified by:
select in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectLocked

public AppDbObject selectLocked(ContextDb cb,
                                long id,
                                boolean withLinkedObjects)
                         throws RemoteException
Specified by:
selectLocked in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectByNormText

public List<? extends AppDbObject> selectByNormText(ContextDb cb,
                                                    String normText)
                                             throws RemoteException
Specified by:
selectByNormText in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectByNormTextCursor

public RemoteDbCursor selectByNormTextCursor(ContextDb cb,
                                             String normText)
                                      throws RemoteException
Specified by:
selectByNormTextCursor in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectAllInContext

public List<? extends AppDbObject> selectAllInContext(ContextDb cb)
                                               throws RemoteException
Specified by:
selectAllInContext in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectAllInContextFromServerCache

public List<? extends AppDbObject> selectAllInContextFromServerCache(ContextDb cb)
                                                              throws RemoteException
Specified by:
selectAllInContextFromServerCache in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

selectAllInContextCursor

public RemoteDbCursor selectAllInContextCursor(ContextDb cb)
                                        throws RemoteException
Specified by:
selectAllInContextCursor in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

searchQbfCursor

public QbfCursorResult searchQbfCursor(QbfParameter par)
                                throws RemoteException
Specified by:
searchQbfCursor in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

getTreeParentObjects

public List<Object> getTreeParentObjects(AppDbObject obj)
                                  throws RemoteException
Specified by:
getTreeParentObjects in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

getTreeParentObjects

public List<Object> getTreeParentObjects(AppDbObject obj,
                                         Object parentObject)
                                  throws RemoteException
Specified by:
getTreeParentObjects in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

getTreeChildObjects

public List<Object> getTreeChildObjects(AppDbObject obj)
                                 throws RemoteException
Specified by:
getTreeChildObjects in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

getTreeChildObjects

public List<Object> getTreeChildObjects(AppDbObject obj,
                                        Object parentObject)
                                 throws RemoteException
Specified by:
getTreeChildObjects in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

isReferenced

public boolean isReferenced(ContextDb cb,
                            long id)
                     throws RemoteException
Specified by:
isReferenced in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

updateEditedBy

public AppDbObjectRemoteDelegate.BeingEditedToken updateEditedBy(long id,
                                                                 Timestamp tokenExpiry,
                                                                 long userId,
                                                                 Timestamp curTime)
                                                          throws RemoteException
Specified by:
updateEditedBy in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

transferEditedBy

public AppDbObjectRemoteDelegate.BeingEditedToken transferEditedBy(long id)
                                                            throws RemoteException
Specified by:
transferEditedBy in interface AppDbObjectRemoteDelegate
Throws:
RemoteException

updateEditedByOnly

public boolean updateEditedByOnly(long id,
                                  long editedBy,
                                  Timestamp editedSince,
                                  Timestamp editedExpiry)
                           throws RemoteException
Specified by:
updateEditedByOnly in interface AppDbObjectRemoteDelegate
Throws:
RemoteException


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de