Package org.syncany.database.dao

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


    // - Memory database
    DatabaseXmlSerializer dDAO = new DatabaseXmlSerializer(testConfig.getTransformer());

    MemoryDatabase remoteDatabase = new MemoryDatabase();
    dDAO.load(remoteDatabase, remoteDatabaseFile, null, null, DatabaseReadType.FULL, DatabaseVersionType.DEFAULT, null);

    DatabaseVersion remoteDatabaseVersion = remoteDatabase.getLastDatabaseVersion();

    // - Sql Database
    SqlDatabase localDatabase = new SqlDatabase(testConfig);
View Full Code Here


 
  public static MemoryDatabase readDatabaseFileFromDisk(File databaseFile, Transformer transformer) throws IOException {
    MemoryDatabase db = new MemoryDatabase();
   
    DatabaseXmlSerializer dao = new DatabaseXmlSerializer(transformer);
    dao.load(db, databaseFile, null, null, DatabaseReadType.FULL, DatabaseVersionType.DEFAULT, null);
   
    return db;
  }
 
  public static void writeDatabaseFileToDisk(MemoryDatabase db, File writtenDatabaseFile, Transformer transformer) throws IOException {
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.