mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
intellij autofixes
This commit is contained in:
@@ -18,7 +18,7 @@ import com.querydsl.core.types.Predicate;
|
||||
@Singleton
|
||||
public class FeedCategoryDAO extends GenericDAO<FeedCategory> {
|
||||
|
||||
private QFeedCategory category = QFeedCategory.feedCategory;
|
||||
private final QFeedCategory category = QFeedCategory.feedCategory;
|
||||
|
||||
@Inject
|
||||
public FeedCategoryDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import lombok.Getter;
|
||||
@Singleton
|
||||
public class FeedEntryDAO extends GenericDAO<FeedEntry> {
|
||||
|
||||
private QFeedEntry entry = QFeedEntry.feedEntry;
|
||||
private final QFeedEntry entry = QFeedEntry.feedEntry;
|
||||
|
||||
@Inject
|
||||
public FeedEntryDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -77,7 +77,7 @@ public class FeedEntryStatusDAO extends GenericDAO<FeedEntryStatus> {
|
||||
private FeedEntryStatus handleStatus(User user, FeedEntryStatus status, FeedSubscription sub, FeedEntry entry) {
|
||||
if (status == null) {
|
||||
Date unreadThreshold = config.getApplicationSettings().getUnreadThreshold();
|
||||
boolean read = unreadThreshold == null ? false : entry.getUpdated().before(unreadThreshold);
|
||||
boolean read = unreadThreshold != null && entry.getUpdated().before(unreadThreshold);
|
||||
status = new FeedEntryStatus(user, sub, entry);
|
||||
status.setRead(read);
|
||||
status.setMarkable(!read);
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.commafeed.backend.model.User;
|
||||
@Singleton
|
||||
public class FeedEntryTagDAO extends GenericDAO<FeedEntryTag> {
|
||||
|
||||
private QFeedEntryTag tag = QFeedEntryTag.feedEntryTag;
|
||||
private final QFeedEntryTag tag = QFeedEntryTag.feedEntryTag;
|
||||
|
||||
@Inject
|
||||
public FeedEntryTagDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import com.querydsl.jpa.JPQLQuery;
|
||||
@Singleton
|
||||
public class FeedSubscriptionDAO extends GenericDAO<FeedSubscription> {
|
||||
|
||||
private QFeedSubscription sub = QFeedSubscription.feedSubscription;
|
||||
private final QFeedSubscription sub = QFeedSubscription.feedSubscription;
|
||||
|
||||
@Inject
|
||||
public FeedSubscriptionDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import io.dropwizard.hibernate.AbstractDAO;
|
||||
|
||||
public abstract class GenericDAO<T extends AbstractModel> extends AbstractDAO<T> {
|
||||
|
||||
private JPAQueryFactory factory;
|
||||
private final JPAQueryFactory factory;
|
||||
|
||||
protected GenericDAO(SessionFactory sessionFactory) {
|
||||
super(sessionFactory);
|
||||
|
||||
@@ -11,7 +11,7 @@ import com.commafeed.backend.model.User;
|
||||
@Singleton
|
||||
public class UserDAO extends GenericDAO<User> {
|
||||
|
||||
private QUser user = QUser.user;
|
||||
private final QUser user = QUser.user;
|
||||
|
||||
@Inject
|
||||
public UserDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.commafeed.backend.model.UserRole.Role;
|
||||
@Singleton
|
||||
public class UserRoleDAO extends GenericDAO<UserRole> {
|
||||
|
||||
private QUserRole role = QUserRole.userRole;
|
||||
private final QUserRole role = QUserRole.userRole;
|
||||
|
||||
@Inject
|
||||
public UserRoleDAO(SessionFactory sessionFactory) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.commafeed.backend.model.UserSettings;
|
||||
@Singleton
|
||||
public class UserSettingsDAO extends GenericDAO<UserSettings> {
|
||||
|
||||
private QUserSettings settings = QUserSettings.userSettings;
|
||||
private final QUserSettings settings = QUserSettings.userSettings;
|
||||
|
||||
@Inject
|
||||
public UserSettingsDAO(SessionFactory sessionFactory) {
|
||||
|
||||
Reference in New Issue
Block a user