public Profile findByProfileName(String profileName)
throws InstanceNotFoundException{
Criteria c = getSession().createCriteria(Profile.class);
c.add(Restrictions.eq("profileName", profileName).ignoreCase());
Profile profile = (Profile) c.uniqueResult();
if (profile == null) {
throw new InstanceNotFoundException(profileName,
Profile.class.getName());
} else {