Package com.mobixess.jodb.core

Examples of com.mobixess.jodb.core.JODBSessionContainer.commit()


            throw new RuntimeException();
        }
        obj = classes.get(index);
       
        sessionContainer.delete(obj);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        classes = sessionContainer.getAllObjects();
       
View Full Code Here


        testFile.delete();
       
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        String testString = "testString";
        sessionContainer.set(testString);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        List classes = sessionContainer.getAllObjects();
        if(classes.size()!=1){
View Full Code Here

            throw new RuntimeException();
        }
       
        sessionContainer.set(stringFromDB);
       
        sessionContainer.commit();
       
        classes = sessionContainer.getAllObjects();
        if(classes.size()!=1){
            throw new RuntimeException();
        }
View Full Code Here

        ObjectA objectA = new ObjectA((byte)1,(short)2,objectB);
        ObjectA objectA2 = new ObjectA((byte)3,(byte)3,objectB);
        objectB._val3 = objectA;
        sessionContainer.set(objectA);
        sessionContainer.set(objectA2);
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        List classes = sessionContainer.getAllObjects();
       
View Full Code Here

        sessionContainer.set(objectB);
        sessionContainer.set(array);
        sessionContainer.set(objectA);
       
       
        sessionContainer.commit();
        sessionContainer.close();
       
        sessionContainer = getContainerForFile(testFile);
        //sessionContainer.printFileMap();
        List classes = sessionContainer.getAllObjects();
View Full Code Here

        }
        array1 = (Object[]) arrayObj;
        array1[0] = objectB;
        array1[1] = objectA;
        sessionContainer.set(array1);
        sessionContainer.commit();
        sessionContainer.printFileMap();
       
        sessionContainer.close()
       
        sessionContainer = getContainerForFile(testFile);
View Full Code Here

        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        for (int i = 0; i < 0x300; i++) {
            System.err.println("sizeIncreaseTest "+i);
            byte[] array = new byte[i];
            sessionContainer.set(array);
            sessionContainer.commit();
            List classes = sessionContainer.getAllObjects();
            if(classes.size() != i+1){
                throw new RuntimeException();
            }
            boolean found = false;
View Full Code Here

        File testFile = new File(testFileDir,SimpleAddTest.class.getSimpleName()+(_testCounter++)+".jdb");
        testFile.delete();
        JODBSessionContainer sessionContainer = getContainerForFile(testFile);
        Object firstObject = new Object();
        sessionContainer.set(firstObject);
        sessionContainer.commit();
       
        ObjectD testObjectD = new ObjectD();
        testObjectD._obj0 = firstObject;
        sessionContainer.set(testObjectD);
        sessionContainer.commit();
View Full Code Here

        sessionContainer.commit();
       
        ObjectD testObjectD = new ObjectD();
        testObjectD._obj0 = firstObject;
        sessionContainer.set(testObjectD);
        sessionContainer.commit();
        //sessionContainer.printFileMap();
       
        testObjectD._obj0 = null;
        sessionContainer.set(testObjectD);
        sessionContainer.commit();
View Full Code Here

        sessionContainer.commit();
        //sessionContainer.printFileMap();
       
        testObjectD._obj0 = null;
        sessionContainer.set(testObjectD);
        sessionContainer.commit();
        //sessionContainer.printFileMap();
       
        if(sessionContainer.getPersistenceStatistics(testObjectD).getTotalRecords()!=1){
            throw new RuntimeException();
        }
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.