1 25 package org.objectweb.easybeans.tests.common.listeners; 26 27 import javax.persistence.PostLoad; 28 import javax.persistence.PostPersist; 29 import javax.persistence.PostRemove; 30 import javax.persistence.PostUpdate; 31 import javax.persistence.PrePersist; 32 import javax.persistence.PreRemove; 33 import javax.persistence.PreUpdate; 34 35 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 36 import org.objectweb.easybeans.tests.common.ejbs.entity.geometricforms.Form; 37 38 44 public class FormsListener02{ 45 46 50 @PrePersist 51 public void prePersist(final Form f) { 52 FormsListenerBase.insertEntity(CallbackType.PRE_PERSIST, f, this.getClass().getName()); 53 } 54 55 59 @PostPersist 60 public void postPersist(final Form f) { 61 FormsListenerBase.insertEntity(CallbackType.POST_PERSIST, f, this.getClass().getName()); 62 } 63 64 68 @PreRemove 69 public void preRemove(final Form f) { 70 FormsListenerBase.insertEntity(CallbackType.PRE_REMOVE, f, this.getClass().getName()); 71 } 72 73 77 @PostRemove 78 public void postRemove(final Form f) { 79 FormsListenerBase.insertEntity(CallbackType.POST_REMOVE, f, this.getClass().getName()); 80 } 81 82 86 @PreUpdate 87 public void preUpdate(final Form f) { 88 FormsListenerBase.insertEntity(CallbackType.PRE_UPDATE, f, this.getClass().getName()); 89 } 90 91 95 @PostUpdate 96 public void postUpdate(final Form f) { 97 FormsListenerBase.insertEntity(CallbackType.POST_UPDATE, f, this.getClass().getName()); 98 } 99 100 104 @PostLoad 105 public void postLoad(final Form f) { 106 FormsListenerBase.insertEntity(CallbackType.POST_LOAD, f, this.getClass().getName()); 107 } 108 } 109 | Popular Tags |