Examples of save()


Examples of org.springmodules.datamap.dao.DataMapper.save()

        DataMapper am = new ActiveMapper(Beer.class);
        am.setDataSource(jdbcTemplate.getDataSource());
        am.afterPropertiesSet();
        Beer b = new Beer();
        b.setBrand("Heineken");
        am.save(b);
        assertNotNull(b.getId());
        assertEquals("new beer is in db", 1, jdbcTemplate.queryForInt("select count(*) from beers where brand = 'Heineken'"));
    }

}
View Full Code Here

Examples of org.springmodules.datamap.jdbc.sqlmap.ActiveMapper.save()

        DataMapper am = new ActiveMapper(Beer.class);
        am.setDataSource(jdbcTemplate.getDataSource());
        am.afterPropertiesSet();
        Beer b = new Beer();
        b.setBrand("Heineken");
        am.save(b);
        assertNotNull(b.getId());
        assertEquals("new beer is in db", 1, jdbcTemplate.queryForInt("select count(*) from beers where brand = 'Heineken'"));
    }

}
View Full Code Here

Examples of org.springmodules.jcr.JcrTemplate.save()

    tt.execute(new TransactionCallbackWithoutResult() {
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
        JcrTemplate template = new JcrTemplate(sf);
        template.save();
      }
    });

    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());
View Full Code Here

Examples of org.sumus.dwh.datastore.DataStore.save()

    private static void createParser(String[] args) throws IOException, DataStoreException {
        DataStore dataStore = createDataStore(new File(args[1]));
        Parser parser = new Parser(dataStore);
        parser.execute(new File(args[0]));
        dataStore.save();
    }
}
View Full Code Here

Examples of org.sylfra.idea.plugins.revu.business.ReviewManager.save()

        originalReview.copyFromTemplate(editedReview);
      }

      try
      {
        reviewManager.save(originalReview);
      }
      catch (Exception e)
      {
        LOGGER.warn(e);
        final String details = ((e.getLocalizedMessage() == null) ? e.toString() : e.getLocalizedMessage());
View Full Code Here

Examples of org.sylfra.idea.plugins.revu.externalizing.IReviewExternalizer.save()

    try
    {
      if (review.isExternalizable())
      {
        reviewExternalizer.save(review, review.getFile());
      }
    }
    finally
    {
      metaReview.isSaving = false;
View Full Code Here

Examples of org.syncany.config.to.ConfigTO.save()

    // Success, now do the work!
    File appDir = createAppDirs(options.getLocalDir());

    // Write file 'config.xml'
    File configFile = new File(appDir, Config.FILE_CONFIG);
    configTO.save(configFile);

    // Write file 'syncany'
    File repoFile = new File(appDir, Config.FILE_REPO);
    FileUtils.copyFile(tmpRepoFile, repoFile);
    tmpRepoFile.delete();
View Full Code Here

Examples of org.syncany.config.to.DaemonConfigTO.save()

      // Add to config if it's not already in there
      if (!folderExists) {
        logger.log(Level.INFO, "Adding folder to daemon config: " + localDirPath + ", and saving config at " + daemonConfigFile);

        daemonConfigTO.getFolders().add(new FolderTO(localDirPath));
        daemonConfigTO.save(daemonConfigFile);

        return true;
      }
      else {
        return false;
View Full Code Here

Examples of org.syncany.config.to.UserConfigTO.save()

    try {
      System.out.println("First launch, creating a secret key (could take a sec)...");
      SaltedSecretKey configEncryptionKey = CipherUtil.createMasterKey(CipherUtil.createRandomAlphabeticString(USER_CONFIG_ENCRYPTION_KEY_LENGTH));

      userConfigTO.setConfigEncryptionKey(configEncryptionKey);
      userConfigTO.save(userConfigFile);
    }
    catch (Exception e) {
      // Don't care!
    }
  }
View Full Code Here

Examples of org.syncany.database.dao.DatabaseXmlSerializer.save()

  protected void saveDeltaDatabase(MemoryDatabase db, File localDatabaseFile) throws IOException {
    logger.log(Level.INFO, "- Saving database to " + localDatabaseFile + " ...");

    DatabaseXmlSerializer dao = new DatabaseXmlSerializer(config.getTransformer());
    dao.save(db.getDatabaseVersions(), localDatabaseFile);
  }

  private void addDirtyData(DatabaseVersion newDatabaseVersion) {
    Iterator<DatabaseVersion> dirtyDatabaseVersions = localDatabase.getDirtyDatabaseVersions();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.