code: public BatchResult addBatch(ApplicationDefinition appDef, String tableName, DBObjectBatch batch) {
          checkServiceState();
          TableDefinition tableDef = appDef.getTableDef(tableName);
          Utils.require(tableDef != null || appDef.allowsAutoTables(),
                        "Unknown table for application '%s': %s", appDef.getAppName(), tableName);
          
          if (tableDef == null && appDef.allowsAutoTables()) {
              tableDef = addAutoTable(appDef, tableName);
              assert tableDef != null;
          }
          
          BatchObjectUpdater batchUpdater = new BatchObjectUpdater(tableDef);
          return batchUpdater.addBatch(batch);
      }
docs: Add or update a batch of updates for the given application and table. If the
  application's autotables option is true and the given table doesn't exist, it is
  created automatically. When an object in the batch is assigned an ID that is
  already used, the corresponding object is updated. This preserves idempotent
  semantics: performing the same add twice is safe as long as IDs are explicitly
  assigned. Objects that aren't given explicit IDs are assigned default IDs.
  
  @param appDef    {@link ApplicationDefinition} of application to update.
  @param tableName Name of table to add objects to.
  @param batch     {@link DBObjectBatch} containing new or updated objects.
  @return          {@link BatchResult} indicating results of update.