Thursday, October 10, 2013

How to iterate entities in Application Module Impl class?



Below is the code snippet to iterate through Entities.

       

        // Get EmployeeEO iterator
  Iterator it =EmployeesEOImpl.getDefinitionObject().getAllEntityInstancesIterator(getDBTransaction());
  // Iterate through iterator
        while (it.hasNext()) {
            EmployeesEOImpl eoImpl = (EmployeesEOImpl)it.next();
   System.out.println(eoImpl.getFirstName());

        }
       
 




No comments:

Post a Comment