|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A Handler is a piece of code that knows how to handle a specific type, or a group of types. It is specific to a certain data storage system, and should be able to store and retreive nodes in that storage system.
| Method Summary | |
Node |
add(DBImplementation db,
java.sql.Connection connection,
Mapping parent,
java.lang.String path,
org.gjt.xpp.XmlNode nodeXml)
Add a new node described by the given nodeXml to the storage system. |
void |
addChild(DBImplementation db,
java.sql.Connection connection,
Mapping parentMapping,
java.lang.String childPath,
org.gjt.xpp.XmlNode child)
Do whatever is necessary to add the given child to the described parent. |
void |
create(java.sql.Connection connection)
Create everything that is needed for storage. |
void |
delete(DBImplementation db,
java.sql.Connection connection,
int id)
Delete the node with the given id. |
void |
drop(java.sql.Connection connection)
Remove everything that is needed for storage. |
boolean |
exists(DBImplementation db,
java.sql.Connection connection,
int id)
Check and see if a node with the given id exists. |
Node |
get(DBImplementation db,
java.sql.Connection connection,
int id)
Get the node with the given id from the storage system. |
Node |
update(DBImplementation db,
java.sql.Connection connection,
Mapping mapping,
org.gjt.xpp.XmlNode nodeXml)
Update the node whose mapping is given so it matches the given XML representation. |
| Method Detail |
public void create(java.sql.Connection connection)
throws soaprmi.RemoteException,
java.sql.SQLException
connection - A database connection.
soaprmi.RemoteException
java.sql.SQLException
public void drop(java.sql.Connection connection)
throws soaprmi.RemoteException,
java.sql.SQLException
connection - A database connection.
soaprmi.RemoteException
java.sql.SQLException
public Node add(DBImplementation db,
java.sql.Connection connection,
Mapping parent,
java.lang.String path,
org.gjt.xpp.XmlNode nodeXml)
throws soaprmi.RemoteException,
java.sql.SQLException,
org.gjt.xpp.XmlPullParserException
connection - A database connection.parent - A mapping for the new node's parent.path - The path to this new node.nodeXml - An XML representation of the new node.
soaprmi.RemoteException
java.sql.SQLException
org.gjt.xpp.XmlPullParserException
public void addChild(DBImplementation db,
java.sql.Connection connection,
Mapping parentMapping,
java.lang.String childPath,
org.gjt.xpp.XmlNode child)
throws soaprmi.RemoteException,
java.sql.SQLException,
org.gjt.xpp.XmlPullParserException
connection - A database connection.parentMapping - The parent's mapping.childPath - The child's path.child - An XML representation of the child.
soaprmi.RemoteException
java.sql.SQLException
org.gjt.xpp.XmlPullParserException
public Node update(DBImplementation db,
java.sql.Connection connection,
Mapping mapping,
org.gjt.xpp.XmlNode nodeXml)
throws soaprmi.RemoteException,
java.sql.SQLException,
org.gjt.xpp.XmlPullParserException
connection - A database connection.mapping - The mapping for the node to be updated.nodeXml - The node's new XML representation.
soaprmi.RemoteException
java.sql.SQLException
org.gjt.xpp.XmlPullParserException
public Node get(DBImplementation db,
java.sql.Connection connection,
int id)
throws soaprmi.RemoteException,
java.sql.SQLException,
org.gjt.xpp.XmlPullParserException
connection - A database connection.id - The id of the node to be retreived.
soaprmi.RemoteException
java.sql.SQLException
org.gjt.xpp.XmlPullParserException
public boolean exists(DBImplementation db,
java.sql.Connection connection,
int id)
throws soaprmi.RemoteException,
java.sql.SQLException
connection - A database connection.id - The id of the node to look up.
soaprmi.RemoteException
java.sql.SQLException
public void delete(DBImplementation db,
java.sql.Connection connection,
int id)
throws soaprmi.RemoteException,
java.sql.SQLException
connection - A database connection.id - The id of the node to delete.
soaprmi.RemoteException
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||