@Override
 public String updateUser(User user) {
   LOGGER.debug("Update user {}", user.getUserName());
   this.sessionFactory.getCurrentSession().saveOrUpdate(user);
   LOGGER.debug("user {} is updated successfully", user.getUserName());
   return user.getUserName();
 }
 @Override
 public String deleteUser(Integer userId) {
   String userName = "";
   LOGGER.debug("Deleting user with user id {}", userId);
   User user = (User) this.sessionFactory.getCurrentSession().load(User.class, userId);
   if (null != user) {
     this.sessionFactory.getCurrentSession().delete(user);
     LOGGER.debug("user {} is updated successfully", user.getUserName());
     userName = user.getUserName();
   }
   return userName;
 }