Record Class RenameCascadeSource

java.lang.Object
java.lang.Record
org.alfresco.elasticsearch.batchindexing.cascade.RenameCascadeSource
Record Components:
nodeRef - Alfresco node reference of the renamed node.
descendantUuid - bare UUID used to scope the descendant query.
oldPrefixedSegment - pre-rename PATH segment (e.g. cm:oldname).
newPrefixedSegment - post-rename PATH segment (e.g. cm:newname).
oldUnprefixedSegment - pre-rename UNPREFIXED_PATH segment.
newUnprefixedSegment - post-rename UNPREFIXED_PATH segment.

public record RenameCascadeSource(String nodeRef, String descendantUuid, String oldPrefixedSegment, String newPrefixedSegment, String oldUnprefixedSegment, String newUnprefixedSegment) extends Record
Descriptor for a rename cascade: the old and new terminal path segments to swap in descendants' PATH / UNPREFIXED_PATH arrays. Old segments come from an mget against the source ES doc; new segments come from the reindexing event.
  • Constructor Details

    • RenameCascadeSource

      public RenameCascadeSource(String nodeRef, String descendantUuid, String oldPrefixedSegment, String newPrefixedSegment, String oldUnprefixedSegment, String newUnprefixedSegment)
      Creates an instance of a RenameCascadeSource record class.
      Parameters:
      nodeRef - the value for the nodeRef record component
      descendantUuid - the value for the descendantUuid record component
      oldPrefixedSegment - the value for the oldPrefixedSegment record component
      newPrefixedSegment - the value for the newPrefixedSegment record component
      oldUnprefixedSegment - the value for the oldUnprefixedSegment record component
      newUnprefixedSegment - the value for the newUnprefixedSegment record component
  • Method Details

    • isNoop

      public boolean isNoop()
      True when the rename didn't actually change the name.
    • 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.
    • nodeRef

      public String nodeRef()
      Returns the value of the nodeRef record component.
      Returns:
      the value of the nodeRef record component
    • descendantUuid

      public String descendantUuid()
      Returns the value of the descendantUuid record component.
      Returns:
      the value of the descendantUuid record component
    • oldPrefixedSegment

      public String oldPrefixedSegment()
      Returns the value of the oldPrefixedSegment record component.
      Returns:
      the value of the oldPrefixedSegment record component
    • newPrefixedSegment

      public String newPrefixedSegment()
      Returns the value of the newPrefixedSegment record component.
      Returns:
      the value of the newPrefixedSegment record component
    • oldUnprefixedSegment

      public String oldUnprefixedSegment()
      Returns the value of the oldUnprefixedSegment record component.
      Returns:
      the value of the oldUnprefixedSegment record component
    • newUnprefixedSegment

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