Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.ClientServerChannel


    public void testCAY830() throws Exception {

        deleteTestData();

        ClientServerChannel csChannel = new ClientServerChannel(getDomain());

        // an exception was triggered within POST_LOAD callback
        LifecycleCallbackRegistry callbackRegistry = csChannel
                .getEntityResolver()
                .getCallbackRegistry();

        try {
            callbackRegistry.addListener(MtReflexive.class, new LifecycleListener() {
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

        createTestData("prepare");

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

        createTestData("testMeaningfulPK");

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

    }

    public void testPrefetchingToOne() throws Exception {
        createTestData("testPrefetching");

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

        ObjectId prefetchedId = new ObjectId(
View Full Code Here

    }

    public void testPrefetchingToOneNull() throws Exception {
        createTestData("testPrefetchingToOneNull");

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

        SelectQuery q = new SelectQuery(ClientMtTable2.class);
View Full Code Here

    }

    public void testPrefetchingToMany() throws Exception {
        createTestData("testPrefetching");

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

        SelectQuery q = new SelectQuery(ClientMtTable1.class);
View Full Code Here

    public void testPerformPaginatedQuery() throws Exception {
        deleteTestData();
        createTestData("testPerformPaginatedQuery");

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

        SelectQuery query = new SelectQuery(ClientMtTable1.class);
View Full Code Here

    }

    public void testPrefetchingToManyEmpty() throws Exception {
        createTestData("testPrefetching");

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

        SelectQuery q = new SelectQuery(ClientMtTable1.class);
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.