Class RecPairMap
- java.lang.Object
-
- com.tibco.patterns.learn.api.project.RecPairMap
-
public final class RecPairMap extends java.lang.ObjectManages 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 booleancontains(RecPairId recPairId)Checks if the given ID is already in any dataset.com.tibco.patterns.learn.jaxb.model.RecPairTypeget(DataPartition partition, int index)Get the XML representation of the pair.com.tibco.patterns.learn.jaxb.model.RecPairTypeget(RecPairId recPairId)intsize(DataPartition partition)java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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.
-
-