##$Id: listener.java.vm,v 1.3 2007/06/14 13:02:12 kameleono Exp $ #parse( "table.include.vm" ) #parse( "header.include.vm" ) $codewriter.setCurrentJavaFilename("$table.getPackage()", "${listenerClass}.java") package $table.getPackage(); import ${pkg}.exception.DAOException; /** * Listener that is notified of $tablename table changes. * @author sql2java */ public interface $listenerClass { /** * Invoked just before inserting a $beanClass record into the database. * * @param bean the $beanClass that is about to be inserted */ public void beforeInsert($beanClass bean) throws DAOException; /** * Invoked just after a $beanClass record is inserted in the database. * * @param bean the $beanClass that was just inserted */ public void afterInsert($beanClass bean) throws DAOException; /** * Invoked just before updating a $beanClass record in the database. * * @param bean the $beanClass that is about to be updated */ public void beforeUpdate($beanClass bean) throws DAOException; /** * Invoked just after updating a $beanClass record in the database. * * @param bean the $beanClass that was just updated */ public void afterUpdate($beanClass bean) throws DAOException; /** * Invoked just before deleting a $beanClass record in the database. * * @param bean the $beanClass that is about to be deleted */ public void beforeDelete($beanClass bean) throws DAOException; /** * Invoked just after deleting a $beanClass record in the database. * * @param bean the $beanClass that was just deleted */ public void afterDelete($beanClass bean) throws DAOException; }