Package org.apache.isis.runtimes.dflt.remoting.common.data.query

Examples of org.apache.isis.runtimes.dflt.remoting.common.data.query.PersistenceQueryData


        final TestProxyAdapter dummyObjectAdapter = new TestProxyAdapter();
        // new DummyOid(12, true), ResolveState.GHOST, "test");
        dummyObjectAdapter.setupObject(new Movie());
        dummyObjectAdapter.setupSpecification(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);
View Full Code Here


    public void testFindInstancesButNoneFound() throws Exception {

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

    @Override
    public FindInstancesResponse findInstances(final FindInstancesRequest request) {

        final AuthenticationSession session = request.getSession();
        final PersistenceQueryData criteriaData = request.getCriteria();

        final PersistenceQuery criteria = encoderDecoder.decodePersistenceQuery(criteriaData);
        LOG.debug("request findInstances " + criteria + " for " + session);
        final ObjectAdapter instances = getPersistenceSession().findInstances(criteria);
        final ObjectData[] instancesData = convertToCollectionAdapter(instances);
View Full Code Here

    // ////////////////////////////////////////////////////////////////

    @Override
    public FindInstancesResponse findInstances(final FindInstancesRequest request) {

        final PersistenceQueryData criteria = request.getCriteria();

        log("find instances " + criteria);
        final FindInstancesResponse response = decorated.findInstances(request);
        final ObjectData[] instances = response.getInstances();
        log(" <-- instances: " + dump(instances));
View Full Code Here

        }
        return instances.toArray(new ObjectAdapter[instances.size()]);
    }

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

        }
        return instances.toArray(new ObjectAdapter[instances.size()]);
    }

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

    // ////////////////////////////////////////////////////////////////

    @Override
    public FindInstancesResponse findInstances(final FindInstancesRequest request) {

        final PersistenceQueryData criteria = request.getCriteria();

        log("find instances " + criteria);
        final FindInstancesResponse response = decorated.findInstances(request);
        final ObjectData[] instances = response.getInstances();
        log(" <-- instances: " + dump(instances));
View Full Code Here

    @Override
    public FindInstancesResponse findInstances(final FindInstancesRequest request) {

        final AuthenticationSession session = request.getSession();
        final PersistenceQueryData criteriaData = request.getCriteria();

        final PersistenceQuery criteria = encoderDecoder.decodePersistenceQuery(criteriaData);
        LOG.debug("request findInstances " + criteria + " for " + session);
        final ObjectAdapter instances = getPersistenceSession().findInstances(criteria);
        final ObjectData[] instancesData = convertToCollectionAdapter(instances);
View Full Code Here

        final TestProxyAdapter dummyObjectAdapter = new TestProxyAdapter();
        // new DummyOid(12, true), ResolveState.GHOST, "test");
        dummyObjectAdapter.setupObject(new Movie());
        dummyObjectAdapter.setupSpecification(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);
View Full Code Here

    public void testFindInstancesButNoneFound() throws Exception {

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

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.data.query.PersistenceQueryData

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.