Class AttributeMap.Exporter

java.lang.Object
com.mayam.wf.attributes.shared.AttributeMap.Exporter
Enclosing class:
AttributeMap

public class AttributeMap.Exporter extends Object
Fluid export with optional filtering and merging instructions. Example:
   final AttributeMap changes = subject.export()
     .cacheConflicting()
     .persistenceScoped()
     .keepingDirty()
     .asMap();
 
  • Constructor Details

    • Exporter

      public Exporter()
  • Method Details

    • onlyDirty

      public AttributeMap.Exporter onlyDirty()
      Only export source attributes marked as dirty.
    • onlyClean

      public AttributeMap.Exporter onlyClean()
      Only export source attributes marked as clean.
    • keepingDirty

      public AttributeMap.Exporter keepingDirty()
      Transfer source dirty status to destination.
    • markingDirty

      public AttributeMap.Exporter markingDirty()
      Mark all exported attributes as dirty in destination.
    • markingClean

      public AttributeMap.Exporter markingClean()
      Mark all exported attributes as clean in destination.
    • limitedTo

      public AttributeMap.Exporter limitedTo(Collection<Attribute> limitedTo)
      Limit export to the attributes found within the provided set.
    • excluding

      public AttributeMap.Exporter excluding(Collection<Attribute> excluding)
      Limit export to the attributes NOT found within the provided set.
    • scoped

      public AttributeMap.Exporter scoped(Scope... scopes)
      Only export source attributes with values matching provided scopes.
    • persistenceScoped

      public AttributeMap.Exporter persistenceScoped()
      Only export source attributes with values matching a persistent scope.
    • cacheMatching

      public AttributeMap.Exporter cacheMatching()
      Only export source attributes with values equal to those of the cache associated with the source.
    • cacheConflicting

      public AttributeMap.Exporter cacheConflicting()
      Only export source attributes with values conflicting with or missing from the cache associated with the source.
    • forwardCache

      public AttributeMap.Exporter forwardCache()
      Associates the destination map with the source cache.
    • overwriteNone

      public AttributeMap.Exporter overwriteNone()
      Allow no overwrites; only source attributes missing in destination will be exported.
    • overwriteDirty

      public AttributeMap.Exporter overwriteDirty()
      Only overwrite attributes marked as dirty in the destination.
    • overwriteClean

      public AttributeMap.Exporter overwriteClean()
      Only overwrite attributes marked as clean in the destination.
    • shallow

      public AttributeMap.Exporter shallow()
      Transfer possibly mutable objects from source to destination.
    • noInternal

      public AttributeMap.Exporter noInternal()
      Only export source attributes with value classes NOT flagged as internal.
    • onlyInternal

      public AttributeMap.Exporter onlyInternal()
      Only export source attributes with value classes flagged as internal.
    • nonNull

      public AttributeMap.Exporter nonNull()
      Only export attributes with a non-null value.
    • intoMap

      public AttributeMap intoMap(AttributeMap dst)
      Export into an existing AttributeMap (returned for convenience).
    • asMap

      public @NonNull AttributeMap asMap()
      Export as a new AttributeMap
    • intoSet

      public Set<Attribute> intoSet(Set<Attribute> dst)
      Export into an existing set (returned for convenience).
    • asSet

      public Set<Attribute> asSet()
      Export as a new set.