Package de.forsthaus.backend.model

Examples of de.forsthaus.backend.model.SecRolegroup


@Repository
public class SecRolegroupDAOImpl extends BasisDAO<SecRolegroup> implements SecRolegroupDAO {

  @Override
  public SecRolegroup getNewSecRolegroup() {
    return new SecRolegroup();
  }
View Full Code Here


          // get the role
          SecRole aRole = getSelectedRole();

          // check if the item is newly checked. If so we cannot found
          // it in the SecGroupRight-table
          SecRolegroup aRoleGroup = getSecurityService().getRolegroupByRoleAndGroup(aRole, aGroup);

          // if new, we make a newly Object
          if (aRoleGroup == null) {
            aRoleGroup = getSecurityService().getNewSecRolegroup();
            aRoleGroup.setSecGroup(aGroup);
            aRoleGroup.setSecRole(aRole);
          }

          try {
            // save to DB
            getSecurityService().saveOrUpdate(aRoleGroup);
          } catch (DataAccessException e) {
            ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());
          }

        } else if (cb.isChecked() == false) {

          // Get the group object by casting
          SecGroup aGroup = (SecGroup) listitem.getAttribute("data");
          // get the role
          SecRole aRole = getSelectedRole();

          // check if the item is newly unChecked. If so we must
          // found it in the SecRolegroup-table
          SecRolegroup aRoleGroup = getSecurityService().getRolegroupByRoleAndGroup(aRole, aGroup);

          if (aRoleGroup != null) {
            // delete from DB
            getSecurityService().delete(aRoleGroup);
          }
View Full Code Here

TOP

Related Classes of de.forsthaus.backend.model.SecRolegroup

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.