code: public Map<String, Object> dehydrate(Entity entity) {
      LOG.trace("Dehydrating entity {}", entity);
      Map<String, Object> dehydratedEntity = newHashMap();
      EntityType entityType = entity.getEntityType();
  
      entityType
          .getAtomicAttributes()
          .forEach(
              attribute -> {
                // Only dehydrate if the attribute is NOT computed
                if (!attribute.hasExpression()) {
                  String name = attribute.getName();
                  AttributeType type = attribute.getDataType();
  
                  dehydratedEntity.put(name, getValueBasedOnType(entity, name, type));
                }
              });
  
      return dehydratedEntity;
    }
docs: Creates a Map containing the values required to rebuild this entity. For references to other
  entities only stores the ids.
  
  @param entity the {@link Entity} to dehydrate
  @return Map representation of the entity