I don't want to hardcode constant values, I would rather specify them through a reference variable.
For example, rather then writing the next query:
@Query(value = "SELECT u FROM UserModel u WHERE u.status = 1")
..I would like to extract the hardcoded value '1' and write something like:
@Query(value = "SELECT u FROM UserModel u WHERE u.status = UserModel.STATUS_ACTIVE") //doesn't compile
Is there a way to specify constants like in the second example inside spring-data queries?