From 6774ccdcd0cc81322b42335f6c7b3116d54927c3 Mon Sep 17 00:00:00 2001 From: Landon Reed Date: Fri, 15 Feb 2019 16:22:02 -0500 Subject: [PATCH] fix(Table): refactor table; add comments --- src/main/java/com/conveyal/gtfs/loader/Table.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/conveyal/gtfs/loader/Table.java b/src/main/java/com/conveyal/gtfs/loader/Table.java index 2a7482c5e..74b9cb326 100644 --- a/src/main/java/com/conveyal/gtfs/loader/Table.java +++ b/src/main/java/com/conveyal/gtfs/loader/Table.java @@ -71,6 +71,10 @@ public class Table { private boolean usePrimaryKey = false; /** Indicates whether the table has unique key field. */ private boolean hasUniqueKeyField = true; + /** + * Indicates whether the table has a compound key that must be used in conjunction with the key field to determine + * table uniqueness(e.g., transfers#to_stop_id). + * */ private boolean compoundKey; public Table (String name, Class entityClass, Requirement required, Field... fields) { @@ -332,6 +336,7 @@ public Table keyFieldIsNotUnique() { return this; } + /** Fluent method to set whether the table has a compound key, e.g., transfers#to_stop_id. */ private Table hasCompoundKey() { this.compoundKey = true; return this;