Package org.pathways.openciss.model

Examples of org.pathways.openciss.model.Permission


public class PermissionService {
  public static EntityManager em;
 
  public Permission getPermission(int permission_key) {
    Permission result = null;
    em =EMF.get().createEntityManager();
    try {
      result = em.find(Permission.class, permission_key);
    }
    finally {em.close();}
View Full Code Here


  public boolean updatePermission(Permission p, String permissionID) {
    boolean result = false;
    em =EMF.get().createEntityManager();
    try{
       em.getTransaction().begin();
       Permission px = em.find(Permission.class, Integer.valueOf(permissionID));
       px.setPermissionName(p.getPermissionName());
       px.setInactive(p.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.Permission

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.