Example usage for javax.persistence Query getResultList

List of usage examples for javax.persistence Query getResultList

Introduction

In this page you can find the example usage for javax.persistence Query getResultList.

Prototype

List getResultList();

Source Link

Document

Execute a SELECT query and return the query results as an untyped List.

Usage

From source file:com.iselect.kernal.geo.dao.CountryDaoImpl.java

@Override
public List<CountryModel> getCountries() {
    Query query = this.em.createNamedQuery("country.findAll", CountryModelImpl.class);
    return query.getResultList();
}

From source file:org.syncope.core.persistence.dao.impl.AttrValueDAOImpl.java

@Override
public <T extends AbstractAttrValue> List<T> findAll(final Class<T> reference) {

    Query query = entityManager.createQuery("SELECT e FROM " + reference.getSimpleName() + " e");
    return query.getResultList();
}

From source file:de.crowdcode.bitemporal.example.AddressRepository.java

@SuppressWarnings("unchecked")
public Collection<Address> findAll() {
    Query query = em.createQuery("select c from AddressImpl c");
    return query.getResultList();
}

From source file:org.syncope.core.persistence.dao.impl.DerAttrDAOImpl.java

@Override
public <T extends AbstractDerAttr> 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.MembershipDAOImpl.java

@Override
public List<Membership> findAll() {
    Query query = entityManager.createQuery("SELECT e FROM Membership e");
    return query.getResultList();
}

From source file:org.syncope.core.persistence.dao.impl.UserRequestDAOImpl.java

@Override
@Transactional(readOnly = true)/*w w  w .j  a  v a 2s .c  o  m*/
public List<UserRequest> findAll() {
    Query query = entityManager.createQuery("SELECT e " + "FROM " + UserRequest.class.getSimpleName() + " e");
    return query.getResultList();
}

From source file:org.syncope.core.persistence.dao.impl.VirAttrDAOImpl.java

@Override
public <T extends AbstractVirAttr> List<T> findAll(final Class<T> reference) {

    Query query = entityManager.createQuery("SELECT e FROM " + reference.getSimpleName() + " e");
    return query.getResultList();
}

From source file:DAO.CommentairesDAOImpl.java

@Transactional(readOnly = true)
@Override//from   w  w  w .  j  a va 2s.co m
public List<CommentairesEntity> findAll() {
    Query q = em.createQuery("SELECT c FROM CommentairesEntity c");
    return q.getResultList();
}

From source file:dao.HelloDAOImpl.java

public List<HelloEntity> findByName(String nom) {
    Query q = em.createQuery("SELECT h FROM HelloEntity h WHERE h.nom =?").setParameter(1, nom);
    return q.getResultList();
}

From source file:dao.HelloDAOImpl.java

@Transactional(readOnly = true)
public List<HelloEntity> findByName(HelloEntity h, String nom) {
    Query q = em.createQuery("SELECT h FROM HelloEntity h WHERE h.nom =?").setParameter(1, nom);
    return q.getResultList();
}