Class RecPairMap


  • public final class RecPairMap
    extends java.lang.Object
    Manages datasets in the XML structure in sync with a map of all record pairs that are stored in these datasets. The map is used to ensure pair uniqueness, retrieval by pair ID. Operates with XML RecPairType objects, not RecPair objects.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(RecPairId recPairId)
      Checks if the given ID is already in any dataset.
      com.tibco.patterns.learn.jaxb.model.RecPairType get​(DataPartition partition, int index)
      Get the XML representation of the pair.
      com.tibco.patterns.learn.jaxb.model.RecPairType get​(RecPairId recPairId)  
      int size​(DataPartition partition)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • contains

        public boolean contains​(RecPairId recPairId)
        Checks if the given ID is already in any dataset. Order of record keys does not matter.
        Returns:
        true if any dataset contains a pair with the given ID.
      • get

        public com.tibco.patterns.learn.jaxb.model.RecPairType get​(DataPartition partition,
                                                                   int index)
        Get the XML representation of the pair.
        Parameters:
        partition - - the partition of the pair.
        index - - index of the pair in the dataset.
        Returns:
        XML pair from the partition with the given index.
      • get

        public com.tibco.patterns.learn.jaxb.model.RecPairType get​(RecPairId recPairId)
        Parameters:
        recPairId - - ID for the record pair. Not null.
        Returns:
        a record pair with the given keys from any dataset; or null if not found.
      • size

        public int size​(DataPartition partition)
        Returns:
        the number of record pairs in the given partition.