Package com.j256.ormlite.dao

Examples of com.j256.ormlite.dao.BaseForeignCollection


   * 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

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

  /**
   * Add a '=' clause so the column must be equal to the value.
   */
  public Where<T, ID> eq(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.EQUAL_TO_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a '&gt;=' clause so the column must be greater-than or equals-to the value.
   */
  public Where<T, ID> ge(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.GREATER_THAN_EQUAL_TO_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a '&gt;' clause so the column must be greater-than the value.
   */
  public Where<T, ID> gt(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.GREATER_THAN_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a '&lt;=' clause so the column must be less-than or equals-to the value.
   */
  public Where<T, ID> le(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.LESS_THAN_EQUAL_TO_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a '&lt;' clause so the column must be less-than the value.
   */
  public Where<T, ID> lt(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.LESS_THAN_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a LIKE clause so the column must mach the value using '%' patterns.
   */
  public Where<T, ID> like(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.LIKE_OPERATION));
    return this;
  }
View Full Code Here

  /**
   * Add a '&lt;&gt;' clause so the column must be not-equal-to the value.
   */
  public Where<T, ID> ne(String columnName, Object value) throws SQLException {
    addClause(new SimpleComparison(columnName, findColumnFieldType(columnName), value,
        SimpleComparison.NOT_EQUAL_TO_OPERATION));
    return this;
  }
View Full Code Here

TOP

Related Classes of com.j256.ormlite.dao.BaseForeignCollection

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.