public int update(String tableName, Chain chain, Condition cnd) { if (chain.isSpecial()) return Daos.updateBySpecialChain(this, null, tableName, chain, cnd); EntityOperator opt = _optBy(chain.toEntityMap(tableName)); if (null == opt) return 0; opt.addUpdate(cnd); opt.exec(); return opt.getUpdateCount(); }
public void insert(String tableName, Chain chain) { if (chain.isSpecial()) { Daos.insertBySpecialChain(this, null, tableName, chain); return; } EntityOperator opt = _optBy(chain.toEntityMap(tableName)); if (null == opt) return; opt.addInsert(); opt.exec(); }