[jboss-user] [JBoss Seam] - Re: Getting

ejbengine do-not-reply at jboss.com
Wed Aug 22 09:54:53 EDT 2007


"pete.muir at jboss.org" wrote : Post the code for registrationFinder (this is working for me in a simple situation)


@Name("registrationFinder")
  | @Stateful
  | public class RegistrationFinderBean implements RegistrationFinder {
  | 
  | 	@Logger
  | 	private Log log;
  | 
  | 	@SuppressWarnings("unused")
  | 	@DataModel
  | 	private List< Claim > unregisteredClaims;
  | 
  | 	@SuppressWarnings("unused")
  | 	@DataModelSelection
  | 	private Claim claim;
  | 
  | 	@In
  | 	private Session hibernateSession;
  | 
  | 	@In(required=false)
  | 	private Date accidentDate;
  | 
  | 	@SuppressWarnings("unchecked")
  | 	@Begin(join=true)
  | 	public String find() {
  | 		String queryString = "from Claim where dateRegistered is null";
  | 
  | 		Query q = hibernateSession.createQuery(queryString);
  | 		List<Object> results = q.list();
  | 		unregisteredClaims = new ArrayList< Claim >(results.size());		
  | 		for(Object result : results) {
  | 			unregisteredClaims.add((Claim) result);
  | 		}
  | 		return "/forms/registration/finder/finder";
  | 
  | 	}
  | 	
  | 	@Remove @Destroy
  | 	public void destroy() { }
  | 
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076870#4076870

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076870



More information about the jboss-user mailing list