[forge-issues] [JBoss JIRA] (FORGE-1838) Being able to generate methods

Antonio Goncalves (JIRA) issues at jboss.org
Tue May 20 01:42:56 EDT 2014


Antonio Goncalves created FORGE-1838:
----------------------------------------

             Summary: Being able to generate methods
                 Key: FORGE-1838
                 URL: https://issues.jboss.org/browse/FORGE-1838
             Project: Forge
          Issue Type: Feature Request
          Components: Java EE
    Affects Versions: 2.5.0.Final
            Reporter: Antonio Goncalves
             Fix For: 2.x Future


See thread discussion on : https://community.jboss.org/thread/240936

Until now, Forge creates classes (e.g. {{jpa-new-entity}}, {{cdi-new-bean}}, {{java-new-class}}), annotations ({{cdi-new-qualifier}}, {{constraint-new-annotation}}...), attributes ({{jpa-new-field}}, {{java-new-field}}...) but nowhere Forge creates methods. This could make sense in most of the artifacts (EJBs, CDI bean, Java, but also JPA).

Something like :

{code}
ejb-new-method --named findById --return org.agoncal.model.Author --parameters Long id
ejb-new-method --named removeById --return void --parameters Long id
ejb-new-method --named updateName --return org.agoncal.model.Author --parameters Long id, String name, String surname
java-new-method --named doStuff --return String --parameters Integer p1, String p2, String p3
{code}

We could go a bit further and specify methods. A {{jpa-new-method}} could bring lifecycle (e.g.
{{@PostPersist}}, {{@PreRemove}}...), a {{cdi-new-method}} or {{ejb-new-method}} could bring lifecycle ({{@PostConstruct}}, {{@PreDestroy}}) ornInterceptor, but {{java-new-method}} doesn't bring any of those.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the forge-issues mailing list