Persistence exception can be thrown when errors occur persisting information to peristence stores.
Copyright © BuildOnline 2003. All rights reserved.
3738394041424344
Criterion criterion = Restrictions.eq("userName", userName); criteria.add(criterion); List <UserDetail> resultSet = criteria.list(); return resultSet.get(0); }catch(Exception ex){ throw new DaoException(ex); } }
4849505152535455
Session session = this.getSession(); Criteria criteria = session.createCriteria(UserDetail.class); List <UserDetail> resultSet = criteria.list(); return resultSet; }catch(Exception ex){ throw new DaoException(ex); } }
78798081828384858687
} else { valid = false; } }catch(Exception ex){ throw new DaoException(ex); } finally{ return valid; } }