com.fuse.storage
Interface FUSEDatabase

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
SQLDatabaseImpl

public interface FUSEDatabase
extends java.rmi.Remote

FUSEDatabase is an highlevel remote interface to a database which can store FUSEDataObjects.

See Also:
FUSEDataObject

Method Summary
 FUSEDataObject createNew(java.lang.String type)
          Constructs a FUSEDataObject of given type, which is compatible with the database implementation.
 void delete(FUSEDataObject dbObject)
          Deletes an object from the database
 FUSEDataObject insert(FUSEDataObject dbObject)
          Stores an object
 java.util.Vector query(ObjectQueryBean bean)
          Makes a query of data object from the database.
 java.lang.Object querySummary(SummaryQueryBean bean)
          Makes a query which returns some numeric information.
 FUSEDataObject update(FUSEDataObject dbObject)
          Updates an object in the database
 

Method Detail

createNew

FUSEDataObject createNew(java.lang.String type)
                         throws java.lang.ClassNotFoundException,
                                java.rmi.RemoteException
Constructs a FUSEDataObject of given type, which is compatible with the database implementation. The loaded object is typically named .: for example, if type is "FUSEUser" and we are using SQL implementation, the class is com.fuse.storage.sql.FUSEUserSQL

Parameters:
type - object type, such as "FUSEUser" or "logentry"
Throws:
java.lang.ClassNotFoundException - if object not found
java.rmi.RemoteException

insert

FUSEDataObject insert(FUSEDataObject dbObject)
                      throws DatabaseException,
                             java.rmi.RemoteException
Stores an object

Parameters:
dbObject - the object to store
Throws:
DatabaseException - if insertion failed
java.rmi.RemoteException

delete

void delete(FUSEDataObject dbObject)
            throws DatabaseException,
                   java.rmi.RemoteException
Deletes an object from the database

Parameters:
dbObject - the data object to delete
Throws:
DatabaseException - if deleting failed
java.rmi.RemoteException

update

FUSEDataObject update(FUSEDataObject dbObject)
                      throws DatabaseException,
                             java.rmi.RemoteException
Updates an object in the database

Parameters:
dbObject - the data object to update
Throws:
DatabaseException
java.rmi.RemoteException

query

java.util.Vector query(ObjectQueryBean bean)
                       throws DatabaseException,
                              java.rmi.RemoteException
Makes a query of data object from the database. The actual query is done by the ObjectQueryBean

Parameters:
bean - the objectQueryBean which implements the query
Throws:
DatabaseException
java.rmi.RemoteException

querySummary

java.lang.Object querySummary(SummaryQueryBean bean)
                              throws DatabaseException,
                                     java.rmi.RemoteException
Makes a query which returns some numeric information.

Parameters:
bean - the bean which implements the query
Throws:
DatabaseException
java.rmi.RemoteException