Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.ClientServerChannel


    public void testOIDQueryInterception() throws Exception {

        deleteTestData();

        UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext context = new CayenneContext(channel);

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


    protected AccessStack buildAccessStack() {
        return CayenneResources.getResources().getAccessStack(MULTI_TIER_ACCESS_STACK);
    }

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

    @Override
    protected void setUp() throws Exception {
        super.setUp();

        ClientServerChannel serverChannel = new ClientServerChannel(getDomain());
        connection = new UnitLocalConnection(
                serverChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel clientChannel = new ClientChannel(connection);
        context = new CayenneContext(clientChannel);
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

                ids[0] = oldId;
                ids[1] = newId;
            }
        };

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

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

    }

    public void testValidate() throws Exception {

        deleteTestData();
        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c = new CayenneContext(clientChannel);
View Full Code Here

                    LifecycleEvent.POST_ADD,
                    MtTable1.class,
                    new ClientChannelServerDiffsListener1(),
                    "prePersist");

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

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

    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,
View Full Code Here

        parentDataContext = createDataContext();
        context = createROPContext();
    }
   
    protected CayenneContext createROPContext() {
        ClientServerChannel clientServerChannel = new ClientServerChannel(parentDataContext);
        UnitLocalConnection connection = new UnitLocalConnection(
                clientServerChannel,
                serializationPolicy);
        ClientChannel channel = new ClientChannel(connection);
        return new CayenneContext(channel, true, true);
View Full Code Here

        // make sure total number of objects is not divisable
        // 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);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.access.ClientServerChannel

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.