Examples of equal()


Examples of com.google.code.lightssh.common.dao.SearchCondition.equal()

  @Override
  public SystemParam getByName(String name) {
    ListPage<SystemParam> page = new ListPage<SystemParam>(1);
    SearchCondition sc = new SearchCondition();
    sc.equal("name", name );
    page = dao.list(page, sc);
   
    return (page.getList()==null||page.getList().isEmpty())
      ?null:page.getList().get(0);
  }
View Full Code Here

Examples of com.hazelcast.query.EntryObject.equal()

        EntryListener<String, Integer> l = new EntryAdapter<String, Integer>() {
        };

        EntryObject e = new PredicateBuilder().getEntryObject();
        Predicate<String, Integer> p = e.equal(1);

        map.addEntryListener(l, p, null, false);

        for (Integer i = 0; i < 100; i++) {
            TransactionContext context = inst.newTransactionContext();
View Full Code Here

Examples of com.mysql.clusterj.query.PredicateOperand.equal()

        // parameter name
        PredicateOperand param = dobj.param("eid");
        // property name
        PredicateOperand column = dobj.get("eid");
        // compare the column with the parameter
        Predicate compare = column.equal(param);
        // set the where clause into the query
        dobj.where(compare);
        // create a query instance
        Query query = session.createQuery(dobj);
View Full Code Here

Examples of com.mysql.ndbjtie.ndbapi.NdbOperation.equal()

        final CharBuffer str = CharBuffer.wrap(Integer.toString(i));
        try {
            // set values; key attribute needs to be set first
            //str.rewind();
            ndbjtieTranscode(bb, str);
            if (op.equal(metaData.getAttr(0), bb) != 0) // key
                throw new RuntimeException(TwsUtils.toStr(tx.getNdbError()));
            bb.position(bb.position() + metaData.getColumnWidth(0));

            str.rewind();
            ndbjtieTranscode(bb, str);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

        // Use of JPA 2.0 criteria

        CriteriaBuilder criteriaBuilder = this.entityManager.getCriteriaBuilder();
        CriteriaQuery<Employee> criteriaQuery = criteriaBuilder.createQuery(Employee.class);
        Root<Employee> employee = criteriaQuery.from(Employee.class);
        criteriaQuery.select(employee).where(criteriaBuilder.equal(employee.get("name"), name));
        try {
            return this.entityManager.createQuery(criteriaQuery).getSingleResult();
        } catch (NoResultException nre) {
            return null;
        }
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

    EntityTransaction tx = em.getTransaction();
    tx.begin();
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<Configuration> cq = cb.createQuery(Configuration.class);
    Root<Configuration> c = cq.from(Configuration.class);
    Predicate condition = cb.equal(c.get("deleted"), "false");
    cq.where(condition);
    TypedQuery<Configuration> q = em.createQuery(cq);
    List<Configuration> result = q.getResultList();
    try {
      tx.commit();
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

      EntityTransaction tx = session.getTransaction();
      tx.begin();
      CriteriaBuilder cb = session.getCriteriaBuilder();
      CriteriaQuery<Users> cq = cb.createQuery(Users.class);
      Root<Users> c = cq.from(Users.class);
      Predicate condition = cb.equal(c.get("deleted"), "false");
      cq.where(condition);
      TypedQuery<Users> q = session.createQuery(cq);
      List<Users> ll = q.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

      EntityTransaction tx = session.getTransaction();
      tx.begin();
      CriteriaBuilder cb = session.getCriteriaBuilder();
      CriteriaQuery<Users> cq = cb.createQuery(Users.class);
      Root<Users> c = cq.from(Users.class);
      Predicate condition = cb.equal(c.get("deleted"), "false");
      cq.where(condition);
      TypedQuery<Users> q = session.createQuery(cq);
      List<Users> ll = q.getResultList();
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

      tx.begin();
      session.flush();
      CriteriaBuilder cb = session.getCriteriaBuilder();
      CriteriaQuery<Sessiondata> cq = cb.createQuery(Sessiondata.class);
      Root<Sessiondata> c = cq.from(Sessiondata.class);
      Predicate condition = cb.equal(c.get("session_id"), SID);
      cq.where(condition);

      TypedQuery<Sessiondata> q = session.createQuery(cq);

      List<Sessiondata> fullList = q.getResultList();
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.equal()

      tx.begin();
      session.flush();
      CriteriaBuilder cb = session.getCriteriaBuilder();
      CriteriaQuery<Sessiondata> cq = cb.createQuery(Sessiondata.class);
      Root<Sessiondata> c = cq.from(Sessiondata.class);
      Predicate condition = cb.equal(c.get("session_id"), SID);
      cq.where(condition);

      TypedQuery<Sessiondata> q = session.createQuery(cq);
      List<Sessiondata> fullList = q.getResultList();
      tx.commit();
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.