Record Class DynamicAttachmentRule

java.lang.Object
java.lang.Record
fr.gouv.vitam.worker.core.extractseda.DynamicAttachmentRule
Record Components:
metadataKey - dotted path of the metadata carrying the discriminating value
metadataValue - value the metadata must hold for the rule to apply
attachmentUnitId - attachment unit of the transaction, already resolved against metadata collect

public record DynamicAttachmentRule(String metadataKey, String metadataValue, String attachmentUnitId) extends Record
A dynamic attachment rule of a collect project : root archive units whose metadata matches metadataKey/metadataValue are attached to attachmentUnitId.
  • Constructor Details

    • DynamicAttachmentRule

      public DynamicAttachmentRule(String metadataKey, String metadataValue, String attachmentUnitId)
      Creates an instance of a DynamicAttachmentRule record class.
      Parameters:
      metadataKey - the value for the metadataKey record component
      metadataValue - the value for the metadataValue record component
      attachmentUnitId - the value for the attachmentUnitId record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • metadataKey

      public String metadataKey()
      Returns the value of the metadataKey record component.
      Returns:
      the value of the metadataKey record component
    • metadataValue

      public String metadataValue()
      Returns the value of the metadataValue record component.
      Returns:
      the value of the metadataValue record component
    • attachmentUnitId

      public String attachmentUnitId()
      Returns the value of the attachmentUnitId record component.
      Returns:
      the value of the attachmentUnitId record component