List of usage examples for javax.persistence Query getResultList
List getResultList();
From source file:org.mifos.loan.repository.StandardLoanDao.java
@Transactional(readOnly = true) public List<Loan> getAll() { Query query = entityManager.createQuery("from Loan"); return query.getResultList(); }
From source file:de.inetsource.jsfforum.db.CategoryFacade.java
@Override public List<Category> findAll() { try {/*from www. j av a 2 s. co m*/ Query q = em.createQuery("SELECT c FROM Category c order by c.id asc"); return q.getResultList(); } catch (Exception nre) { return null; } }
From source file:com.fusesource.examples.persistence.part2.dao.impl.IncidentDAOImpl.java
public List<Incident> findIncident() { Query q = this.em.createQuery("select i from Incident as i"); List list = q.getResultList(); return list;/* ww w . ja v a 2s . c om*/ }
From source file:com.dhenton9000.birt.jpa.service.impl.OrdersServiceImpl.java
@Override public List<Orders> getOrdersForOffice(String officeCode) { String qString = "select orders " + " from Offices offices " + " join offices.employees employees " + " join employees.customers customers " + " join customers.orders orders " + " where offices.officeCode = :id "; Query q = this.entityManager.createQuery(qString); q.setParameter("id", officeCode); return q.getResultList(); }
From source file:cz.fi.muni.pa036.airticketbooking.dao.impl.AdministratorDaoImpl.java
@Override public List<Administrator> getAll() { try {/*from ww w. j a va 2 s. com*/ Query q = em.createQuery("FROM Administrator"); List<Administrator> objectTemp = q.getResultList(); return Collections.unmodifiableList(objectTemp); } catch (PersistenceException | IllegalArgumentException ex) { throw new DataAccessException(ex.getMessage(), ex) { }; } }
From source file:cz.fi.muni.pa036.airticketbooking.dao.impl.AirlineDaoImpl.java
@Override public List<Airline> getAll() { try {// w w w.j a va 2s . com Query q = em.createQuery("FROM Airline"); List<Airline> objectTemp = q.getResultList(); return Collections.unmodifiableList(objectTemp); } catch (PersistenceException | IllegalArgumentException ex) { throw new DataAccessException(ex.getMessage(), ex) { }; } }
From source file:modelo.GestionImpl.java
@Override public List<TipoActividad> listarActividades() { Query q = em.createNamedQuery("Actividades.findAll"); List<TipoActividad> listact; listact = q.getResultList(); return listact; }
From source file:org.syncope.core.persistence.dao.impl.ConfDAOImpl.java
@Override public List<SyncopeConf> findAll() { Query query = entityManager.createQuery("SELECT e FROM SyncopeConf e"); return query.getResultList(); }
From source file:org.syncope.core.persistence.dao.impl.PolicyDAOImpl.java
@Override public List<Policy> findAll() { Query query = entityManager.createQuery("SELECT e FROM Policy e"); return query.getResultList(); }
From source file:core.commonapp.server.dao.task.TaskDaoHibernateImpl.java
@Override public List<Task> findAll(int max, int offset, List<Person> pepole, String subject, List<TaskType> taskTypes) { Query query = getEntityManager().createQuery("from Task"); List<Task> tasks = query.getResultList(); for (Task task : tasks) { task.getTaskStatus().size();//w w w . j a v a 2s. c om } return tasks; }