|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RemoteObject java.rmi.server.RemoteServer java.rmi.server.UnicastRemoteObject com.fuse.storage.sql.SQLDatabaseImpl
public class SQLDatabaseImpl
SQLDatabase implements a simple database which stores data into SQL database thru JDBC.
FUSEDataObject
,
Serialized FormField Summary | |
---|---|
protected java.util.Hashtable |
classCache
|
protected DatabaseConnectionManager |
connMgr
|
protected static SQLDatabaseImpl |
localInstance
|
protected java.util.Vector |
objectPackages
|
protected java.util.Properties |
properties
|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
SQLDatabaseImpl(java.lang.String propFile)
|
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 |
static SQLDatabaseImpl |
getLocalInstance()
|
FUSEDataObject |
insert(FUSEDataObject dbObject)
Stores an object |
static void |
main(java.lang.String[] args)
Starts up the SQLDatabaseImpl Usage: java .com.fuse.storage.SQL.SQLDatabaseImpl [rmiUrl] |
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 |
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 |
Field Detail |
---|
protected DatabaseConnectionManager connMgr
protected java.util.Hashtable classCache
protected java.util.Vector objectPackages
protected java.util.Properties properties
protected static SQLDatabaseImpl localInstance
Constructor Detail |
---|
public SQLDatabaseImpl(java.lang.String propFile) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public static void main(java.lang.String[] args)
public static SQLDatabaseImpl getLocalInstance()
public FUSEDataObject createNew(java.lang.String type) throws java.lang.ClassNotFoundException, java.rmi.RemoteException
createNew
in interface FUSEDatabase
type
- object type, such as "FUSEUser" or "logentry"
java.lang.ClassNotFoundException
- if object not found
java.rmi.RemoteException
public FUSEDataObject insert(FUSEDataObject dbObject) throws DatabaseException, java.rmi.RemoteException
insert
in interface FUSEDatabase
dbObject
- the object to store
DatabaseException
- if insertion failed
java.rmi.RemoteException
public void delete(FUSEDataObject dbObject) throws DatabaseException, java.rmi.RemoteException
delete
in interface FUSEDatabase
dbObject
- the data object to delete
DatabaseException
- if deleting failed
java.rmi.RemoteException
public FUSEDataObject update(FUSEDataObject dbObject) throws DatabaseException, java.rmi.RemoteException
update
in interface FUSEDatabase
dbObject
- the data object to update
DatabaseException
java.rmi.RemoteException
public java.util.Vector query(ObjectQueryBean bean) throws DatabaseException, java.rmi.RemoteException
query
in interface FUSEDatabase
bean
- the objectQueryBean which implements the query
DatabaseException
java.rmi.RemoteException
public java.lang.Object querySummary(SummaryQueryBean bean) throws DatabaseException, java.rmi.RemoteException
querySummary
in interface FUSEDatabase
bean
- the bean which implements the query
DatabaseException
java.rmi.RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |