Examples of SecUserrole


Examples of de.forsthaus.backend.model.SecUserrole

          // get the user
          SecUser anUser = getSelectedUser();

          // check if the item is newly checked. If so we cannot
          // found it in the SecUserrole-table
          SecUserrole anUserRole = getSecurityService().getUserroleByUserAndRole(anUser, aRole);

          // if new, we make a newly Object
          if (anUserRole == null) {
            anUserRole = getSecurityService().getNewSecUserrole();
            anUserRole.setSecUser(anUser);
            anUserRole.setSecRole(aRole);
          }

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

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

          // Get the role object by casting
          SecRole aRole = (SecRole) listitem.getAttribute("data");
          // get the user
          SecUser anUser = getSelectedUser();

          // check if the item is newly checked. If so we cannot
          // found it in the SecUserrole-table
          SecUserrole anUserRole = getSecurityService().getUserroleByUserAndRole(anUser, aRole);

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

Examples of de.forsthaus.backend.model.SecUserrole

@Repository
public class SecUserroleDAOImpl extends BasisDAO<SecUserrole> implements SecUserroleDAO {

  @Override
  public SecUserrole getNewSecUserrole() {
    return new SecUserrole();
  }
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.