List of usage examples for javax.persistence TypedQuery getResultList
List<X> getResultList();
From source file:com.deltastar.task7.core.repository.api.impl.FundRepositoryImpl.java
@Override public List<Fund> findFundByFundNameOrSymbol(String fundName, String symbol) { TypedQuery<Fund> query = entityManager.createNamedQuery("findFundByFundNameOrSymbol", Fund.class); query.setParameter("p_symbol", "%" + symbol + "%"); query.setParameter("p_fundName", "%" + fundName + "%"); return query.getResultList(); }
From source file:de.lava.marvin.whaosleaguepersistence.dao.impl.PlayerDaoImpl.java
@Override public List<Match> getAllWinsForPlayer(Player p) { TypedQuery<Match> query = entityManager.createNamedQuery("allWinsForPlayer", Match.class); query.setParameter("player", p); return query.getResultList(); }
From source file:org.mitre.uma.repository.impl.JpaPermissionRepository.java
@Override public Collection<PermissionTicket> getPermissionTicketsForResourceSet(ResourceSet rs) { TypedQuery<PermissionTicket> query = em.createNamedQuery(PermissionTicket.QUERY_BY_RESOURCE_SET, PermissionTicket.class); query.setParameter(PermissionTicket.PARAM_RESOURCE_SET_ID, rs.getId()); return query.getResultList(); }
From source file:de.lava.marvin.whaosleaguepersistence.dao.impl.PlayerDaoImpl.java
@Override public List<Match> getAllLosesForPlayer(Player p) { TypedQuery<Match> query = entityManager.createNamedQuery("allLosesForPlayer", Match.class); query.setParameter("player", p); return query.getResultList(); }
From source file:org.openmeetings.app.data.flvrecord.FlvRecordingMetaDeltaDaoImpl.java
public List<FlvRecordingMetaDelta> getFlvRecordingMetaDeltaByMetaId(Long flvRecordingMetaDataId) { try {/*ww w .j a v a 2 s. c o m*/ String hql = "SELECT c FROM FlvRecordingMetaDelta c " + "WHERE c.flvRecordingMetaDataId = :flvRecordingMetaDataId"; TypedQuery<FlvRecordingMetaDelta> query = em.createQuery(hql, FlvRecordingMetaDelta.class); query.setParameter("flvRecordingMetaDataId", flvRecordingMetaDataId); List<FlvRecordingMetaDelta> flvRecordingMetaDeltas = query.getResultList(); return flvRecordingMetaDeltas; } catch (Exception ex2) { log.error("[getFlvRecordingMetaDeltaByMetaId]: ", ex2); } return null; }
From source file:org.mitre.uma.repository.impl.JpaPermissionRepository.java
@Override public PermissionTicket getByTicket(String ticket) { TypedQuery<PermissionTicket> query = em.createNamedQuery(PermissionTicket.QUERY_TICKET, PermissionTicket.class); query.setParameter(PermissionTicket.PARAM_TICKET, ticket); return JpaUtil.getSingleResult(query.getResultList()); }
From source file:de.lava.marvin.whaosleaguepersistence.dao.impl.PlayerDaoImpl.java
@Override public List<Match> getAllMatchesForPlayer(Player p) { TypedQuery<Match> query = entityManager.createNamedQuery("allMatchesForPlayer", Match.class); query.setParameter("player", p); return query.getResultList(); }
From source file:de.egore911.persistence.selector.AbstractSelector.java
@Nonnull public List<T> findAll() { TypedQuery<T> q = buildQuery(); if (limit != null) { q.setMaxResults(limit);//from w w w .j ava 2 s . c om } if (offset != null) { q.setFirstResult(offset); } return q.getResultList(); }
From source file:org.openmeetings.app.data.user.Statemanagement.java
/** * Get all state-Object//from www .j a v a 2 s . c om * * @return List of State Objects or null */ public List<States> getStates() { try { TypedQuery<States> query = em.createQuery("select c from States as c where c.deleted <> :deleted", States.class); query.setParameter("deleted", "true"); List<States> ll = query.getResultList(); return ll; } catch (Exception ex2) { log.error("getStates", ex2); } return null; }
From source file:de.lava.marvin.whaosleaguepersistence.dao.impl.PlayerDaoImpl.java
@Override public List<Match> getAllRankedWinsForPlayer(Player p) { TypedQuery<Match> query = entityManager.createNamedQuery("allRankedWinsForPlayer", Match.class); query.setParameter("player", p); return query.getResultList(); }