public String limitSql(String sql, int currentPage) {
    	if(currentPage > 0){
            if (Constant.DATABASE_TYPE.equals(Constant.ORACLE)) {
//              int from = getFrom(currentPage);
//              int to = getTo(currentPage);
//              if(sql.contains(" ORDER BY ")){
//                  sql.split(" ORDER BY ");
//              }
//              StringBuffer sqlBuf=new StringBuffer(sql);
//              if(sql.contains(" WHERE ")){
//                  return sqlBuf.append(" AND ROWID IN (SELECT rid FROM (SELECT ROWNUM rn,rid FROM(SELECT ROWID rid FROM ")
//                  .append(tableName)
//                  .append(") WHERE ROWNUM <=")
//                  .append(to)
//                  .append(") WHERE rn >= ")
//                  .append(from)
//                  .append(")").toString();
//              }else{
//                  return sqlBuf.append(" WHERE ROWID IN (SELECT rid FROM (SELECT ROWNUM rn,rid FROM(SELECT ROWID rid," + key + " FROM " + tableName + " ORDER BY "
//                  + key + " DESC) WHERE ROWNUM <= " + to + ") WHERE rn >= " + from + ") ORDER BY " + key + " DESC").toString();
//              }
          	 return null;
          } else if (Constant.DATABASE_TYPE.equals(Constant.MYSQL)) {
              int from = getFrom(currentPage);
              return sql += " LIMIT " + from + " ," + Constant.ONE_PAGE_COUNT + "";
          } else {
              return null;
          }
    	}else{
    		return sql;
    	}

    }