[forge-issues] [JBoss JIRA] (FORGE-2093) Being able to create a new JPA listener
Antonio Goncalves (JIRA)
issues at jboss.org
Fri Mar 6 18:08:49 EST 2015
[ https://issues.jboss.org/browse/FORGE-2093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Goncalves updated FORGE-2093:
-------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/core/pull/545
> 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
> Assignee: 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.11#6341)
More information about the forge-issues
mailing list