Package org.apache.isis.runtimes.dflt.remoting.common.exchange

Examples of org.apache.isis.runtimes.dflt.remoting.common.exchange.FindInstancesRequest


        final PersistenceQueryData c = new TestCriteria();
        final ObjectSpecification noSpec = getSpecificationLoader().loadSpecification(Movie.class);
        final PersistenceQueryFindAllInstances criteria = new PersistenceQueryFindAllInstances(noSpec);

        final FindInstancesRequest request = new FindInstancesRequest(session, c);

        mockery.checking(new Expectations() {
            {
                one(mockEncoder).decode(instanceData);
                will(returnValue(dummyObjectAdapter));
View Full Code Here


        // system.addSpecificationToLoader(new MovieSpecification());

        final PersistenceQueryData c = new TestCriteria();
        final ObjectSpecification noSpec = getSpecificationLoader().loadSpecification(Movie.class);
        final PersistenceQueryFindAllInstances criteria = new PersistenceQueryFindAllInstances(noSpec);
        final FindInstancesRequest request = new FindInstancesRequest(session, c);

        mockery.checking(new Expectations() {
            {
                one(mockDistribution).findInstances(request);
                will(returnValue(new ObjectData[0]));
View Full Code Here

    private ObjectAdapter[] findInstancesFromPersistenceLayer(final PersistenceQuery persistenceQuery) {
        final PersistenceQueryData criteriaData = encoderDecoder.encodePersistenceQuery(persistenceQuery);
        return getTransactionManager().executeWithinTransaction(new TransactionalClosureWithReturnAbstract<ObjectAdapter[]>() {
            @Override
            public ObjectAdapter[] execute() {
                final FindInstancesRequest request = new FindInstancesRequest(getAuthenticationSession(), criteriaData);
                final FindInstancesResponse response = serverFacade.findInstances(request);
                final ObjectData[] instancesAsObjectData = response.getInstances();
                final ObjectAdapter[] instances = new ObjectAdapter[instancesAsObjectData.length];
                for (int i = 0; i < instancesAsObjectData.length; i++) {
                    instances[i] = encoderDecoder.decode(instancesAsObjectData[i]);
View Full Code Here

        final PersistenceQueryData criteriaData = encoderDecoder.encodePersistenceQuery(persistenceQuery);
        return getTransactionManager().executeWithinTransaction(
            new TransactionalClosureWithReturnAbstract<ObjectAdapter[]>() {
                @Override
                public ObjectAdapter[] execute() {
                    final FindInstancesRequest request =
                        new FindInstancesRequest(getAuthenticationSession(), criteriaData);
                    final FindInstancesResponse response = serverFacade.findInstances(request);
                    final ObjectData[] instancesAsObjectData = response.getInstances();
                    final ObjectAdapter[] instances = new ObjectAdapter[instancesAsObjectData.length];
                    for (int i = 0; i < instancesAsObjectData.length; i++) {
                        instances[i] = encoderDecoder.decode(instancesAsObjectData[i]);
View Full Code Here

        final PersistenceQueryData c = new TestCriteria();
        final ObjectSpecification noSpec = getSpecificationLoader().loadSpecification(Movie.class);
        final PersistenceQueryFindAllInstances criteria = new PersistenceQueryFindAllInstances(noSpec);

        final FindInstancesRequest request = new FindInstancesRequest(session, c);

        mockery.checking(new Expectations() {
            {
                one(mockEncoder).decode(instanceData);
                will(returnValue(dummyObjectAdapter));
View Full Code Here

        // system.addSpecificationToLoader(new MovieSpecification());

        final PersistenceQueryData c = new TestCriteria();
        final ObjectSpecification noSpec = getSpecificationLoader().loadSpecification(Movie.class);
        final PersistenceQueryFindAllInstances criteria = new PersistenceQueryFindAllInstances(noSpec);
        final FindInstancesRequest request = new FindInstancesRequest(session, c);

        mockery.checking(new Expectations() {
            {
                one(mockDistribution).findInstances(request);
                will(returnValue(new ObjectData[0]));
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.exchange.FindInstancesRequest

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.