-
Sub-task
-
Resolution: Duplicate
-
Major
-
2.14.0.Final
-
None
It would be good to have a command to create an Entity Listener. A command like this :
cdi-new-entity-listener --named MyListener ;
Would generate by default in the model package :
public class MyListener { }
Nothing too fancy, but the command could propose a list of events and generate a method per event :
cdi-new-entity-listener --named MyListener --events PRE_PERSIST POST_PERSIST PRE_UPDATE ;
public class MyListener { @PrePersist private void prePersist(Object object) { throw new UnsupportedOperationException("Not supported yet."); } @PostPersist private void postPersist(Object object) { throw new UnsupportedOperationException("Not supported yet."); } @PreUpdate private void preUpdate(Object object) { throw new UnsupportedOperationException("Not supported yet."); } }