butler.ext.log
Class UsernameListener
java.lang.Object
butler.sql.record.RecordListener.BaseImpl
butler.ext.log.UsernameListener
- All Implemented Interfaces:
- RecordListener
public class UsernameListener
- extends RecordListener.BaseImpl
Record listener that ensure that a username column is updated with
the current user when the record is saved.
- Author:
- Fredrik Bertilsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UsernameListener
public UsernameListener(Column col,
UsernameCallback callback)
UsernameListener
public UsernameListener(Column col,
UsernameCallback callback,
boolean onlyInsert)
init
public void init(Record rec)
throws java.lang.Exception
- Specified by:
init
in interface RecordListener
- Overrides:
init
in class RecordListener.BaseImpl
- Throws:
java.lang.Exception
beforeUpdate
public void beforeUpdate(Record rec)
throws java.lang.Exception
- Specified by:
beforeUpdate
in interface RecordListener
- Overrides:
beforeUpdate
in class RecordListener.BaseImpl
- Throws:
java.lang.Exception
beforeInsert
public void beforeInsert(Record rec)
throws java.lang.Exception
- Specified by:
beforeInsert
in interface RecordListener
- Overrides:
beforeInsert
in class RecordListener.BaseImpl
- Throws:
java.lang.Exception