@Override public String getSnSelectSQL(SNCfg sn) { return "select " + sn.getSn() + " from " + sn.getTableName() + " where " + sn.getStub() + "='" + sn.getStubValue() + "'"; }
@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(); }
@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(); }