code: public static XContentBuilder marshall(PlanVersionBean bean) throws StorageException {
          try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
              PlanBean plan = bean.getPlan();
              OrganizationBean org = plan.getOrganization();
              preMarshall(bean);
              builder
                  .startObject()
                      .field("organizationId", org.getId())
                      .field("organizationName", org.getName())
                      .field("planId", plan.getId())
                      .field("planName", plan.getName())
                      .field("planDescription", plan.getDescription())
                      .field("version", bean.getVersion())
                      .field("status", bean.getStatus())
                      .field("createdBy", bean.getCreatedBy())
                      .field("createdOn", bean.getCreatedOn().getTime())
                      .field("modifiedBy", bean.getModifiedBy())
                      .field("modifiedOn", bean.getModifiedOn().getTime())
                      .field("lockedOn", bean.getLockedOn() != null ? bean.getLockedOn().getTime() : null)
                  .endObject();
              postMarshall(bean);
              return builder;
          } catch (IOException e) {
              throw new StorageException(e);
          }
      }
docs: Marshals the given bean into the given map.
  @param bean the bean
  @return the content builder
  @throws StorageException when a storage problem occurs while storing a bean