Package org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses

Examples of org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses.SimpleClass


        return object;
    }

    // SimpleClass
    public SimpleClass newSimpleClass() {
        final SimpleClass object = newTransientInstance(SimpleClass.class);
        return object;
    }
View Full Code Here


        boolean bMustAdd = false;
        if (simpleClassList1.size() == 0) {
            bMustAdd = true;
        }
        for (final String string : SqlIntegrationTestCommon.stringList1) {
            final SimpleClass simpleClass = factory.newSimpleClass();
            simpleClass.setString(string);
            simpleClass.setSimpleClassTwoA(simpleClassTwoA);
            sqlDataClass.addToSimpleClasses1(simpleClass);
            if (bMustAdd) {
                simpleClassList1.add(simpleClass);
            }
        }

        // Initialise collection2
        /**/
        for (final String string : SqlIntegrationTestCommon.stringList2) {
            final SimpleClass simpleClass = factory.newSimpleClass();
            simpleClass.setString(string);
            simpleClass.setSimpleClassTwoA(simpleClassTwoB);
            sqlDataClass.addToSimpleClasses2(simpleClass);
            if (bMustAdd) {
                simpleClassList2.add(simpleClass);
            }
        }
View Full Code Here

        final List<SqlDataClass> sqlDataClasses = factory.allDataClasses();
        final SqlDataClass sqlDataClass = sqlDataClasses.get(0);

        final List<SimpleClass> collection = sqlDataClass.getSimpleClasses1();
        final SimpleClass simpleClass1 = collection.get(0);
        // simpleClass1.setString(stringList1.get(3));

        collection.remove(simpleClass1);
        // XML objectstore doesn't support this.
        if (getProperties().getProperty("isis.persistor") != "xml") {
View Full Code Here

        factory.update(sqlDataClass);
    }

    public void testFindByMatchString() {
        final SimpleClass simpleClassMatch = new SimpleClass();
        simpleClassMatch.setString(stringList1.get(1));

        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final List<SimpleClass> classes = factory.allSimpleClassesThatMatch(simpleClassMatch);
        assertEquals(1, classes.size());
View Full Code Here

    public void testFindByMatchEntity() {
        final SqlDataClassFactory factory = SqlIntegrationTestSingleton.getSqlDataClassFactory();
        final List<SimpleClassTwo> classTwos = factory.allSimpleClassTwos();

        final SimpleClass simpleClassMatch = new SimpleClass();
        simpleClassMatch.setSimpleClassTwoA(classTwos.get(0));

        final List<SimpleClass> classes = factory.allSimpleClassesThatMatch(simpleClassMatch);
        // TODO: Why is this hack required?
        if (getProperties().getProperty("isis.persistor") != "in-memory") {
            assertEquals(stringList1.size(), classes.size());
View Full Code Here

    public List<SimpleClass> allSimpleClasses() {
        return allInstances(SimpleClass.class);
    }

    public SimpleClass newSimpleClass() {
        final SimpleClass object = newTransientInstance(SimpleClass.class);
        return object;
    }
View Full Code Here

        boolean bMustAdd = false;
        if (simpleClassList1.size() == 0) {
            bMustAdd = true;
        }
        for (final String string : SqlIntegrationTestCommon.stringList1) {
            final SimpleClass simpleClass = factory.newSimpleClass();
            simpleClass.setString(string);
            simpleClass.setSimpleClassTwoA(simpleClassTwoA);
            sqlDataClass.addToSimpleClasses1(simpleClass);
            if (bMustAdd) {
                simpleClassList1.add(simpleClass);
            }
        }

        // Initialise collection2
        /**/
        for (final String string : SqlIntegrationTestCommon.stringList2) {
            final SimpleClass simpleClass = factory.newSimpleClass();
            simpleClass.setString(string);
            simpleClass.setSimpleClassTwoA(simpleClassTwoA);
            sqlDataClass.addToSimpleClasses2(simpleClass);
            if (bMustAdd) {
                simpleClassList2.add(simpleClass);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.objectstores.sql.testsystem.dataclasses.SimpleClass

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.