[
https://issues.jboss.org/browse/FORGE-2079?page=com.atlassian.jira.plugin...
]
Antonio Goncalves updated FORGE-2079:
-------------------------------------
Description:
It would be good to have a command to add a CDI producer field to an existing class. A
simple command such as :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier
Production --alternative=true --scoped Request --atNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
private EntityManager em;
}
{code}
was:
It would be good to have a command to add a CDI producer field to an existing class. A
simple command such as :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-new-producer-field --named em --type javax.persistence.EntityManager --qualifier
Production --alternative=true --scoped Request --atNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
private EntityManager em;
}
{code}
Being able to create a new CDI producer field
---------------------------------------------
Key: FORGE-2079
URL:
https://issues.jboss.org/browse/FORGE-2079
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 have a command to add a CDI producer field to an existing class. A
simple command such as :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager
{code}
Would generate :
{code}
public class DatabaseProducer
{
@Produces
private EntityManager em;
}
{code}
Then, we can have more attributes :
{code}
cdi-add-producer-field --named em --type javax.persistence.EntityManager --qualifier
Production --alternative=true --scoped Request --atNamed=true
{code}
{code}
public class DatabaseProducer
{
@Produces
@Production
@Alternative
@RequestScoped
@Named
private EntityManager em;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)