Entity unemployment_percent = getFREDStat("http://research.stlouisfed.org/fred2/data/UNRATE.txt", "unemployment_percent", unemployment_percent_info);
entities.add(unemployment_percent);
//Add all entities to datastore & Memcache.
AsyncDatastoreService datastore = DatastoreServiceFactory.getAsyncDatastoreService();
AsyncMemcacheService memcache = MemcacheServiceFactory.getAsyncMemcacheService();
for (int i = 0; i < entities.size(); i++) {
/**
* We have to make sure that each entity is not null.
* The Vector could contain null entries, which
* occurs when there are problems generating
* their associated information (for instance, an
* inability to access the API.)
*/
Entity entity = entities.get(i);
if (entity != null) {
/**
* Copy the data into Memcache as well, for speed.
*/
System.out.println(entity);
datastore.put(entity);
}//end if entity does not equal null.
}//Loop through entities list.
}//end doGet