I've created the JIRA :

https://issues.jboss.org/browse/FORGE-1838

Antonio


2014-05-15 4:53 GMT+02:00 Lincoln Baxter, III <lincolnbaxter@gmail.com>:
I can support new method commands for each spec as long as we find a nice way to keep it DRY on the code side.


On Wed, May 14, 2014 at 6:34 PM, George Gastaldi <ggastald@redhat.com> wrote:
I think that makes sense. +1 to that

Em 14/05/2014, às 19:31, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:

Hum... not sure about that. A jpa-new-method could bring lifecycle (e.g. @PostPersist, @PreRemove...), a cdi-new-method or ejb-new-method could bring lifecycle (@PostConstruct, @PreDestroy) or Interceptor, but java-new-method doesn't bring any of those (and I'm sure we could find other example, that's why I think we should keep them seperate)


2014-05-12 7:55 GMT+02:00 George Gastaldi <ggastald@redhat.com>:
It's just because in this case there isn't anything special about it. It will create a method and it doesn't matter if the target class is a specific component, but just a java class. In the case of jpa-new-field, the @Column annotation and other JPA stuff are added, so it makes sense to exist.

Em 11/05/2014, às 18:31, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:

Hum.... what are you saying by that ? No matter if I cd and Entity, an EJB, a REST endpoint I can go "java-new-method" and it will create a new method, no matter the component ? I thought anything related with JPA would be jpa-new-field, jpa-new-method... If not, why do we have jpa-new-field and not java-new-field ? Are you sure we would have a single java-new-method for everything ?


2014-05-11 15:14 GMT+02:00 George Gastaldi <ggastald@redhat.com>:
I think it's a good idea. However I am not sure if it should be named "ejb-new-method", but rather "java-new-method". Can you JIRA it? This issue could also have a "Starter" label.

Thanks

Em 11/05/2014, às 06:58, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:

Hi all,

As you might know by now, I'm creating a Java EE 6 Advanced training course extensively using JBoss Forge. At one point, I create a set of EJBs.... and I need to create a few methods on each one. 

I was wondering if it would make sense to have JBoss Forge generating methods ?

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).

Do you think it would be good to have such functionnality ? 

Something like :

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

What do you think ?

--
Antonio Goncalves 
Software architect and Java Champion

Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users

_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users



--
Antonio Goncalves 
Software architect and Java Champion

Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users

_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users



--
Antonio Goncalves 
Software architect and Java Champion

Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users

_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users



--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."

_______________________________________________
forge-users mailing list
forge-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users



--
Antonio Goncalves 
Software architect and Java Champion

Web site | Twitter | LinkedIn | Paris JUG | Devoxx France