Package com.totalchange.jizz.data.entity

Examples of com.totalchange.jizz.data.entity.JizzDjRole


        verifyAll();
    }

    @Test
    public void testIsInRole() {
        JizzDjRole mockRole = new JizzDjRole();
        mockRole.setRoleName(JizzDjRole.Roles.Administrator.name());

        JizzDj mockDj = new JizzDj();

        // Should handle null roles
        assertFalse(jizzDjServices.isInRole(mockDj,
View Full Code Here


            return false;
        }

        Iterator<JizzDjRole> it = jizzDj.getRoles().iterator();
        while (it.hasNext()) {
            JizzDjRole djRole = it.next();
            if (djRole.getRoleName().equals(role.name())) {
                logger.trace("Yep - DJ {} is in role {}", jizzDj, role);
                return true;
            }
        }
View Full Code Here

            logger.trace("No roles yet so creating new set of roles");
            roles = new HashSet<JizzDjRole>();
            jizzDj.setRoles(roles);
        }

        JizzDjRole djRole = new JizzDjRole();
        djRole.setDj(jizzDj);
        djRole.setRoleName(role.name());
        roles.add(djRole);

        jizzDjDao.createOrUpdateDj(jizzDj);
        logger.trace("Successfully added DJ {} to role {}", jizzDj, role);
    }
View Full Code Here

TOP

Related Classes of com.totalchange.jizz.data.entity.JizzDjRole

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.