Examples of uniqueResult()


Examples of com.liferay.portal.kernel.dao.orm.Query.uniqueResult()

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(groupId);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
      }
      finally {
View Full Code Here

Examples of com.liferay.portal.kernel.dao.orm.SQLQuery.uniqueResult()

      QueryPos qPos = QueryPos.getInstance(q);

      qPos.add(groupId);

      Long count = (Long)q.uniqueResult();

      return count.intValue();
    }
    catch (Exception e) {
      throw processException(e);
View Full Code Here

Examples of com.mysema.query.jpa.impl.JPAQuery.uniqueResult()

   
    query.from(qProjectVersion)
      .where(qProjectVersion.project.eq(project))
      .where(qProjectVersion.version.eq(version));
   
    return query.uniqueResult(qProjectVersion);
  }
}
View Full Code Here

Examples of es.twentymobile.mule.modules.jpa.dsl.CustomJPAQuery.uniqueResult()

          }
        } else {
          result = query.list(jpaQuery.getBasePath());
        }
      } else {
        result = query.uniqueResult(jpaQuery.getBasePath());
      }
      if (etx != null && etx.isActive()) {
        etx.commit();
      }
      return result;
View Full Code Here

Examples of org.evolizer.core.hibernate.session.api.IEvolizerSession.uniqueResult()

  }

  private <T>T loadUniqueFromDB(String reloadQuery, Class<T> resultType) {
    try {
      IEvolizerSession s = fSessionHandler.getCurrentSession(fDBUrl);
      T result = s.uniqueResult(reloadQuery, resultType);
     
      return result;
    } catch (EvolizerException e) {
      fail(e.getMessage());
      return null;
View Full Code Here

Examples of org.hibernate.Criteria.uniqueResult()

    }
    else {
      Criteria criteria = session.createCriteria( entityInfo.clazz );
      criteria.add( Restrictions.eq( entityInfo.idName, entityInfo.id ) );
      try {
        maybeProxy = criteria.uniqueResult();
      }
      catch ( HibernateException e ) {
        throw new SearchException(
            "Loading entity of type " + entityInfo.clazz.getName() + " using '"
                + entityInfo.idName
View Full Code Here

Examples of org.hibernate.Criteria.uniqueResult()

    Criteria criteria = session.createCriteria(Estado.class)
    .add(Restrictions.eq("descripcion", descripcionEstado))
    .add(Restrictions.eq("tipoItem", tipoItem));
   
    Estado estado = (Estado) criteria.uniqueResult();
   
    session.close();

    return estado;
  }
View Full Code Here

Examples of org.hibernate.Criteria.uniqueResult()

    session.beginTransaction();

    Criteria criteria = session.createCriteria(Estado.class)
    .add(Restrictions.eq("id", id));
   
    Estado estado = (Estado) criteria.uniqueResult();
   
    session.close();

    return estado;
  }
View Full Code Here

Examples of org.hibernate.Criteria.uniqueResult()

    Criteria criteria = session.createCriteria(Miembro.class)
    .add(Restrictions.eq("proyecto", savedProyecto))
    .createCriteria("usuario")
    .add(Restrictions.eq("nombre", nombre));
   
    Miembro savedMiembro = (Miembro) criteria.uniqueResult();
   
    session.close();
   
    return savedMiembro;
  }
View Full Code Here

Examples of org.hibernate.Criteria.uniqueResult()

   
    Criteria criteria = session.createCriteria(Role.class)
    .add(Restrictions.eq("nombre", descripcion))
    .add(Restrictions.eq("tipo", "Sistema"));
   
    role = (Role) criteria.uniqueResult();
   
    session.close();
   
    return role;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.