[forge-issues] [JBoss JIRA] (FORGE-2093) Being able to create a new JPA listener

Antonio Goncalves (JIRA) issues at jboss.org
Sun Oct 26 06:51:35 EDT 2014


Antonio Goncalves created FORGE-2093:
----------------------------------------

             Summary: Being able to create a new JPA listener
                 Key: FORGE-2093
                 URL: https://issues.jboss.org/browse/FORGE-2093
             Project: Forge
          Issue Type: Sub-task
          Components: Java EE
    Affects Versions: 2.12.1.Final
            Reporter: Antonio Goncalves
             Fix For: 2.x Future


It would be good to be able to create a new JPA listener. A basic command could just be :

{code}
jpa-new-listener --named MyListener
{code}

This will generate the following code :

{code}
class MyListener {

}
{code}

Then we would add as many lifecycle events as needed, something like :

{code}
jpa-new-listener --named MyListener --lifecycle PRE_PERSIST, POST_UPDATE, POST_REMOVE
{code}

{code}
class MyListener {

   @PrePersist
   private void prePersist(Object object)
   {
   }

   @PostUpdate
   private void postUpdate(Object object)
   {
   }

   @PostRemove
   private void postRemove(Object object)
   {
   }
}
{code}




--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the forge-issues mailing list