All Packages Class Hierarchy This Package Previous Next Index
Applications that want DOMToDBMS to generate key values pass an instance of an object that implements this class to DOMToDBMS. Keys are used to join tables (class table-to-class table or class table- to-property table) and also to retrieve data from root tables. Whether DOMToDBMS generates a key for a given table (or one or more properties are mapped to the key columns) depends on the mapping to that table.
Programmers using the lowest level interface to XML-DBMS call initialize before passing a KeyGenerator object to DOMToDBMS and close after DOMToDBMS returns. They do not call generateKey, which is called only by DOMToDBMS.
Programmers calling higher level interfaces to XML-DBMS do not call any of the methods on this interface. Instead, they specify the name of a class that implements this interface and the properties needed to initialize that class.
The helper class KeyGeneratorHighLow provides a sample implementation of this interface.
public abstract void initialize(Properties props) throws XMLMiddlewareException
This method must be called by applications before the key generator is passed to DOMToDBMS. Applications using DOMToDBMS call this method.
public abstract Object[] generateKey() throws XMLMiddlewareException
This method is called by DOMToDBMS. Applications using DOMToDBMS do not need to call this method.
public abstract void close() throws XMLMiddlewareException
This method must be called by applications after the key generator is used by DOMToDBMS. Note that it is generally possible to use the key generator multiple times before it is closed. Programmers using DOMToDBMS call this method.
All Packages Class Hierarchy This Package Previous Next Index