Package org.pathways.openciss.model

Examples of org.pathways.openciss.model.Role


public class RoleService {
  public static EntityManager em;
 
  public Role getRole(int role_key) {
    Role result = null;
    em =EMF.get().createEntityManager();
    try {
      result = em.find(Role.class, role_key);
    }
    finally {em.close();}
View Full Code Here


  public boolean updateRole(Role r, String roleID) {
    boolean result = false;
    em =EMF.get().createEntityManager();
    try{
       em.getTransaction().begin();
       Role rx = em.find(Role.class, Integer.valueOf(roleID));
       rx.setRoleName(r.getRoleName());
       rx.setInactive(r.getInactive());

       em.getTransaction().commit();
       result = true;
     }
    catch (Exception e){System.out.println("couldn't persist: " + e);
View Full Code Here

TOP

Related Classes of org.pathways.openciss.model.Role

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.