Oh and questionCategoryManager code
| @Stateful
| @Scope(ScopeType.APPLICATION)
| @Name("questionCategoryManager")
| public class QuestionCategoryManagerBean implements QuestionCategoryManager
{
|
| @Logger
| Log log;
|
| @In
| private EntityManager entityManager;
|
| public void addCategory(QuestionCategory category) {
| log.info("Persiting category ["+category.getCategoryName()+"]");
| category.setCreated(new Date());
| entityManager.persist(category);
| }
|
| public void removeCategory(QuestionCategory category) {
| log.info("Removing category ["+category.getCategoryName()+"]");
| entityManager.remove(category);
| }
|
| public List<QuestionCategory> getAllQuestionCategories() {
| log.info("Reciving QuestionCategory list");
| return entityManager.createQuery("from QuestionCategory qc order by
qc.created").getResultList();
| }
|
| @Destroy @Remove
| public void destroy() {
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110473#4110473
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110473
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user