Where to put the database access <p>I have an entity class which is persisted to a database via JPA and I have a Utility class which does the persisting and reading for me.</p> <p>Now I'm asking myself if that is really the way to go. Wouldn't it be clearer, if the data class would have methods for reading and writing to the database?</p>