Examples of where()


Examples of br.com.objectos.comuns.relational.search.Join.where()

  public void restrict_on_related_entity() {
    Sql sql = sqlProvider.get();
    sql.select("*").from("COMUNS_RELATIONAL.OTHER").as("O").andLoadWith(loader);

    Join _simple = sql.join("SIMPLE", "S").on("O.SIMPLE_ID = S.ID");
    _simple.where("STRING").equalTo("BCD");

    List<Other> result = sql.list();
    List<String> strings = transform(result, Functions.toStringFunction());
    assertThat(strings.size(), equalTo(1));
    assertThat(strings.get(0), equalTo("Other{id=2, value=BCDCB}"));
View Full Code Here

Examples of com.adaptrex.core.ext.data.Store.where()

         * Load inline data?
         */
        if (inline != null && inline.equals("true")) {
          store.inline();
 
          if (where != null) store.where(where);
         
          if (param != null) {
            for (String p : param.split(",")) {
                String[] parts = p.split(":");
                store.param(parts[0],parts[1]);
View Full Code Here

Examples of com.atlassian.jira.jql.builder.JqlQueryBuilder.where()

   * @return
   */
  private Query buildSearch(final CustomField securityLevel, final String clientName, Collection<Long> projectCollection, Collection<String> issueTypeCollection) {
    // create search for incidents
    JqlQueryBuilder newBuilder = JqlQueryBuilder.newBuilder();
    Query query = newBuilder.where()
      .project().inNumbers(projectCollection)
      .and().status().in("" + IssueFieldConstants.OPEN_STATUS_ID,
          "" + IssueFieldConstants.INPROGRESS_STATUS_ID)
      .and().issueType().inStrings(issueTypeCollection)
      .and().customField(securityLevel.getIdAsLong()).like(clientName).buildQuery();
View Full Code Here

Examples of com.baasbox.util.QueryParams.where()

  }
 
  private ODocument getODocument(String key){
    String indexKey = this.INDEX_NAME+":"+key;
    QueryParams qp = QueryParams.getInstance();
    qp.where("key = ?").params(new String[]{indexKey});
    try{
      List<ODocument> docs = GenericDao.getInstance().executeQuery(MODEL_NAME, qp);
      if(docs==null || docs.isEmpty()){
        return null;
      }else{
View Full Code Here

Examples of com.boco.bomc.vpn.db.bean.QueryCondition.where()

  }

  public Page getMainUsers(Page page,String loginame) throws ServiceException {
    QueryCondition condition = new QueryCondition();
    if(loginame!=null){
      condition.where().and("loginname=?");
    }
    try {
      List<MainUser> users = null;
      int count =0 ;
      if(loginame==null){
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Delete.where()

            case DEL:
                {
                    Delete delete = table == null
                                  ? delete().all().from(mapper.getKeyspace(), mapper.getTable())
                                  : delete().all().from(table);
                    Delete.Where where = delete.where();
                    for (int i = 0; i < mapper.primaryKeySize(); i++)
                        where.and(eq(mapper.getPrimaryKeyColumn(i).getColumnName(), bindMarker()));
                    return delete.toString();
                }
            case SLICE:
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Select.where()

            case GET:
                {
                    Select select = table == null
                                  ? select().all().from(mapper.getKeyspace(), mapper.getTable())
                                  : select().all().from(table);
                    Select.Where where = select.where();
                    for (int i = 0; i < mapper.primaryKeySize(); i++)
                        where.and(eq(mapper.getPrimaryKeyColumn(i).getColumnName(), bindMarker()));
                    return select.toString();
                }
            case DEL:
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Select.where()

            case REVERSED_SLICE:
                {
                    Select select = table == null
                                  ? select().all().from(mapper.getKeyspace(), mapper.getTable())
                                  : select().all().from(table);
                    Select.Where where = select.where();
                    for (int i = 0; i < mapper.partitionKeys.size(); i++)
                        where.and(eq(mapper.partitionKeys.get(i).getColumnName(), bindMarker()));

                    if (startBoundSize > 0) {
                        if (startBoundSize == 1) {
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Update.where()

        FieldInformation keyField = classInformations.getKeyInformation();
        if (classInformations.isComplexKey()) {
            runComplexKey(update, key, keyField.getSubFields().getFields());
        } else {
            update.where(QueryBuilder.eq(keyField.getName(), key));
        }
        return update;
    }

    private void runComplexKey(Update update, Object key, List<FieldInformation> fields) {
View Full Code Here

Examples of com.datastax.driver.core.querybuilder.Update.Assignments.where()

        when(nameMeta.structure().isStaticColumn()).thenReturn(false);
        when(ageMeta.structure().isStaticColumn()).thenReturn(false);
        when(nameMeta.forStatementGeneration().prepareUpdateField(conditionsCaptor.capture())).thenReturn(assignments);
        when(ageMeta.forStatementGeneration().prepareUpdateField(isA(Assignments.class))).thenReturn(assignments);
        when(idMeta.forStatementGeneration().prepareCommonWhereClauseForUpdate(assignments, false)).thenReturn(assignments.where(eq("id", bindMarker("id"))));
        when(session.prepare(queryCaptor.capture())).thenReturn(ps);

        PreparedStatement actual = generator.prepareUpdateFields(session, meta, asList(nameMeta, ageMeta),
                ifConditions(new CASCondition("name", "John")).withTimestamp(100L));
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.