Package org.fto.jthink.jdbc

Examples of org.fto.jthink.jdbc.DataObject


  /**
   * 生成ID
   */
  private String generateID(){
    List maxIdLT = (List)sqlExecutor.executeQuery("SELECT MAX(ID) AS MAX_ID FROM Messages");
    DataObject maxIdDO = (DataObject)maxIdLT.iterator().next();
    if(maxIdDO.get("MAX_ID")==null){
      return "1";
    }
    return String.valueOf(Integer.parseInt(maxIdDO.get("MAX_ID"))+1);
  }
View Full Code Here


    try{
      transaction.begin();
     
      /* 构建SQL语句 */
      SQL sql = sqlBuilder.constructSQLForCount("Messages", "*", "ROW_COUNT", null);
      DataObject countDO = (DataObject)((List)sqlExecutor.execute(sql)).iterator().next();
      return Integer.parseInt(countDO.get("ROW_COUNT"));
     
    }finally{
      transaction.close();
    }
  }
View Full Code Here

  /**
   * 生成ID
   */
  private String generateID(){
    List maxIdLT = (List)sqlExecutor.executeQuery("SELECT MAX(ID) AS MAX_ID FROM Messages");
    DataObject maxIdDO = (DataObject)maxIdLT.iterator().next();
    if(maxIdDO.get("MAX_ID")==null){
      return "1";
    }
    return String.valueOf(Integer.parseInt(maxIdDO.get("MAX_ID"))+1);
  }
View Full Code Here

    try{
      transaction.begin();
     
      /* 构建SQL语句 */
      SQL sql = sqlBuilder.constructSQLForCount("Messages", "*", "ROW_COUNT", null);
      DataObject countDO = (DataObject)((List)sqlExecutor.execute(sql)).iterator().next();
      return Integer.parseInt(countDO.get("ROW_COUNT"));
     
    }finally{
      transaction.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.fto.jthink.jdbc.DataObject

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.