-
Notifications
You must be signed in to change notification settings - Fork 1
Add feed #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feed #24
Conversation
src/main/java/ru/yandex/practicum/filmorate/dal/JdbcFilmRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/ru/yandex/practicum/filmorate/dal/JdbcUserRepository.java
Outdated
Show resolved
Hide resolved
|
|
||
| private static final String ACTIVITY_REVIEW_CREATE = ACTIVITY_GENERAL + | ||
| """ | ||
| VALUES(:userId, :entityId, 'REVIEW', 'ADD', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'REVIEW', 'ADD' и пр.
все строки нужно вынести в константы.
Это позволит их хранить в одном месте и избежать опечаток при использовании
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно каждую строчку в константу, а лучше создать enum, например:
public enum EventType {
LIKE,
FRIEND,
REVIEW
}
public enum OperationType {
ADD,
UPDATE
REMOVE
}
No description provided.