butler.ext.log
Class InsertTimestampListener

java.lang.Object
  extended by butler.sql.record.RecordListener.BaseImpl
      extended by butler.ext.log.InsertTimestampListener
All Implemented Interfaces:
RecordListener

public class InsertTimestampListener
extends RecordListener.BaseImpl

Record listener that ensure that a timestamp column is updated with current timestamp at insert.

Author:
Fredrik Bertilsson

Nested Class Summary
 
Nested classes/interfaces inherited from interface butler.sql.record.RecordListener
RecordListener.BaseImpl
 
Constructor Summary
InsertTimestampListener(Column col)
           
 
Method Summary
 void beforeInsert(Record rec)
           
 void setTimestampCallback(TimestampCallback callback)
           
 
Methods inherited from class butler.sql.record.RecordListener.BaseImpl
afterDelete, afterInsert, afterSet, afterUpdate, beforeDelete, beforeSet, beforeUpdate, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertTimestampListener

public InsertTimestampListener(Column col)
Method Detail

setTimestampCallback

public void setTimestampCallback(TimestampCallback callback)

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