Examples of where()


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

        Root<Customer> customer = cquery.from(Customer.class);

        //Get Metamodel from Root
        EntityType<Customer> Customer_ = customer.getModel();

        cquery.where(cb.equal(
                customer.get(Customer_.getSingularAttribute("name", String.class)),
                cb.nullLiteral(String.class)));

        Query q = em.createQuery(cquery);
    }
View Full Code Here

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

    public void updateMovie() {
        CriteriaBuilder builder = em.getCriteriaBuilder();
        CriteriaUpdate updateCriteria = builder.createCriteriaUpdate(Movie.class);
        Root<Movie> updateRoot = updateCriteria.from(Movie.class);
        updateCriteria.where(builder.equal(updateRoot.get(Movie_.name), "Inception"));
        updateCriteria.set(updateRoot.get(Movie_.name), "INCEPTION");
        Query q = em.createQuery(updateCriteria);
        q.executeUpdate();
        em.flush();
    }
View Full Code Here

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

                            if (var instanceof String && ((String)var).contains("%")) {
                                /*
                                 * This is a like query
                                 */
                                subquery.where(builder.like(builder.lower(fromAttr.get(fields[1])), var.toString().toLowerCase()));  
                            }
                            else {
                                /*
                                 * This is strong equals query
                                 */
 
View Full Code Here

Examples of net.sf.domainbeans.operation.annotation.Db.query.where()

    return null;
  }

  private Object doQuery() {
    query qry = getMethod().getAnnotation(query.class);
    String whereClause = qry.where();
    String cleanWhereClause = whereClause.replaceAll(":this.", ":");
    String queryString  = "from "+getOriginalObject().getClass().getCanonicalName()+((whereClause.length()==0)?"":" where "+cleanWhereClause);
    Query query = getEntityManager().createQuery(queryString);
    if(whereClause.lastIndexOf(":this.")>0){
      String[] whereCondition = whereClause.split(" ");
View Full Code Here

Examples of nl.giantit.minecraft.database.query.DeleteQuery.where()

      // Send MySQL Query syntax to console for debugging purposes!
      this.db.getPlugin().getLogger().info(this.query);
    }
   
    DeleteQuery dQ = this.db.delete("sqlite_sequence");
    dQ.where("name", table.replace("#__", this.db.getPrefix()));
    dQ.parse().exec(debug);
   
    return this.db.updateQuery(this);
  }
 
View Full Code Here

Examples of org.apache.empire.db.DBCommand.where()

    }
    cmd.select(DEP.NAME.as("DEPARTMENT"));
    cmd.select(DEP.BUSINESS_UNIT);
    cmd.join(EMP.DEPARTMENT_ID, DEP.DEPARTMENT_ID);
        // Set constraints and order
        cmd.where(EMP.LASTNAME.length().isGreaterThan(0));
        cmd.orderBy(EMP.LASTNAME, EMP.FIRSTNAME);

        /*
        // Example for limitRows() and skipRows()
        if (db.getDriver().isSupported(DBDriverFeature.QUERY_LIMIT_ROWS))
View Full Code Here

Examples of org.apache.empire.db.DBCommand.where()

            boolean allNull = true;
            DBColumn[] idxColumns = idx.getColumns();
            for (int i=0; i<idxColumns.length; i++)
            {   // Check if column has changed
                Object value = record.getValue(idxColumns[i]);
                cmd.where(idxColumns[i].is(value));
                if (value!=null)
                    allNull = false;
            }
            // Check whether all constraints are null
            if (allNull)
View Full Code Here

Examples of org.apache.empire.db.DBCommand.where()

                {   // Multiple key columns
                    Object value = record.getValue(keyColumns[0]);
                    DBCompareExpr notExpr = keyColumns[0].is(value);
                    for (int i=1; i<keyColumns.length; i++)
                    {   // Check if column has changed
                        cmd.where(keyColumns[i].is(value));
                    }
                    cmd.where(notExpr.not());
                }
                else
                {   // Single key column
View Full Code Here

Examples of org.apache.empire.db.DBCommand.where()

                    DBCompareExpr notExpr = keyColumns[0].is(value);
                    for (int i=1; i<keyColumns.length; i++)
                    {   // Check if column has changed
                        cmd.where(keyColumns[i].is(value));
                    }
                    cmd.where(notExpr.not());
                }
                else
                {   // Single key column
                    Object value = record.getValue(keyColumns[0]);
                    cmd.where(keyColumns[0].isNot(value));
View Full Code Here

Examples of org.apache.empire.db.DBCommand.where()

                    cmd.where(notExpr.not());
                }
                else
                {   // Single key column
                    Object value = record.getValue(keyColumns[0]);
                    cmd.where(keyColumns[0].isNot(value));
                }
            }
            // Query now
            DBReader reader = new DBReader();
            try {
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.