[JBoss JIRA] Created: (JBIDE-3315) Incomplete delete of generic exporter from .lauch file
by Francisco Jose Peredo Noguez (JIRA)
Incomplete delete of generic exporter from .lauch file
------------------------------------------------------
Key: JBIDE-3315
URL: https://jira.jboss.org/jira/browse/JBIDE-3315
Project: Tools (JBoss Tools)
Issue Type: Bug
Affects Versions: 2.1.2
Reporter: Francisco Jose Peredo Noguez
If I save my code generation options in a .launch and I try to delete one of the Generic Exporters, and then I open the file in a text editor to see if it actually deleted it, I see that it deleted the line that says:
<listEntry value="hbmtemplate1"/>
but it did not delete the this:
<mapAttribute key="org.hibernate.tools.exporters.hbmtemplate1.properties">
<mapEntry key="hibernatetool.something.toolclass" value="somepackage.SomeClass"/>
<mapEntry key="outputdir" value="/myapp/WebContent/Crud"/>
<mapEntry key="for_each" value="entity"/>
<mapEntry key="template_name" value="view/list.xhtml.ftl"/>
<mapEntry key="file_pattern" value="{class-name}List.xhtml"/>
<mapEntry key="hibernatetool.util.toolclass" value="org.hibernate.eclipse.launch.SeamUtil"/>
</mapAttribute>
This mapAttribute stuff stays there, and can only be removed if I do it manually.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months
[JBoss JIRA] Created: (JBIDE-3136) New decorator from existing Web Bean
by Dan Allen (JIRA)
New decorator from existing Web Bean
------------------------------------
Key: JBIDE-3136
URL: https://jira.jboss.org/jira/browse/JBIDE-3136
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: webbeans
Reporter: Dan Allen
Fix For: LATER
Suppose we have an interface that represents accounts:
public interface Account {
public BigDecimal getBalance();
public User getOwner();
public void withdraw(BigDecimal amount);
public void deposit(BigDecimal amount);
}
A decorator is a simple Web Bean that implements the type it decorates and is annotated @Decorator.
@Decorator
public abstract class LargeTransactionDecorator
implements Account {
@Decorates Account account;
@PersistenceContext EntityManager em;
public void withdraw(BigDecimal amount) {
account.withdraw(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedWithdrawl(amount) );
}
}
public void deposit(BigDecimal amount);
account.deposit(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedDeposit(amount) );
}
}
}
The tooling would not only help you create the class that acts as the decorator, but make sure that it implements the same interfaces as the Web Beans and injects the Web Bean into a @Decorate field.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months