Package org.apache.cayenne.lifecycle.ref

Examples of org.apache.cayenne.lifecycle.ref.ReferenceableHandler


        ObjectContext context = runtime.getContext();
        E1 e1 = (E1) Cayenne.objectForQuery(context, new SelectQuery(E1.class));

        UuidRoot1 r1 = context.newObject(UuidRoot1.class);

        ReferenceableHandler refHandler = new ReferenceableHandler(context
                .getEntityResolver());
        UuidRelationshipHandler handler = new UuidRelationshipHandler(refHandler);
        handler.relate(r1, e1);

        assertEquals("E1:1", r1.getUuid());
View Full Code Here


        ObjectContext context = runtime.getContext();
        E1 e1 = context.newObject(E1.class);

        UuidRoot1 r1 = context.newObject(UuidRoot1.class);

        ReferenceableHandler refHandler = new ReferenceableHandler(context
                .getEntityResolver());
        UuidRelationshipHandler handler = new UuidRelationshipHandler(refHandler);
        handler.relate(r1, e1);

        assertSame(e1, r1.readPropertyDirectly("cay:related:uuid"));
View Full Code Here

        UuidRoot1 r1 = Cayenne.objectForPK(context, UuidRoot1.class, 1);
        assertEquals("E1:1", r1.getUuid());

        E1 e1 = context.newObject(E1.class);

        ReferenceableHandler refHandler = new ReferenceableHandler(context
                .getEntityResolver());
        UuidRelationshipHandler handler = new UuidRelationshipHandler(refHandler);
        handler.relate(r1, e1);

        assertSame(e1, r1.readPropertyDirectly("cay:related:uuid"));
View Full Code Here

TOP

Related Classes of org.apache.cayenne.lifecycle.ref.ReferenceableHandler

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.