KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > test > LastUpdateListener


1 //$Id: LastUpdateListener.java,v 1.4 2005/07/21 00:08:35 epbernard Exp $
2
package org.hibernate.ejb.test;
3
4 import java.util.Date JavaDoc;
5 import javax.persistence.PrePersist;
6 import javax.persistence.PreUpdate;
7
8 /**
9  * @author Emmanuel Bernard
10  */

11 public class LastUpdateListener {
12     @PreUpdate
13     @PrePersist
14     public void setLastUpdate(Cat o) {
15         o.setLastUpdate( new Date JavaDoc() );
16         o.setManualVersion( o.getManualVersion() + 1 );
17     }
18 }
19
Popular Tags