Examples of JizzDjRole


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

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

            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

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

            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
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.