Examples of Bannerable


Examples of org.eurekastreams.server.domain.Bannerable

     * Group Test.
     */
    @Test
    public void updateGroupBannerableTest()
    {
        Bannerable bannerDTO;
        boolean success;

        // check to make sure it isn't set
        bannerDTO = domainGroupBannerMapper.getBannerableDTO(1L);
        assertEquals(bannerDTO.getBannerId(), null);
        assertEquals((long) bannerDTO.getBannerEntityId(), 1L);

        // set it to John
        success = domainGroupBannerMapper.updateBannerId(1L, "John");
        assertTrue(success);

        // Check again
        bannerDTO = domainGroupBannerMapper.getBannerableDTO(1L);
        assertEquals(bannerDTO.getBannerId(), "John");

        // update using id
        success = domainGroupBannerMapper.updateBannerId(1L, "JohnsDad");
        assertTrue(success);

        // Check again
        bannerDTO = domainGroupBannerMapper.getBannerableDTO(1L);
        assertEquals(bannerDTO.getBannerId(), "JohnsDad");

        // fail at updating
        success = domainGroupBannerMapper.updateBannerId(9L, "fail");
        assertFalse(success);
    }
View Full Code Here

Examples of org.eurekastreams.server.domain.Bannerable

    {
        try
        {
            Long entityId = (Long) inActionContext.getParams();

            Bannerable bannerObject = mapper.getBannerableDTO(entityId);

            // If bannerId wasn't already Null then you need to delete the avatar from the server.
            if (bannerObject.getBannerId() != null)
            {
                imageWriter.delete("n" + bannerObject.getBannerId());
            }
            // Update the db.
            boolean result = mapper.updateBannerId(entityId, null);
            // Update the cache.
            updateCachedBannerMapper.execute(new UpdateCachedBannerMapperRequest(null, entityId));
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.