Skip to content

Commit

Permalink
fix(Table): refactor table; add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
landonreed committed Feb 15, 2019
1 parent 09c0e5b commit 6774ccd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/conveyal/gtfs/loader/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<? extends Entity> entityClass, Requirement required, Field... fields) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6774ccd

Please # to comment.