- java.lang.Object
-
- com.pervasive.datarush.tokens.record.JoinKey
-
public final class JoinKey extends Object
Combination of a left key and a right key.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLeftName()Get the left field name associated with this key.static String[]getLeftNames(JoinKey... joinKeys)Extract the left field names from several keys.StringgetRightName()Get the right field name associated with this key.static String[]getRightNames(JoinKey... joinKeys)Extract the right field names from several keys.static JoinKey[]keys(String... names)Create multiple keys.static JoinKey[]makeJoinKeys(String[] leftKeyNames, String[] rightKeyNames)Create multiple keys.StringtoString()Pretty-print thisJoinKey.
-
-
-
Constructor Detail
-
JoinKey
public JoinKey(String name)
Create a key where the left name and right name are the same.- Parameters:
name- Name of the key field on both the left and right
-
-
Method Detail
-
getLeftName
public String getLeftName()
Get the left field name associated with this key.- Returns:
- Name of the key field
-
getRightName
public String getRightName()
Get the right field name associated with this key.- Returns:
- Name of the key field
-
toString
public String toString()
Pretty-print thisJoinKey.
-
keys
public static JoinKey[] keys(String... names)
Create multiple keys.- Parameters:
names- names of the keys on the left and right- Returns:
- Join keys, in the same order as the supplied field names
-
makeJoinKeys
public static JoinKey[] makeJoinKeys(String[] leftKeyNames, String[] rightKeyNames)
Create multiple keys.- Parameters:
leftKeyNames- names of the keys on the leftrightKeyNames- names of the keys on the right- Returns:
- Join keys, in the same order as the supplied field names
-
getLeftNames
public static String[] getLeftNames(JoinKey... joinKeys)
Extract the left field names from several keys.- Parameters:
joinKeys- Keys from which to get the field names- Returns:
- Field names for the keys, in the same order as the supplied keys
-
-