rmrs.persist
Class RelationalBroker
java.lang.Object
|
+--rmrs.persist.RelationalBroker
- Direct Known Subclasses:
- ObjectRelationalBroker
- public class RelationalBroker
- extends java.lang.Object
- implements PersistenceBroker
A persistence broker for relational data bases. Will use one table
per class along the path of generalization. All will use the OID as
a shared key.
- Version:
- $Id: RelationalBroker.java,v 1.1 1999/12/06 19:25:44 schadow Exp SCHADOW_G $
- Author:
- Gunther Schadow
Field Summary |
protected java.util.Hashtable |
classMap
|
protected java.sql.Connection |
con
|
protected java.util.Hashtable |
objectCache
|
protected java.lang.String |
password
|
protected java.lang.String |
url
|
protected java.lang.String |
user
|
Method Summary |
protected void |
buildQuery(java.lang.Object queryExample,
rmrs.persist.SQLSelect sql,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
|
protected void |
doLoad(java.lang.Object o,
java.sql.ResultSet rs,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
|
protected void |
doSave(java.lang.Object o,
rmrs.persist.SQLStatement sql,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
|
protected void |
initializeClassMap()
|
PersistentObject |
load(java.lang.Class classToConformTo,
OID oid)
LOAD |
ObjectSet |
query(PersistentObject queryExample)
QUERY |
protected void |
register(PersistentObject o)
|
OID |
save(PersistentObject o)
SAVE |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
classMap
protected java.util.Hashtable classMap
url
protected java.lang.String url
user
protected java.lang.String user
password
protected java.lang.String password
con
protected java.sql.Connection con
objectCache
protected java.util.Hashtable objectCache
RelationalBroker
public RelationalBroker(java.lang.String url,
java.lang.String user,
java.lang.String password)
throws PersistException
RelationalBroker
public RelationalBroker(java.sql.Connection con)
throws PersistException
initializeClassMap
protected void initializeClassMap()
throws PersistException
register
protected void register(PersistentObject o)
throws PersistException
save
public OID save(PersistentObject o)
throws PersistException
- SAVE
- Specified by:
- save in interface PersistenceBroker
doSave
protected void doSave(java.lang.Object o,
rmrs.persist.SQLStatement sql,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
throws PersistException,
java.lang.IllegalAccessException
load
public PersistentObject load(java.lang.Class classToConformTo,
OID oid)
throws PersistException
- LOAD
- Specified by:
- load in interface PersistenceBroker
doLoad
protected void doLoad(java.lang.Object o,
java.sql.ResultSet rs,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
throws PersistException,
java.lang.IllegalAccessException,
java.sql.SQLException,
java.lang.InstantiationException
query
public ObjectSet query(PersistentObject queryExample)
throws PersistException
- QUERY
- Specified by:
- query in interface PersistenceBroker
buildQuery
protected void buildQuery(java.lang.Object queryExample,
rmrs.persist.SQLSelect sql,
java.lang.String prefix,
rmrs.persist.RelClassMapping classMapping)
throws PersistException,
java.lang.IllegalAccessException