1: …… 2: public class S9103 implements ServletContextListener { 3: public List getAllItemsInWildcardCollection() { 4: EntityManager em = getEntityManager(); 5: List r_type = null; 6: try { 7: Properties props = new Properties(); 8: String fileName = "conditions.txt"; 9: FileInputStream in = new FileInputStream(fileName); 10: props.load(in); 11: 12: // 외부 입력값을 받는다. 13: String id = props.getProperty("id"); 14: // 입력값을 검사한다. 15: if (id == null || "".equals(id)) id = "itemid"; 16: // Query문을 작성한다. 17: Query query = 18: em.createNativeQuery("SELECT OBJECT(i) FROM Item i WHERE i.itemID > :id"); 19: query.setParameter("id" , id); 20: List items = query.getResultList(); 21: …… 22: return r_type; 23: } 24: ……