Is it bad design if we add logic in getter and setter of entity class
问题 JAVA 8 I have a POJO class: class User { private String name; private String password; //... Getters / Setters ... } Which i will use as an entity class. In the getter/setter for password , I want to add decryption/encryption logic. public String getPassword() { return EncryptionFactory.decryption(password); } public void setPassword(String password) { this.password = EncryptionFactory.encryption(password); } EncryptionFactory is a utility class which encrypts/decrypt a String . My question