Interface Code


public interface Code
Codes are small base entities of an application. Like currencies or cities. They are mostly stable but there could be updates from time to time. Typically there is an initial load after the repository (database) is created.

For things like 'YES'/'NO' where there is no chance of change or updates at all you better use enums.

A code is always a view. Meaning if a code is referenced in an entity the code is not updated when persisting that entity.

As specialty codes can have a String or an Integer id field.