Class DetachedMetadataContext

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<String,List<String>>
org.sdase.commons.server.dropwizard.metadata.DetachedMetadataContext
All Implemented Interfaces:
Serializable, Cloneable, Map<String,List<String>>

public class DetachedMetadataContext extends LinkedHashMap<String,List<String>>
A MetadataContext representation which is detached from the current MetadataContext. Changes in this class do not propagate to the current MetadataContext and vice versa.

This variant of a MetadataContext can be added to a business entity to persist the context related to that entity in MongoDB with sda-commons-server-spring-data-mongo. When a process continues and the entity is loaded from MongoDB, the MetadataContext can be restored like this:

MetadataContext.createContext(detachedMetadataContextFromEntity)
See Also: