Package org.apache.cayenne.remote.service

Examples of org.apache.cayenne.remote.service.LocalConnection


    public void testReturnDiffClientArcChanges() {

        final NoopGraphChangeHandler diffReader = new NoopGraphChangeHandler();

        ClientServerChannel csChannel = new ClientServerChannel(getDomain());
        ClientChannel channel = new ClientChannel(new LocalConnection(csChannel)) {

            @Override
            public GraphDiff onSync(
                    ObjectContext originatingContext,
                    GraphDiff changes,
View Full Code Here


        // by the page size, to test the last smaller page
        query.setPageSize(pageSize);
        query.addOrdering("db:" + MtTable1.TABLE1_ID_PK_COLUMN, Ordering.ASC);

        ClientServerChannel serverChannel = new ClientServerChannel(getDomain());
        LocalConnection connection = new LocalConnection(
                serverChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel clientChannel = new ClientChannel(connection);

        this.list = new RemoteIncrementalFaultList(
View Full Code Here

    public void testCommitChangesPrimitives() {

        DataContext dataContext = createDataContext();

        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext context = new CayenneContext(channel);
        ClientMtTableBool obj = context.newObject(ClientMtTableBool.class);
View Full Code Here

        public void prePersist(Object entity) {
        }
            });

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            context.newObject(ClientMtTable1.class);
View Full Code Here

            callbackRegistry.addListener(
                    LifecycleEvent.POST_ADD,
                    MtTable1.class,
                    "prePersistMethod");

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            Persistent clientObject = context.newObject(ClientMtTable1.class);
View Full Code Here

        public void prePersist(Object entity) {
        }
            });

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            ClientMtTable1 object = context.newObject(ClientMtTable1.class);
View Full Code Here

        public void prePersist(Object entity) {
        }
            });

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            ClientMtReflexive o1 = context.newObject(ClientMtReflexive.class);
View Full Code Here

            callbackRegistry.clear();
        }
    }

    public void testRollbackChanges() throws Exception {
        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);

        CayenneContext context = new CayenneContext(channel);
View Full Code Here

    public void testCreateFault() throws Exception {
        createTestData("prepare");

        // must attach to the real channel...
        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);

        CayenneContext context = new CayenneContext(channel);
        ObjectId id = new ObjectId("MtTable1", MtTable1.TABLE1_ID_PK_COLUMN, new Integer(
View Full Code Here

        return CayenneResources.getResources().getAccessStack(MULTI_TIER_ACCESS_STACK);
    }

    private CayenneContext createClientContext() {
        ClientServerChannel serverChannel = new ClientServerChannel(getDomain());
        LocalConnection connection = new LocalConnection(
                serverChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel clientChannel = new ClientChannel(connection);
        return new CayenneContext(clientChannel);
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.remote.service.LocalConnection

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.