Package inspector.jqcml.io.db

Examples of inspector.jqcml.io.db.QcDBReader


        EntityManagerFactory emf = QcDBManagerFactory.createMySQLFactory("localhost", "3306", schema, "root", null);
        QcDBWriter writer = new QcDBWriter(emf);
        writer.writeQcML(qcmlExpected);

        // read it back in
        QcDBReader reader = new QcDBReader(emf);
    QcML qcmlRead = reader.getQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        emf.close();

        assertEquality(qcmlExpected, qcmlRead);
    }
View Full Code Here


        // overwrite the first object
        QcML qcmlOther = generateRandomQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        writer.writeQcML(qcmlOther);

        // read the second object back in
        QcDBReader reader = new QcDBReader(emf);
        QcML qcmlRead = reader.getQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        emf.close();

        assertEquality(qcmlOther, qcmlRead);
    }
View Full Code Here

        EntityManagerFactory emf = QcDBManagerFactory.createSQLiteFactory("WriteReadFileTest.sqlite");
        QcDBWriter writer = new QcDBWriter(emf);
        writer.writeQcML(qcmlExpected);

        // read it back in
        QcDBReader reader = new QcDBReader(emf);
        QcML qcmlRead = reader.getQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        emf.close();

        assertEquality(qcmlExpected, qcmlRead);
    }
View Full Code Here

        // overwrite the first object
        QcML qcmlOther = generateRandomQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        writer.writeQcML(qcmlOther);

        // read the second object back in
        QcDBReader reader = new QcDBReader(emf);
        QcML qcmlRead = reader.getQcML(getClass().getResource("/").getPath() + "WriteReadFileTest.qcML");
        emf.close();

        assertEquality(qcmlOther, qcmlRead);
    }
View Full Code Here

    Process p = Runtime.getRuntime().exec("python " + getClass().getResource("/qcml2qcdb.py").getFile() + " " + getClass().getResource("/WriteReadFileTest.qcML").getFile());
    p.waitFor();

    // read the qcDB
    EntityManagerFactory emf = QcDBManagerFactory.createSQLiteFactory(getClass().getResource("/WriteReadFileTest.db").getFile());
    QcDBReader reader = new QcDBReader(emf);
    QcML qcmlRead = reader.getQcML(getClass().getResource("/WriteReadFileTest.qcML").getFile());
    emf.close();

    assertEquality(qcmlExpected, qcmlRead);
  }
View Full Code Here

                EntityManagerFactory emf = null;
                if(cmd.hasOption("f"))
                    reader = new QcMLFileReader();
                else if(cmd.hasOption("db")) {
                    emf = createEntityManagerFactory(cmd);
                    reader = new QcDBReader(emf);
                }
                else {
                    logger.error("No/invalid input source selected");
                    throw new IllegalArgumentException("No/invalid input source selected");
                }
View Full Code Here

TOP

Related Classes of inspector.jqcml.io.db.QcDBReader

Copyright © 2018 www.massapicom. 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.