Пример #1
0
 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();
 }
Пример #2
0
 public void insert(Class<?> classOfT, Chain chain) {
   if (chain.isSpecial()) {
     Daos.insertBySpecialChain(this, getEntity(classOfT), null, chain);
     return;
   }
   EntityOperator opt = _opt(classOfT);
   opt.myObj = chain;
   opt.addInsertSelfOnly();
   // insert(chain.toObject(classOfT));// TODO 这样的效率,未免太低了,需要改进
   opt.exec();
 }