It just doesn't smell good. Maybe you should post more code. This kind of searches looks weird to me.
Anyway, the User
class should have a getProjNameById(final int id)
method, the Session
class should have getTransactionNameByTransactionTypeId(final int id)
and getCurrencyTypeNameByCurrencyTypeId(final int id)
methods as well. It would result higher cohesion and easier maintenance.
Note that the Singleton pattern is an antipattern nowadays. (The Singleton Pattern)
- 30.4k
- 9
- 82
- 157