public abstract class TableFactory {
private Map<TableName, Table<?>> mapOfTables = new HashMap<TableName, Table<?>>();
public Table<? extends ModelWithOrigin<?>> getTable(TableName tableName) throws UnregisteredTableError{
if (! mapOfTables.containsKey(tableName)) {
throw new UnregisteredTableError();
}
Table<? extends ModelWithOrigin<?>> table = mapOfTables.get(tableName);
return table ;
}