In my programs I use the next logic.
I create a MySession class with methods save, update, delete, loadAllRecordsFromMyTable, findMyRecord, etc, or rather every function that "query" database. In this class, I put also some static final consts like
protected static final Logger LOGGER = Logger.getLogger("Log");
protected static final List<EntityXYZ> allXYZ = new ArrayList<>();
EVERY viewmodal extends class MySession, but not every viewmodal uses all methods in MySession.
Here's my doubts:
Here the answer to many of my doubts.
Thanks to chillworld for the great advices.