Package org.molgenis.data.cache.utils
Class EntityHydration
- java.lang.Object
-
- org.molgenis.data.cache.utils.EntityHydration
-
@Component public class EntityHydration extends Object
Hydrates and dehydrates entities.
-
-
Constructor Summary
Constructors Constructor Description EntityHydration(EntityManager entityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>dehydrate(Entity entity)Creates a Map containing the values required to rebuild this entity.Entityhydrate(Map<String,Object> dehydratedEntity, EntityType entityType)Rehydrate an entity.Entityhydrate(Map<String,Object> dehydratedEntity, EntityType entityType, Fetch fetch)Rehydrate a partial entity.
-
-
-
Constructor Detail
-
EntityHydration
public EntityHydration(EntityManager entityManager)
-
-
Method Detail
-
hydrate
public Entity hydrate(Map<String,Object> dehydratedEntity, EntityType entityType)
Rehydrate an entity.- Parameters:
entityType- metadata of the entity to rehydratedehydratedEntity- map with key value pairs representing this entity- Returns:
- hydrated entity
-
hydrate
public Entity hydrate(Map<String,Object> dehydratedEntity, EntityType entityType, @Nullable @CheckForNull Fetch fetch)
Rehydrate a partial entity.- Parameters:
entityType- metadata of the entity to rehydratedehydratedEntity- map with key value pairs representing this entityfetch- containing attributes to retrieve, can be null- Returns:
- hydrated entity
-
-