Package com.mobixess.jodb.soda.api

Examples of com.mobixess.jodb.soda.api.Query.execute()


       
        query = sessionContainer.query();
       
        query.constrain(objectWithEnum._val1).greater();
       
        list = query.execute();
       
        if(list.size()!=1){
            throw new RuntimeException();
        }
       
View Full Code Here


       
        query = sessionContainer.query();
       
        query.constrain(objectWithEnum._val1).greater().or(query.constrain(objectWithEnum._val1));
       
        list = query.execute();
       
        if(list.size()!=2){
            throw new RuntimeException(""+list.size());
        }
        sessionContainer.close();
View Full Code Here

        }
       
        Query query = sessionContainer.query();
        pattern = new ObjectA((byte)4,(short)3,null);
        query.constrain(pattern);
        list = query.execute();
        if(list.size()!=1){
            throw new RuntimeException(""+list.size());
        }
        fromDb = (ObjectA) list.get(0);
        if(fromDb.getVal1()!=pattern.getVal1() || fromDb.getVal2()!=pattern.getVal2()|| fromDb.getVal3()!=pattern.getVal3()){
View Full Code Here

       
       
        query = sessionContainer.query();
        pattern = new ObjectA((byte)2,(short)0,null);
        query.constrain(pattern);
        list = query.execute();
        if(list.size()!=1){
            throw new RuntimeException(""+list.size());
        }
        fromDb = (ObjectA) list.get(0);
        if(fromDb.getVal1()!=objectA.getVal1() || fromDb.getVal2()!=objectA.getVal2()|| fromDb.getVal3()!=objectA.getVal3()){
View Full Code Here

        }
       
        query = sessionContainer.query();
        pattern = new ObjectA((byte)0,(short)3,null);
        query.constrain(pattern);
        list = query.execute();
        if(list.size()!=2){
            throw new RuntimeException(""+list.size());
        }
       
        if(reopen){
View Full Code Here

       
        ObjectWithString objectWithStringPattern = new ObjectWithString();
        objectWithStringPattern._val1 = "test";
        query = sessionContainer.query();
        query.constrain(objectWithStringPattern);
        list = query.execute();
        if(list.size()!=1){
            throw new RuntimeException(""+list.size());
        }
       
        ObjectWithString objectWithStringfromDb = (ObjectWithString) list.get(0);
View Full Code Here

        Constraint constraint = query.constrain(objectWithStringPattern);
        ObjectWithString objectWithStringPattern1 = new ObjectWithString();
        objectWithStringPattern1._val1 = "test1";
        query.constrain(objectWithStringPattern1).or(constraint);
       
        list = query.execute();
        if(list.size()!=2){
            throw new RuntimeException(""+list.size());
        }
       
        sessionContainer.close();
View Full Code Here

            sessionContainer = getContainerForFile(testFile);
        }

        Query query = sessionContainer.query();
        query.constrain(ObjectA.class);
        list = query.execute();
        if(list.size()!=1){
            throw new RuntimeException();
        }
        if(list.get(0).getClass() != ObjectA.class){
            throw new RuntimeException();
View Full Code Here

            sessionContainer.close();
            sessionContainer = getContainerForFile(testFile);
        }
        query = sessionContainer.query();
        query.constrain(ObjectA.class).not();
        list = query.execute();
        if(list.size()!=1){
            throw new RuntimeException();
        }
        if(list.get(0).getClass() != ObjectB.class){
            throw new RuntimeException();
View Full Code Here

            sessionContainer = getContainerForFile(testFile);
        }
       
        query = sessionContainer.query();
        query.constrain(ObjectA.class).or(query.constrain(ObjectB.class));
        list = query.execute();
        if(list.size()!=2){
            throw new RuntimeException();
        }
       
        if(reopen){
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.