List of usage examples for javax.persistence Query getResultList
List getResultList();
From source file:org.kuali.mobility.xsl.dao.XslDaoImpl.java
@SuppressWarnings("unchecked") public List<Xsl> findAllXsl() { Query query = entityManager.createQuery("select x from Xsl x order by x.id"); return query.getResultList(); }
From source file:com.excilys.ebi.sample.jpa.query.benchmark.repository.impl.NamedQueryRepository.java
@Override @SuppressWarnings("unchecked") public List<Song> getSongsBySameArtistOrderBySongTitle(Integer songId) { Query query = em.createNamedQuery("getSongsBySameArtist"); query.setParameter(1, songId);//from ww w. ja v a 2 s.c o m return query.getResultList(); }
From source file:cz.fi.muni.pa036.airticketbooking.dao.impl.FlightTicketDaoImpl.java
@Override public List<FlightTicket> getAll() { Query q = em.createQuery("FROM FlightTicket"); List<FlightTicket> objectTemp = q.getResultList(); return Collections.unmodifiableList(objectTemp); }
From source file:org.syncope.core.persistence.dao.impl.LoggerDAOImpl.java
@Override public List<SyncopeLogger> findAll() { Query query = entityManager.createQuery("SELECT e FROM " + SyncopeLogger.class.getSimpleName() + " e"); return query.getResultList(); }
From source file:org.syncope.core.persistence.dao.impl.AttrDAOImpl.java
@Override public <T extends AbstractAttr> List<T> findAll(final Class<T> reference) { Query query = entityManager.createQuery("SELECT e FROM " + reference.getSimpleName() + " e"); return query.getResultList(); }
From source file:org.syncope.core.persistence.dao.impl.EntitlementDAOImpl.java
@Override public List<Entitlement> findAll() { Query query = entityManager.createQuery("SELECT e FROM Entitlement e"); return query.getResultList(); }
From source file:org.syncope.core.persistence.dao.impl.NotificationDAOImpl.java
@Override public List<Notification> findAll() { Query query = entityManager.createQuery("SELECT e " + "FROM " + Notification.class.getSimpleName() + " e"); return query.getResultList(); }
From source file:uk.ac.ebi.intact.editor.services.admin.HqlQueryService.java
@Transactional(value = "jamiTransactionManager", readOnly = true, propagation = Propagation.REQUIRED) public <T> List<T[]> runNativeQuery(int maxResults, String sqlQuery) { maxResults = Math.min(maxResults, MAX_RESULTS); EntityManager em = getIntactDao().getEntityManager(); Query query = em.createNativeQuery(sqlQuery); query.setMaxResults(maxResults);/*from w w w .j ava 2 s . com*/ return query.getResultList(); }
From source file:DAO.FichiersDAOImpl.java
@Transactional(readOnly = true) @Override/*from w w w . j a v a 2 s . c o m*/ public List<FichiersEntity> findAll() { Query q = em.createQuery("SELECT f FROM FichiersEntity f"); return q.getResultList(); }
From source file:com.linksinnovation.elearning.repository.VideoAmountRepository.java
public List<VideoAmount> findAll() { Query query = em.createNativeQuery(queryString); List<Object[]> resultList = query.getResultList(); return mapObject(resultList); }