1 22 package org.jboss.ejb; 23 24 import java.util.Collection ; 25 import java.util.Iterator ; 26 import java.util.List ; 27 import java.util.ArrayList ; 28 29 36 public interface GenericEntityObjectFactory 37 { 38 Object getEntityEJBObject(Object id); 39 40 class UTIL 41 { 42 private UTIL() 43 { 44 } 45 46 public static Collection getEntityCollection(GenericEntityObjectFactory factory, Collection ids) 47 { 48 List result = new ArrayList (); 49 if(!ids.isEmpty()) 50 { 51 for(Iterator i = ids.iterator(); i.hasNext();) 52 { 53 result.add(factory.getEntityEJBObject(i.next())); 54 } 55 } 56 return result; 57 } 58 } 59 } 60 | Popular Tags |