Examples of PersonNotes


Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        context.performGenericQuery(new SQLTemplate(
                PersonNotes.class,
                "INSERT INTO PERSON_NOTES (ID, NOTES, PERSON_ID) VALUES (1, 'AA', 1)"));

        PersonNotes note = Cayenne.objectForPK(context, PersonNotes.class, 1);
        assertNotNull(note);
        assertNotNull(note.getPerson());
        assertTrue(note.getPerson() instanceof Employee);
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        query.addPrefetch(PersonNotes.PERSON_PROPERTY);
        query.addOrdering(PersonNotes.NOTES_PROPERTY, SortOrder.ASCENDING);

        List<PersonNotes> notes = createDataContext().performQuery(query);
        assertEquals(2, notes.size());
        PersonNotes note = notes.get(0);

        blockQueries();
        try {
            assertEquals("AA", note.getPerson().getName());
        }
        finally {
            unblockQueries();
        }
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        SelectQuery query = new SelectQuery(PersonNotes.class);
        query.addPrefetch(PersonNotes.PERSON_PROPERTY).setSemantics(
                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);

        PersonNotes note = (PersonNotes) Cayenne.objectForQuery(
                createDataContext(),
                query);

        blockQueries();
        try {
            assertEquals("AA", note.getPerson().getName());
        }
        finally {
            unblockQueries();
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        context.performGenericQuery(new SQLTemplate(
                PersonNotes.class,
                "INSERT INTO PERSON_NOTES (ID, NOTES, PERSON_ID) VALUES (1, 'AA', 1)"));

        PersonNotes note = DataObjectUtils.objectForPK(context, PersonNotes.class, 1);
        assertNotNull(note);
        assertNotNull(note.getPerson());
        assertTrue(note.getPerson() instanceof Employee);
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        query.addPrefetch(PersonNotes.PERSON_PROPERTY);
        query.addOrdering(PersonNotes.NOTES_PROPERTY, Ordering.ASC);

        List<PersonNotes> notes = createDataContext().performQuery(query);
        assertEquals(2, notes.size());
        PersonNotes note = notes.get(0);

        blockQueries();
        try {
            assertEquals("AA", note.getPerson().getName());
        }
        finally {
            unblockQueries();
        }
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        SelectQuery query = new SelectQuery(PersonNotes.class);
        query.addPrefetch(PersonNotes.PERSON_PROPERTY).setSemantics(
                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);

        PersonNotes note = (PersonNotes) DataObjectUtils.objectForQuery(
                createDataContext(),
                query);

        blockQueries();
        try {
            assertEquals("AA", note.getPerson().getName());
        }
        finally {
            unblockQueries();
        }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        context.performGenericQuery(new SQLTemplate(
                PersonNotes.class,
                "INSERT INTO PERSON_NOTES (ID, NOTES, PERSON_ID) VALUES (1, 'AA', 1)"));

        PersonNotes note = Cayenne.objectForPK(context, PersonNotes.class, 1);
        assertNotNull(note);
        assertNotNull(note.getPerson());
        assertTrue(note.getPerson() instanceof Employee);
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        query.addPrefetch(PersonNotes.PERSON_PROPERTY);
        query.addOrdering(PersonNotes.NOTES_PROPERTY, SortOrder.ASCENDING);

        List<PersonNotes> notes = context.performQuery(query);
        assertEquals(2, notes.size());
        final PersonNotes note = notes.get(0);

        queryBlocker.runWithQueriesBlocked(new UnitTestClosure() {

            public void execute() {
                assertEquals("AA", note.getPerson().getName());
            }
        });
    }
View Full Code Here

Examples of org.apache.cayenne.testdo.inherit.PersonNotes

        SelectQuery query = new SelectQuery(PersonNotes.class);
        query.addPrefetch(PersonNotes.PERSON_PROPERTY).setSemantics(
                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);

        final PersonNotes note = (PersonNotes) Cayenne.objectForQuery(context, query);

        queryBlocker.runWithQueriesBlocked(new UnitTestClosure() {

            public void execute() {
                assertEquals("AA", note.getPerson().getName());
            }
        });

    }
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.