Package com.j256.ormlite.dao.Dao

Examples of com.j256.ormlite.dao.Dao.CreateOrUpdateStatus


   */
  public Where<T, ID> and(Where<T, ID> first, Where<T, ID> second, Where<T, ID>... others) {
    Clause[] clauses = buildClauseArray(others, "AND");
    Clause secondClause = pop("AND");
    Clause firstClause = pop("AND");
    addClause(new ManyClause(firstClause, secondClause, clauses, ManyClause.AND_OPERATION));
    return this;
  }
View Full Code Here


    }
    Clause[] clauses = new Clause[numClauses];
    for (int i = numClauses - 1; i >= 0; i--) {
      clauses[i] = pop("AND");
    }
    addClause(new ManyClause(clauses, ManyClause.AND_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * OR operation which takes the previous clause and the next clause and OR's them together.
   */
  public Where<T, ID> or() {
    addNeedsFuture(new ManyClause(pop("OR"), ManyClause.OR_OPERATION));
    return this;
  }
View Full Code Here

   */
  public Where<T, ID> or(Where<T, ID> left, Where<T, ID> right, Where<T, ID>... others) {
    Clause[] clauses = buildClauseArray(others, "OR");
    Clause secondClause = pop("OR");
    Clause firstClause = pop("OR");
    addClause(new ManyClause(firstClause, secondClause, clauses, ManyClause.OR_OPERATION));
    return this;
  }
View Full Code Here

    }
    Clause[] clauses = new Clause[numClauses];
    for (int i = numClauses - 1; i >= 0; i--) {
      clauses[i] = pop("OR");
    }
    addClause(new ManyClause(clauses, ManyClause.OR_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Used to NOT the next clause specified.
   */
  public Where<T, ID> not() {
    addNeedsFuture(new Not());
    return this;
  }
View Full Code Here

  /**
   * Used to NOT the argument clause specified.
   */
  public Where<T, ID> not(Where<T, ID> comparison) {
    addClause(new Not(pop("NOT")));
    return this;
  }
View Full Code Here

      throw new IllegalArgumentException("Can't orderBy foreign colletion field: " + columnName);
    }
    if (orderByList == null) {
      orderByList = new ArrayList<OrderBy>();
    }
    orderByList.add(new OrderBy(columnName, ascending));
    return this;
  }
View Full Code Here

   * Add a raw statement as part of the where that can be anything that the database supports. Using more structured
   * methods is recommended but this gives more control over the query and allows you to utilize database specific
   * features.
   */
  public Where<T, ID> raw(String rawStatement) {
    addClause(new Raw(rawStatement));
    return this;
  }
View Full Code Here

  public StatementBuilder<T, ID> updateColumnExpression(String columnName, String expression) throws SQLException {
    FieldType fieldType = verifyColumnName(columnName);
    if (fieldType.isForeignCollection()) {
      throw new SQLException("Can't update foreign colletion field: " + columnName);
    }
    addUpdateColumnToList(columnName, new SetExpression(columnName, fieldType, expression));
    return this;
  }
View Full Code Here

TOP

Related Classes of com.j256.ormlite.dao.Dao.CreateOrUpdateStatus

Copyright © 2018 www.massapicom. 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.