Examples of where()


Examples of com.mysema.query.jpa.hibernate.HibernateQuery.where()

  }

  public List<FeedSubscription> findByCategory(User user, FeedCategory category) {
    HibernateQuery query = newQuery().from(sub).where(sub.user.eq(user));
    if (category == null) {
      query.where(sub.category.isNull());
    } else {
      query.where(sub.category.eq(category));
    }
    return initRelations(query.list(sub));
  }
View Full Code Here

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

    @Test
    public void Query() throws ClassNotFoundException, IOException {
        JPAQuery query = new JPAQuery();
        query.from(QCat.cat);
        query.where(serialize(QCat.cat.name.eq("test")));
    }

}
View Full Code Here

Examples of com.mysema.query.sql.dml.SQLDeleteClause.where()

    @Test
    public void Delete_with_SubQuery_exists() {
        QSurvey survey1 = new QSurvey("s1");
        QEmployee employee = new QEmployee("e");
        SQLDeleteClause delete = new SQLDeleteClause(connection, SQLTemplates.DEFAULT,survey1);
        delete.where(survey1.name.eq("XXX"), new SQLSubQuery().from(employee).where(survey1.id.eq(employee.id)).exists());
        assertEquals("delete from SURVEY\n" +
                     "where SURVEY.NAME = ? and exists (select 1\n" +
                     "from EMPLOYEE e\n" +
                     "where SURVEY.ID = e.ID)", delete.toString());
    }
View Full Code Here

Examples of com.mysema.query.sql.dml.SQLUpdateClause.where()

    @Test
    public void Update_Where() {
        SQLUpdateClause updateClause = new SQLUpdateClause(connection,SQLTemplates.DEFAULT,survey);
        updateClause.set(survey.id, 1);
        updateClause.set(survey.name, (String)null);
        updateClause.where(survey.name.eq("XXX"));
        assertEquals("update SURVEY\nset ID = ?, NAME = ?\nwhere SURVEY.NAME = ?", updateClause.toString());
    }

    @Test
    public void Insert() {
View Full Code Here

Examples of com.mysql.clusterj.query.QueryDomainType.where()

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

        // set the parameter values
        query.setParameter("eid", (long)2);
View Full Code Here

Examples of com.taobao.tdhs.client.easy.Query.where()

                                parseSQL.getSql());
                    }

                }
            }
            Where where = query.where().index(index);
            processKey(parseSQL, keys, where);
        } else {
            if (hint != null && StringUtils.isNotBlank(hint.getErrmsg())) {
                logger.warn("TDHS: JDBC hint error:" + hint.getErrmsg() + " , SQL:" + parseSQL.getSql());
            }
View Full Code Here

Examples of com.workingdogs.village.TableDataSet.where()

                if (log.isDebugEnabled())
                {
                    log.debug("BasePeer: whereClause=" + sqlSnippet);
                }

                tds.where(sqlSnippet);
                tds.fetchRecords();

                if (tds.size() > 1 && crit.isSingleRecord())
                {
                    handleMultipleRecords(tds);
View Full Code Here

Examples of com.workingdogs.village.TableDataSet.where()

                if (log.isDebugEnabled())
                {
                    log.debug("BasePeer.doDelete: whereClause=" + sqlSnippet);
                }

                tds.where(sqlSnippet);
                tds.fetchRecords();
                if (tds.size() > 1 && criteria.isSingleRecord())
                {
                    handleMultipleRecords(tds);
                }
View Full Code Here

Examples of com.workingdogs.village.TableDataSet.where()

                if (log.isDebugEnabled())
                {
                    log.debug("BasePeer: whereClause=" + sqlSnippet);
                }

                tds.where(sqlSnippet);
                tds.fetchRecords();

                if (tds.size() > 1 && crit.isSingleRecord())
                {
                    handleMultipleRecords(tds);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaDelete.where()

   
    public void deleteMovie() {
        CriteriaBuilder builder = em.getCriteriaBuilder();
        CriteriaDelete deleteCriteria = builder.createCriteriaDelete(Movie.class);
        Root<Movie> updateRoot = deleteCriteria.from(Movie.class);
        deleteCriteria.where(builder.equal(updateRoot.get(Movie_.name), "The Matrix"));
        Query q = em.createQuery(deleteCriteria);
        q.executeUpdate();
        em.flush();
    }
   
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.