| Previous | Next | WireHose Developers Guide |
First, a method which fetches the set of feeds to crawl.
static NSArray fetchFeedsToCrawl(EOEditingContext ec) {
NSMutableArray qualifiers = new NSMutableArray();
// fetch all feeds that haven't been fetched in the last hour
qualifiers.addObject(new EOKeyValueQualifier(
"lastFetchDate",
EOQualifier.QualifierOperatorLessThan,
new NSTimestamp().timestampByAddingGregorianUnits(0, 0, 0, -1, 0, 0)));
// and all feeds which weren't invalid last time we fetched
qualifiers.addObject(
WHEnterpriseObject.qualifierForBooleanAttribute(ec,
"RSSFeed", "lastFetchInvalid", EOQualifier.QualifierOperatorEqual, false));
EOQualifier q = new EOAndQualifier(qualifiers);
EOFetchSpecification fs = new EOFetchSpecification("RSSFeed", q, null);
return ec.objectsWithFetchSpecification(fs);
}
|
Note: The
|
Copyright ©2000-2003 Gary Teter. All rights reserved. WireHose is a trademark of Gary Teter.