@Override public void saveDetails(UserVmVO vm) { Map<String, String> detailsStr = vm.getDetails(); if (detailsStr == null) { return; } List<UserVmDetailVO> details = new ArrayList<UserVmDetailVO>(); for (String key : detailsStr.keySet()) { details.add(new UserVmDetailVO(vm.getId(), key, detailsStr.get(key))); } _detailsDao.saveDetails(details); }
@Override public void loadDetails(UserVmVO vm) { Map<String, String> details = _detailsDao.listDetailsKeyPairs(vm.getId()); vm.setDetails(details); }