package org.azavea.otm.data;

import org.json.JSONArray;

public abstract class ModelContainer<T> {
	protected JSONArray data;
	
	public void setData(JSONArray array) {
		this.data = array;
	}
	
	public JSONArray getData() {
		return data;
	}
	
	public abstract T[] getAll(); 
}

package org.azavea.otm.data;

import java.util.LinkedHashMap;

import org.json.JSONArray;

public abstract class ModelContainer<T> {
	protected JSONArray data;
	
	public void setData(JSONArray array) {
		this.data = array;
	}
	
	public JSONArray getData() {
		return data;
	}
	
	public abstract LinkedHashMap<Integer,T> getAll(); 
}

Change T[] to Hash for modelContainer
Change T[] to Hash for modelContainer

Using a LinkedHashMap we can do lookup by key/id and also keep the list
in the default ordering from which it comes through the API
