Open ngonzalezpazFC opened 3 years ago
CreationDao<T, K>
T is the type of the entity.
CrudDao<T, K>extends CreationDao<T, K> ...
T is the type of the entity.
ConversionJpaDaoSupport<S, T extends Identifiable<K>, K extends Serializable>
T is the type of persistent entity S is the type of the service entity
JpaDaoSupport<T extends Identifiable<K>, K extends Serializable>
extends ConversionJpaDaoSupport<T, T, K>
T is the type of the entity.
Then in a package-level documentation we will document how "the entity" maps to S
and T
in different architectures.
Interfaces in commons data have 2 parameters. Those should be the persistece layer entity and the type of its identifier. In interfaces like JpaDaoSupport or ConversionJpaDaoSupport, that implements CrudDao, the entity type parameter is replaced by the bussiness entity, because a conversion between business and persistence entities is made. How should commons-data interface entity type be documented? As the persistence or business layer entity? Or should the difference be explained in the interfaces that do conversions? (ConversionJpaDaoSupport or JpaDaoSupport)