Package org.eurekastreams.server.persistence.mappers.requests

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


                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

        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

        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

        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

                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

        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

        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

        else
        {
            deleteLikedActivity.execute(likeActivityData);
        }

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

        return Boolean.TRUE;
    }
View Full Code Here

     * @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

Related Classes of org.eurekastreams.server.persistence.mappers.requests.FindByIdRequest

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.