Join convenience methods
@@ -24,6 +24,19 @@ public class DataFrameJoiner {
this.column = table.column(column);
}
+ /**
+ * Joins to the given tables assuming that they have a column of the name we're joining on
+ *
+ * @param tables The tables to join with
+ */
+ public Table inner(Table... tables) {
+ Table joined = table;
+ for (Table table2 : tables) {
+ joined = inner(table2, column.name());
+ }
+ return joined;
+ }
+
/**
* Joins the joiner to the table2, using the given column for the second table and returns the resulting table
*
@@ -116,6 +129,19 @@ public class DataFrameJoiner {
return result;
}
+ /**
+ * Joins to the given tables assuming that they have a column of the name we're joining on
+ *
+ * @param tables The tables to join with
+ */
+ public Table leftOuter(Table... tables) {
+ Table joined = table;
+ for (Table table2 : tables) {
+ joined = leftOuter(table2, column.name());
+ }
+ return joined;
+ }
+
/**
* Joins the joiner to the table2, using the given column for the second table and returns the resulting table
*
@@ -127,6 +153,19 @@ public class DataFrameJoiner {
return joinInternal(table2, col2Name, true);
}
+ /**
+ * Joins to the given tables assuming that they have a column of the name we're joining on
+ *
+ * @param tables The tables to join with
+ */
+ public Table rightOuter(Table... tables) {
+ Table joined = table;
+ for (Table table2 : tables) {
+ joined = rightOuter(table2, column.name());
+ }
+ return joined;
+ }
+
/**
* Joins the joiner to the table2, using the given column for the second table and returns the resulting table
*
