February 2019
Intermediate to advanced
446 pages
10h 55m
English
For the first interface, you could have an abstract class or interface that is required by all the entities. For example, if we consider ID and name, attributes would be common for all entities.
Therefore, you could use the abstract Entity class as an abstraction of the entity in your domain layer:
public abstract class Entity<T> {
T id;
String name;
... (getter/setter and other relevant code)}
The following diagram contains the OTRS domain entities and their relationships:

Based on that, you can also have another abstract class that inherits Entity, an abstract class:
public abstract class BaseEntity<T> ...
Read now
Unlock full access