try {
Query query = fDb.query();
query.constrain(News.class);
query.descend("fFeedLink").constrain(feedRef.getLink().toString()); //$NON-NLS-1$
query.descend("fParentId").constrain(0); //$NON-NLS-1$
if (!states.containsAll(EnumSet.allOf(INews.State.class))) {
Constraint constraint = null;
for (INews.State state : states) {
if (constraint == null)
constraint = query.descend("fStateOrdinal").constrain(state.ordinal()); //$NON-NLS-1$