mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
22 lines
561 B
Java
22 lines
561 B
Java
|
|
package com.commafeed.backend.services;
|
||
|
|
|
||
|
|
import javax.ejb.Stateless;
|
||
|
|
import javax.inject.Inject;
|
||
|
|
|
||
|
|
import com.commafeed.backend.dao.FeedEntryStatusDAO;
|
||
|
|
import com.commafeed.backend.model.FeedEntryStatus;
|
||
|
|
import com.commafeed.backend.model.User;
|
||
|
|
|
||
|
|
@Stateless
|
||
|
|
public class FeedEntryService {
|
||
|
|
|
||
|
|
@Inject
|
||
|
|
FeedEntryStatusDAO feedEntryStatusDAO;
|
||
|
|
|
||
|
|
public void markEntry(User user, Long entryId, boolean read) {
|
||
|
|
FeedEntryStatus status = feedEntryStatusDAO.findById(user, entryId);
|
||
|
|
status.setRead(read);
|
||
|
|
feedEntryStatusDAO.update(status);
|
||
|
|
}
|
||
|
|
}
|