Package org.qdao

Examples of org.qdao.TableDescriptor$ColumnDescription


    }
  }

 
  public boolean lock(boolean share) {
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    if (share)
      sql.append("LOCK TABLE ").append(table.name).append(" IN SHARE MODE");
    else
      sql.append("LOCK TABLE ").append(table.name).append(" IN EXCLUSIVE MODE");
    try {
View Full Code Here


    }
  }

 
  public boolean lock(int timeout) {
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    if (timeout <= 0)
      sql.append("SELECT * FROM ").append(table.name).append(" FOR UPDATE");
    else
      sql.append("SELECT * FROM ").append(table.name).append(" FOR UPDATE " + timeout);
    try {
View Full Code Here

    Class<?> clazz = key.getClass();
    if (entity != clazz) {
      // logWarning("Your data is wrong!");
      logWarning("数据不匹配!");
    }
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name).append(" WHERE ");
    for (int i = 0; i < table.primaryKeys.length; i++) {
      if (i != table.primaryKeys.length - 1) {
        sql.append(table.primaryKeys[i]).append(" = ? AND ");
      } else
View Full Code Here

    Class<?> clazz = key.getClass();
    if (entity != clazz) {
      // logWarning("Your data is wrong!");
      logWarning("数据不匹配!");
    }
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name).append(" WHERE ");
    for (int i = 0; i < table.primaryKeys.length; i++) {
      if (i != table.primaryKeys.length - 1) {
        sql.append(table.primaryKeys[i]).append(" = ? AND ");
      } else
View Full Code Here

  }

 
  public List<T> lock(String sqlPart) {
    List<T> list = new ArrayList<T>();
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name).append(" WHERE ")
        .append(sqlPart).append(" FOR UPDATE");
    // prepare the statement
    try {
      prepare();
View Full Code Here

  }

 
  public List<T> lock(String sqlPart, int timeout) {
    List<T> list = new ArrayList<T>();
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name).append(" WHERE ")
        .append(sqlPart).append(" FOR UPDATE ");

    // add the timeout
    if (timeout >= 0)
View Full Code Here

    Class<?> clazz = key.getClass();
    if (entity != clazz) {
      // logWarning("Your data is wrong!");
      logWarning("数据不匹配!");
    }
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name).append(" WHERE ");
    for (int i = 0; i < table.primaryKeys.length; i++) {
      if (i != table.primaryKeys.length - 1) {
        sql.append(table.primaryKeys[i]).append(" = ? AND ");
      } else
View Full Code Here

  }

 
  public List<T> select() {
    List<T> list = new ArrayList<T>();
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name);
    // prepare the statement
    try {
      prepare();
    } catch (SQLException e1) {
View Full Code Here

 
  public List<T> select(IFetchHandler<T> filter) {
    // TODO filter begin
    filter.begin();
    List<T> list = new ArrayList<T>();
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name);
    // prepare the statement
    try {
      prepare();
    } catch (SQLException e1) {
View Full Code Here

  }

 
  public List<T> select(String sqlPart) {
    List<T> list = new ArrayList<T>();
    TableDescriptor table = dbEngine.getTableDescriptor(entity);
    sql.append("SELECT * FROM ").append(table.name)
        .append(" WHERE ").append(sqlPart);
    // prepare the statement
    try {
      prepare();
View Full Code Here

TOP

Related Classes of org.qdao.TableDescriptor$ColumnDescription

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.