Encapsulation, Abstraction, Programming, Behavior.
createANewInvoice(final InvoiceWriteDTO invoice){ ....business validations final var invoice = new Invoice(); invoice.setStatus(APPROVED); invoice.set... return mapToReadDTO(repository.save(invoice)); } } Artık bir create methodum var ve bu methodumun business datasını tamemen soyutladım. Aynı