Package com.kanner.services

Source Code of com.kanner.services.UserClassSvc

package com.kanner.services;

import javax.jdo.PersistenceManager;
import com.kanner.domain.UserClass;
import com.kanner.factory.PMF;

public class UserClassSvc {
 
  private PersistenceManager pm = PMF.get().getPersistenceManager();
 
  public UserClass create(UserClass userClass) {
   
    UserClass createdUserClass = null;
   
    try {
     
      createdUserClass = pm.makePersistent(userClass);
     
    } finally {
     
      pm.close();
    }
   
    return createdUserClass;
  }
 
  public UserClass getUserClassByName(String name) {
   
    return pm.getObjectById(UserClass.class, name);
   
  }
}
TOP

Related Classes of com.kanner.services.UserClassSvc

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.