Package org.apache.cayenne.remote

Examples of org.apache.cayenne.remote.ClientChannel


        DataContext context = createDataContext();
        ClientServerChannel clientServerChannel = new ClientServerChannel(context);
        UnitLocalConnection connection = new UnitLocalConnection(
                clientServerChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext clientContext = new CayenneContext(channel);

        SelectQuery query = new SelectQuery(ClientMtTableBool.class);
        query.addOrdering("db:" + MtTableBool.ID_PK_COLUMN, true);
View Full Code Here


        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);

        obj.setBlablacheck(true);
        obj.setNumber(3);
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

                    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);
            o1.setName("parent");
View Full Code Here

    }

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

        CayenneContext context = new CayenneContext(channel);

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

        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(
                1));
View Full Code Here

        // this clears domain cache
        createDataContext();

        UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
                getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext context = new CayenneContext(channel);

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

        SelectQuery query = new SelectQuery(ClientMtMeaningfulPk.class);
        query.addOrdering(ClientMtMeaningfulPk.PK_PROPERTY, Ordering.DESC);

        UnitLocalConnection connection = new UnitLocalConnection(new ClientServerChannel(
                getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext context = new CayenneContext(channel);

        List results = context.performQuery(query);
        assertEquals(2, results.size());
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.remote.ClientChannel

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.