org.apache.torque.betwixt
Interface RecordHandler

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
BaseObjectRecordHandler

public interface RecordHandler
extends java.lang.Cloneable

Interface that all record handlers called by the Importer class should impliment.

Note that to allow for import transactions to be rolled back, implementors should use the Importer.getConnection() method when any DB save, update, or delete actions are performed.

Author:
Greg Monroe

Method Summary
 void addUpdateRecord(java.lang.Object record, Importer dispatcher)
          Handles both creating new record or updating existing record.
 java.lang.Object clone()
          RecordHandlers need to be cloneable so the dispatcher can clone handlers as needed.
 void deleteRecord(java.lang.Object record, Importer dispatcher)
          Handles deleting records.
 

Method Detail

addUpdateRecord

void addUpdateRecord(java.lang.Object record,
                     Importer dispatcher)
                     throws java.lang.Exception
Handles both creating new record or updating existing record.

Implementors need to report any error or success back via the dispatcher's notifyListeners method.

Parameters:
record - The record object to process.
dispatcher - The object to get connection, event listener info, and the like from.
Throws:
java.lang.Exception

deleteRecord

void deleteRecord(java.lang.Object record,
                  Importer dispatcher)
                  throws java.lang.Exception
Handles deleting records.

Implementors need to report any error or success back via the dispatcher's notifyListeners method.

Parameters:
record - The record object to process.
dispatcher - The object to get connection, event listener info, and the like from.
Throws:
java.lang.Exception

clone

java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
RecordHandlers need to be cloneable so the dispatcher can clone handlers as needed.

Returns:
Throws:
java.lang.CloneNotSupportedException


Copyright © 2006 Torque Add-ons Project. All Rights Reserved.