/** * 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.setId(BeanUtils.idFromName(bean.getName())); orgBean.setCreatedOn(new Date()); orgBean.setCreatedBy(securityContext.getCurrentUser()); orgBean.setModifiedOn(new Date()); orgBean.setModifiedBy(securityContext.getCurrentUser());
orgBean.setId(BeanUtils.idFromName(bean.getName())); orgBean.setCreatedOn(new Date()); orgBean.setCreatedBy(securityContext.getCurrentUser()); orgBean.setModifiedOn(new Date()); orgBean.setModifiedBy(securityContext.getCurrentUser());