com.synex.xml.db
Interface DBManager

All Known Implementing Classes:
DBManagerImpl

public interface DBManager

Basic interface for database managers.


Method Summary
 java.util.Map addRow(java.lang.String tableName, java.util.Map ids, java.util.Map fields)
          Adds a new row.
 void close()
          Releases a database and JDBC resources immediately instead of waiting for them to be automatically released.
 void deleteRow(java.lang.String tableName, java.util.Map ids, java.util.Map fields)
          Deletes an existed record.
 void flush()
          Flushes this database connection.
 void open(java.lang.String driver, java.lang.String url, java.lang.String user, java.lang.String password)
          Attempts to establish a connection to the given database URL.
 void updateRow(java.lang.String tableName, java.util.Map ids, java.util.Map fields)
          Updates an existed record.
 

Method Detail

addRow

public java.util.Map addRow(java.lang.String tableName,
                                  java.util.Map ids,
                                  java.util.Map fields)
                           throws DBManagerException
Adds a new row.
Parameters:
ids - the list of primary keys (name/value pairs)
fields - the list of fields (name/value pairs)
tableName - the name of the table
Returns:
Map the primary keys
Throws:
DBManagerException - if a database access error occurs

updateRow

public void updateRow(java.lang.String tableName,
                      java.util.Map ids,
                      java.util.Map fields)
               throws DBManagerException
Updates an existed record.
Parameters:
ids - the list of primary keys (name/value pairs)
fields - the list of fields (name/value pairs)
tableName - the name of the table
Throws:
DBManagerException - if a database access error occurs

deleteRow

public void deleteRow(java.lang.String tableName,
                      java.util.Map ids,
                      java.util.Map fields)
               throws DBManagerException
Deletes an existed record.
Parameters:
ids - the list of primary keys (name/value pairs)
fields - the list of fields (name/value pairs)
tableName - the name of the table
Throws:
DBManagerException - if a database access error occurs

close

public void close()
           throws DBManagerException
Releases a database and JDBC resources immediately instead of waiting for them to be automatically released.
Throws:
DBManagerException - if a database access error occurs

open

public void open(java.lang.String driver,
                 java.lang.String url,
                 java.lang.String user,
                 java.lang.String password)
          throws DBManagerException
Attempts to establish a connection to the given database URL.
Parameters:
driver - the new JDBC Driver
url - a database url of the form jdbc:subprotocol:subname
user - the database user on whose behalf the connection is being made
password - the user's password
Throws:
DBManagerException - if a database access error occurs

flush

public void flush()
           throws DBManagerException
Flushes this database connection.
Throws:
DBManagerException - if a database access error occurs


Submit a bug or feature
For further API reference and developer documentation, see XML Bulk Loader Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2002 Sergey Yakovlev, All Rights Reserved.