示例#1
0
文件: UserDAOImpl.java 项目: kvdy/lib
 public void updateUser(UserVO user) throws InvalidInputDataException, Exception {
   logger.debug("inside updateUser: in UserDAOImpl");
   logger.debug("Updating user with id = " + user.getId() + " userName=" + user.getUserName());
   user.setLastUpdatedDate(new Date());
   super.update(user);
   logger.debug("Updated user user = " + user.getAttributesAsString());
 }
示例#2
0
文件: UserDAOImpl.java 项目: kvdy/lib
 public void deleteUser(String id) throws Exception {
   logger.debug("inside deleteUser: in UserDAOImpl");
   Session s = getSessionFactory().openSession();
   UserVO userLoaded = (UserVO) s.load(UserVO.class, id);
   logger.debug("userLoaded=" + userLoaded);
   /*
   try{
   	Transaction t = s.beginTransaction();
   	s.delete(userLoaded);
   	t.commit();
   }catch(Exception e){
   	logger.error(e.getMessage());
   }
   */
   super.delete(userLoaded);
 }
 @Override
 public void delete(RelationshipAttributeDO entity) {
   entity.getRelationship().getAttributes().remove(entity);
   super.delete(entity);
 }