[forge-issues] [JBoss JIRA] (FORGE-2227) Being able to create a new Entity Listener

Antonio Goncalves (JIRA) issues at jboss.org
Sun Mar 1 16:49:48 EST 2015


     [ https://issues.jboss.org/browse/FORGE-2227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Goncalves closed FORGE-2227.
------------------------------------
    Resolution: Duplicate Issue


Duplicates FORGE-2093

> Being able to create a new Entity Listener
> ------------------------------------------
>
>                 Key: FORGE-2227
>                 URL: https://issues.jboss.org/browse/FORGE-2227
>             Project: Forge
>          Issue Type: Sub-task
>          Components: Java EE
>    Affects Versions: 2.14.0.Final
>            Reporter: Antonio Goncalves
>             Fix For: 2.x Future
>
>
> It would be good to have a command to create an Entity Listener. A command like this :
> {code}
> cdi-new-entity-listener --named MyListener ;
> {code}
> Would generate by default in the {{model}} package :
> {code}
> public class MyListener
> {
> }
> {code}
> Nothing too fancy, but the command could propose a list of events and generate a method per event :
> {code}
> cdi-new-entity-listener --named MyListener --events PRE_PERSIST POST_PERSIST PRE_UPDATE ;
> {code}
> {code}
> 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.");
>    }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the forge-issues mailing list