Package monashbook.models

Examples of monashbook.models.Groups


        // Create dummy AdminUser
        Users adminUser = new Users();
        adminUser.setUsername("admin");
        adminUser.setPassword("8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918");
        // Create dummy group
        Groups adminGroup = new Groups();
        adminGroup.setGroupname("Admin Group");
        // Create dummy UserGroup
        UserGroup userGroup = new UserGroup();
        userGroup.setUsername(adminUser.getUsername());
        userGroup.setGroupname(adminGroup.getGroupname());
        userGroup.setGroups(adminGroup);
        userGroup.setUsers(adminUser);
        // Ensure entities are stored in each side of the relationship
        adminUser.getUserGroups().add(userGroup);
        adminGroup.getUserGroups().add(userGroup);
        // Add the user and the group to database
        bookService.addAdminUser(adminUser);
       
        // Create dummy books
        // First Book
View Full Code Here

TOP

Related Classes of monashbook.models.Groups

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.