Package inspector.jqcml.io.db

Examples of inspector.jqcml.io.db.QcDBWriter


    @Test
    public void mysql_new() {
        // write the object to a MySQL database
        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();
View Full Code Here


    @Test
    public void mysql_overwrite() {
        // write the object to a MySQL database
        EntityManagerFactory emf = QcDBManagerFactory.createMySQLFactory("localhost", "3306", schema, "root", null);
        QcDBWriter writer = new QcDBWriter(emf);
        writer.writeQcML(qcmlExpected);
        // 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();
View Full Code Here

    @Test
    public void sqlite_new() {
        // write the object to a SQLite database
        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();
View Full Code Here

    @Test
    public void sqlite_overwrite() {
        // write the object to a MySQL database
        EntityManagerFactory emf = QcDBManagerFactory.createSQLiteFactory("WriteReadFileTest.sqlite");
        QcDBWriter writer = new QcDBWriter(emf);
        writer.writeQcML(qcmlExpected);
        // 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();
View Full Code Here

TOP

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

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.