code: public Map<String, Object> toMap() {
          Lock lock = lockForWrite();
          try {
              Map<String, Object> data = new HashMap<>();
              data.put(SER_FIELD_DIRTY, dirty);
              data.put(SER_FIELD_ATTRS, attributes != null ? cloneData(attributes) : new HashMap<>());
              return data;
          } finally {
              lock.unlock();
          }
      }
docs: Serialize the BO to a Java map.
  
  @return BO's data as a Java map, can be used to de-serialize the BO via {@link #fromMap(Map)}