Beispiel #1
0
 @Override
 public String getSnSelectSQL(SNCfg sn) {
   return "select "
       + sn.getSn()
       + " from "
       + sn.getTableName()
       + " where "
       + sn.getStub()
       + "='"
       + sn.getStubValue()
       + "'";
 }
Beispiel #2
0
 @Override
 public String getSnInitSQL(SNCfg sn) {
   StringBuffer sb = new StringBuffer();
   sb.append("insert into ");
   sb.append(sn.getTableName());
   sb.append(" (");
   sb.append(sn.getStub());
   sb.append(",");
   sb.append(sn.getSn());
   sb.append(") values ('");
   sb.append(sn.getStubValue());
   sb.append("',0");
   sb.append(")");
   return sb.toString();
 }
Beispiel #3
0
 @Override
 public String getSnIncrSQL(SNCfg sn) {
   StringBuffer sb = new StringBuffer("update ");
   sb.append(sn.getTableName());
   sb.append(" set ");
   sb.append(sn.getSn());
   sb.append(" = ");
   sb.append(sn.getCurrent() + sn.getStep());
   //        sb.append(" + ");
   //        sb.append(sn.getStep());
   sb.append(" where ");
   sb.append(sn.getStub());
   sb.append(" = '");
   sb.append(sn.getStubValue());
   sb.append("'");
   sb.append(" and ");
   sb.append(sn.getSn());
   sb.append("=");
   sb.append(sn.getCurrent());
   return sb.toString();
 }