* @param groupBean {@link UnitGroupBean}
* @throws EnMeExpcetion exception
*/
public UnitGroupBean updateGroup(UnitGroupBean groupBean) throws EnMeExpcetion {
log.info("group to search "+groupBean.getId());
final Group group = getGroupDao().find(Long.valueOf(groupBean.getId()));
log.info("group found "+group);
if (group != null) {
log.info("group updated name "+groupBean.getGroupName());
group.setGroupName(groupBean.getGroupName());
log.info("group updated description "+groupBean.getGroupDescription());
group.setGroupDescriptionInfo(groupBean.getGroupDescription());
log.info("group updated state id "+groupBean.getStateId());
// group.setIdState(Long.valueOf((groupBean.getStateId())));
getGroupDao().saveOrUpdate(group);
log.info("group new name "+group.getGroupName());
log.info("group new description "+group.getGroupDescriptionInfo());
groupBean = ConvertDomainBean.convertGroupDomainToBean(group);
} else {
throw new EnMeExpcetion("group not found");
}
return groupBean;