/** * Unmarshals the given map source into a bean. * @param source the source * @return the organization */ public static OrganizationBean unmarshallOrganization(Map<String, Object> source) { if (source == null) { return null; } OrganizationBean bean = new OrganizationBean(); bean.setId(asString(source.get("id"))); bean.setName(asString(source.get("name"))); bean.setDescription(asString(source.get("description"))); bean.setCreatedOn(asDate(source.get("createdOn"))); bean.setCreatedBy(asString(source.get("createdBy"))); bean.setModifiedOn(asDate(source.get("modifiedOn"))); bean.setModifiedBy(asString(source.get("modifiedBy"))); postMarshall(bean); return bean; }
/** * Unmarshals the given map source into a bean. * @param source the source * @return the organization */ public static OrganizationBean unmarshallOrganization(Map<String, Object> source) { if (source == null) { return null; } OrganizationBean bean = new OrganizationBean(); bean.setId(asString(source.get("id"))); bean.setName(asString(source.get("name"))); bean.setDescription(asString(source.get("description"))); bean.setCreatedOn(asDate(source.get("createdOn"))); bean.setCreatedBy(asString(source.get("createdBy"))); bean.setModifiedOn(asDate(source.get("modifiedOn"))); bean.setModifiedBy(asString(source.get("modifiedBy"))); postMarshall(bean); return bean; }
orgBean.setDescription(bean.getDescription()); orgBean.setId(BeanUtils.idFromName(bean.getName())); orgBean.setCreatedOn(new Date());
orgBean.setDescription(bean.getDescription()); orgBean.setId(BeanUtils.idFromName(bean.getName())); orgBean.setCreatedOn(new Date());
if (AuditUtils.valueChanged(orgForUpdate.getDescription(), bean.getDescription())) { auditData.addChange("description", orgForUpdate.getDescription(), bean.getDescription()); //$NON-NLS-1$ orgForUpdate.setDescription(bean.getDescription());
if (AuditUtils.valueChanged(orgForUpdate.getDescription(), bean.getDescription())) { auditData.addChange("description", orgForUpdate.getDescription(), bean.getDescription()); //$NON-NLS-1$ orgForUpdate.setDescription(bean.getDescription());