This static method populates a DTO object from the
values of a document as presented by mongoose queries.
CAUTION: This method must be implemented in child classes
in order to provide restricted transferable fields. This
method should not be used directly as it does no exclusion
of fields as would be usual for transferable DTOs.
The document as received from mongoose.
The DTO object that will be populated with values.
The dto
object with fields set.
Generated using TypeDoc
COMMON
This concern requires the presence of fields that consist in delivering transferable information. This concerns data that can be persisted in the mongo database but also transferred (DTOs).
This class defines a generic type template
DTOType
that should be used with DTO classes, e.g.StateDTO
,AccountDTO
, etc.We provide a base implementation for the {@link toDTO} method to standardize the retrieval and formatting of DTOs from their origin database documents.
Extending and using the
Transferable
v0.2.0