Files
Athou_commafeed/src/main/java/com/commafeed/backend/dao/FeedService.java

20 lines
492 B
Java
Raw Normal View History

2013-03-20 20:33:42 +01:00
package com.commafeed.backend.dao;
2013-03-24 13:11:05 +01:00
import java.util.List;
2013-03-20 20:33:42 +01:00
import javax.ejb.Stateless;
2013-03-23 16:17:19 +01:00
import com.commafeed.backend.model.Feed;
2013-03-24 13:11:05 +01:00
import com.commafeed.frontend.utils.ModelFactory.MF;
import com.google.common.collect.Iterables;
2013-03-20 20:33:42 +01:00
@Stateless
2013-03-25 12:24:00 +01:00
@SuppressWarnings("serial")
2013-03-23 01:49:39 +01:00
public class FeedService extends GenericDAO<Feed, Long> {
2013-03-20 20:33:42 +01:00
2013-03-24 13:11:05 +01:00
public Feed findByUrl(String url) {
List<Feed> feeds = findByField(MF.i(proxy().getUrl()), url);
return Iterables.getFirst(feeds, null);
}
2013-03-20 20:33:42 +01:00
}