Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.DataContext.newObject()


        DataContext context = createDataContext();

        ReflexiveAndToOne ox = context
                .newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
View Full Code Here


        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();
View Full Code Here

        assertTrue("Failed: " + equalTo, equalTo.match(noMatch));
    }

    public void testEvaluateEQUAL_TODataObject() throws Exception {
        DataContext context = createDataContext();
        Artist a1 = (Artist) context.newObject("Artist");
        Artist a2 = (Artist) context.newObject("Artist");
        Painting p1 = (Painting) context.newObject("Painting");
        Painting p2 = (Painting) context.newObject("Painting");
        Painting p3 = (Painting) context.newObject("Painting");
View Full Code Here

    }

    public void testEvaluateEQUAL_TODataObject() throws Exception {
        DataContext context = createDataContext();
        Artist a1 = (Artist) context.newObject("Artist");
        Artist a2 = (Artist) context.newObject("Artist");
        Painting p1 = (Painting) context.newObject("Painting");
        Painting p2 = (Painting) context.newObject("Painting");
        Painting p3 = (Painting) context.newObject("Painting");

        p1.setToArtist(a1);
View Full Code Here

    public void testEvaluateEQUAL_TODataObject() throws Exception {
        DataContext context = createDataContext();
        Artist a1 = (Artist) context.newObject("Artist");
        Artist a2 = (Artist) context.newObject("Artist");
        Painting p1 = (Painting) context.newObject("Painting");
        Painting p2 = (Painting) context.newObject("Painting");
        Painting p3 = (Painting) context.newObject("Painting");

        p1.setToArtist(a1);
        p2.setToArtist(a2);
View Full Code Here

    }

    public void testQualifyOnToOne() {
        DataContext context = createDataContext();

        ReflexiveAndToOne ox = context
                .newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");
View Full Code Here

    public void testEvaluateEQUAL_TODataObject() throws Exception {
        DataContext context = createDataContext();
        Artist a1 = (Artist) context.newObject("Artist");
        Artist a2 = (Artist) context.newObject("Artist");
        Painting p1 = (Painting) context.newObject("Painting");
        Painting p2 = (Painting) context.newObject("Painting");
        Painting p3 = (Painting) context.newObject("Painting");

        p1.setToArtist(a1);
        p2.setToArtist(a2);
View Full Code Here

        DataContext context = createDataContext();

        ReflexiveAndToOne ox = context
                .newObject(ReflexiveAndToOne.class);
        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
View Full Code Here

        ox.setName("ox");
        ReflexiveAndToOne o1 = context
                .newObject(ReflexiveAndToOne.class);
        o1.setName("o1");

        ReflexiveAndToOne o2 = context
                .newObject(ReflexiveAndToOne.class);
        o2.setName("o2");
        o2.setToParent(o1);

        context.commitChanges();
View Full Code Here

        DataContext context = createDataContext();
        Artist a1 = (Artist) context.newObject("Artist");
        Artist a2 = (Artist) context.newObject("Artist");
        Painting p1 = (Painting) context.newObject("Painting");
        Painting p2 = (Painting) context.newObject("Painting");
        Painting p3 = (Painting) context.newObject("Painting");

        p1.setToArtist(a1);
        p2.setToArtist(a2);

        Expression e = new ASTEqual(new ASTObjPath("toArtist"), a1);
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.