uk.co.kimble.cobra.rmi
Class PersistentSourceAdapter

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--uk.co.kimble.cobra.rmi.PersistentSourceAdapter

public class PersistentSourceAdapter
extends java.rmi.server.UnicastRemoteObject
implements PersistentSource

Adapts a local PersistentSource to the remote inteface

See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
PersistentSourceAdapter()
          Object construction
 
Method Summary
 int delete(PersistentObject object)
          Deletes an object from the persisent store, the object is identified by its primary key(s) values.
 int delete(java.lang.String class_name, PersistentCriteria criteria)
          Deletes aan object's attributes from a database table row, the database and table are located throught the data dictionary and the row is identified by the primary key(s).
 PersistentObject retrieve(PersistentObject object)
          Retrieves an object's attributes from a database table row, the database and table are located throught the data dictionary and the row is identified by the primary key(s).
 PersistentSet retrieve(java.lang.String class_name, PersistentCriteria criteria)
           
 int save(PersistentObject object)
          Saves an object from the persisent store, the object is identified by its primary key(s) values.
 
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
 

Constructor Detail

PersistentSourceAdapter

public PersistentSourceAdapter()
                        throws java.rmi.RemoteException,
                               PersistentException
Object construction
Method Detail

retrieve

public PersistentObject retrieve(PersistentObject object)
                          throws PersistentException
Retrieves an object's attributes from a database table row, the database and table are located throught the data dictionary and the row is identified by the primary key(s).

Specified by:
retrieve in interface PersistentSource
Parameters:
persistent_object - Remote object to be loaded, with primary key(s) set

retrieve

public PersistentSet retrieve(java.lang.String class_name,
                              PersistentCriteria criteria)
                       throws java.rmi.RemoteException,
                              PersistentException
Specified by:
retrieve in interface PersistentSource

delete

public int delete(PersistentObject object)
           throws PersistentException
Deletes an object from the persisent store, the object is identified by its primary key(s) values.

Specified by:
delete in interface PersistentSource
Parameters:
persistent_object - Remote object to be deleted, with primary key(s) set
Throws:
PersistentException -  

delete

public int delete(java.lang.String class_name,
                  PersistentCriteria criteria)
           throws PersistentException
Deletes aan object's attributes from a database table row, the database and table are located throught the data dictionary and the row is identified by the primary key(s).

Specified by:
delete in interface PersistentSource
Parameters:
persistent_object - Remote object to be delete, with primary key(s) set
Throws:
PersistentException -  

save

public int save(PersistentObject object)
         throws PersistentException
Saves an object from the persisent store, the object is identified by its primary key(s) values.

Specified by:
save in interface PersistentSource
Parameters:
persistent_object - Remote object to be saved
Throws:
PersistentException -