package database.table.relationship;

import database.table.Table;
import database.table.Row;
import structures.list.ArrayList;

public class Relationship<T> {
  protected Table<?> originTable;
  protected Table<?> destinyTable;
  protected String originField;
  protected String destinyField;
  protected boolean isMultiple;

  public Row getRow() {
    if (this.isMultiple) {
      throw new HarambException("Relationship is one to many. Use getRows() instead.");
    }
  }

  public ArrayList<Row> getRows() {
    if (!this.isMultiple) {
      throw new HarambException("Relationship is one to one. Use getRow() instead.");
    }
  }
}

@@ -86,13 +86,50 @@
 ble.
+row.
 Row;%0A
+import database.HarambException;%0A
 impo
@@ -154,16 +154,22 @@
 .ArrayLi
+nearLi
 st;%0A%0Apub
@@ -384,16 +384,39 @@
 getRow()
+ throws HarambException
  %7B%0A    i
@@ -552,16 +552,22 @@
  ArrayLi
+nearLi
 st%3CRow%3E 
@@ -575,16 +575,39 @@
 etRows()
+ throws HarambException
  %7B%0A    i

Fix import errors