@Test void hydrateTest() { Entity actualHydratedEntity = entityHydration.hydrate(dehydratedEntity, entityType); assertTrue(EntityUtils.equals(actualHydratedEntity, hydratedEntity)); assertTrue( entityTypeArgumentCaptor.getAllValues().stream() .allMatch(emd -> emd.getId().equals("TypeTestRefDynamic"))); }
public Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType) { if (LOG.isTraceEnabled()) { LOG.trace("Hydrating entity: {} for entity {}", dehydratedEntity, entityType.getId()); } Entity hydratedEntity = entityManager.create(entityType, NO_POPULATE); for (Attribute attribute : entityType.getAtomicAttributes()) { hydrateValue(dehydratedEntity, attribute, hydratedEntity); } return hydratedEntity; }
EntityHydration { public Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType) { if (LOG.isTraceEnabled()) { LOG.trace("Hydrating entity: {} for entity {}", dehydratedEntity, entityType.getId()); } Entity hydratedEntity = entityManager.create(entityType, NO_POPULATE); for (Attribute attribute : entityType.getAtomicAttributes()) { hydrateValue(dehydratedEntity, attribute, hydratedEntity); } return hydratedEntity; } }
EntityHydration { public Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType) { if (LOG.isTraceEnabled()) { LOG.trace("Hydrating entity: {} for entity {}", dehydratedEntity, entityType.getId()); } Entity hydratedEntity = entityManager.create(entityType, NO_POPULATE); for (Attribute attribute : entityType.getAtomicAttributes()) { hydrateValue(dehydratedEntity, attribute, hydratedEntity); } return hydratedEntity; } EntityHydration(EntityManager entityManager); }
EntityHydration { public Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType) { if (LOG.isTraceEnabled()) { LOG.trace("Hydrating entity: {} for entity {}", dehydratedEntity, entityType.getId()); } Entity hydratedEntity = entityManager.create(entityType, NO_POPULATE); for (Attribute attribute : entityType.getAtomicAttributes()) { hydrateValue(dehydratedEntity, attribute, hydratedEntity); } return hydratedEntity; } EntityHydration(EntityManager entityManager); Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType); Entity hydrate(
      Map<String, Object> dehydratedEntity,
      EntityType entityType,
      @Nullable @CheckForNull Fetch fetch); Map<String, Object> dehydrate(Entity entity); }
EntityHydration { public Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType) { if (LOG.isTraceEnabled()) { LOG.trace("Hydrating entity: {} for entity {}", dehydratedEntity, entityType.getId()); } Entity hydratedEntity = entityManager.create(entityType, NO_POPULATE); for (Attribute attribute : entityType.getAtomicAttributes()) { hydrateValue(dehydratedEntity, attribute, hydratedEntity); } return hydratedEntity; } EntityHydration(EntityManager entityManager); Entity hydrate(Map<String, Object> dehydratedEntity, EntityType entityType); Entity hydrate(
      Map<String, Object> dehydratedEntity,
      EntityType entityType,
      @Nullable @CheckForNull Fetch fetch); Map<String, Object> dehydrate(Entity entity);  }