Examples of FindByIdRequest


Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

                allowing(activityDTOMock).getId();
                will(returnValue(3L));

                oneOf(findByIdMapper).execute(
                        with(IsEqualInternally.equalInternally(new FindByIdRequest("Activity", 3L))));
                will(returnValue(null));
            }
        });

        sut.execute(asyncActionContextMock);
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

                allowing(activityDTOMock).getId();
                will(returnValue(3L));

                oneOf(findByIdMapper).execute(
                        with(IsEqualInternally.equalInternally(new FindByIdRequest("Activity", 3L))));
                will(returnValue(activityMock));

                allowing(activityMock).getId();
                will(returnValue(3L));
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        final DomainMapper<Serializable, List<Long>> systemAdminIdsMapper = context.mock(DomainMapper.class,
                "SystemAdminIdsMapper");

        // expectations
        final FindByIdMapper<DomainGroup> groupMapper = context.mock(FindByIdMapper.class);
        final FindByIdRequest mapperRequest = new FindByIdRequest("DomainGroup", groupId);
        context.checking(new Expectations()
        {
            {
                allowing(groupMapper).execute(with(equalInternally(mapperRequest)));
                will(returnValue(group));
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        final Person personMock = context.mock(Person.class);

        context.checking(new Expectations()
        {
            {
                oneOf(pMapper).execute(with(equalInternally(new FindByIdRequest("Person", 1L))));
                will(returnValue(personMock));
            }
        });

        final ServiceActionContext currentContext = new ServiceActionContext(id, principalMock);
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        Long id = 1L;

        context.checking(new Expectations()
        {
            {
                oneOf(pMapper).execute(with(equalInternally(new FindByIdRequest("Person", 1L))));
                will(returnValue(null));
            }
        });

        final ServiceActionContext currentContext = new ServiceActionContext(id, principalMock);
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

                oneOf(actionContext).getParams();
                will(returnValue(streamId));
            }
        });

        Person p = findByIdMapper.execute(new FindByIdRequest("Person", personId));
        Assert.assertEquals(2, p.getBookmarks().size());

        sut.execute(actionContext);

        getEntityManager().clear();

        p = findByIdMapper.execute(new FindByIdRequest("Person", personId));
        Assert.assertEquals(1, p.getBookmarks().size());
        Assert.assertEquals(2L, p.getBookmarks().get(0).getId());

        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        final ServiceActionContext currentContext = new ServiceActionContext(1L, principalMock);

        context.checking(new Expectations()
        {
            {
                oneOf(tutorialVideoMapperMock).execute(with(equalInternally(new FindByIdRequest("TutorialVideo", 1L))));
                will(returnValue(tutorialVideoMock));
            }
        });
        sut.validate(currentContext);
        context.assertIsSatisfied();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        final ServiceActionContext currentContext = new ServiceActionContext(1L, principalMock);

        context.checking(new Expectations()
        {
            {
                oneOf(tutorialVideoMapperMock).execute(with(equalInternally(new FindByIdRequest("TutorialVideo", 1L))));
                will(returnValue(null));
            }
        });
        sut.validate(currentContext);
        context.assertIsSatisfied();
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

        else
        {
            deleteLikedActivity.execute(likeActivityData);
        }

        indexEntity.execute(activityEntityMapper.execute(new FindByIdRequest("Activity", request.getActivityId())));

        return Boolean.TRUE;
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

     * @return null.
     */
    @Override
    public Serializable execute(final ActionContext inActionContext)
    {
        DomainEntity entity = objectMapper.execute(new FindByIdRequest(domainEntityName, (Long) inActionContext
                .getParams()));
        if (entity != null)
        {
            objectIndexer.execute(entity);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.