Author: pete.muir(a)jboss.org
Date: 2010-06-16 14:13:17 -0400 (Wed, 16 Jun 2010)
New Revision: 6455
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/CodeFragmentManagerImpl.java
Log:
minor
Modified:
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/CodeFragmentManagerImpl.java
===================================================================
---
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/CodeFragmentManagerImpl.java 2010-06-16
18:10:04 UTC (rev 6454)
+++
examples/trunk/jsf/pastecode/src/main/java/org/jboss/weld/examples/pastecode/session/CodeFragmentManagerImpl.java 2010-06-16
18:13:17 UTC (rev 6455)
@@ -158,6 +158,7 @@
* modify returned Codes without affecting database (when we call this
* function from another session bean
*/
+
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public List<CodeFragment> searchCodeFragments(CodeFragment code, int page,
QueryInfo info)
{
@@ -205,6 +206,8 @@
int allRecords = q.getResultList().size();
q.setFirstResult(page * PAGE_SIZE);
q.setMaxResults(PAGE_SIZE);
+
+ @SuppressWarnings("unchecked")
List<CodeFragment> codes = q.getResultList();
info.setPage(page);
Show replies by date