All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.ledgers.postings.impl.converter.PostingMapper Maven / Gradle / Ivy

There is a newer version: 4.17
Show newest version
package de.adorsys.ledgers.postings.impl.converter;

import de.adorsys.ledgers.postings.api.domain.PostingBO;
import de.adorsys.ledgers.postings.db.domain.OperationDetails;
import de.adorsys.ledgers.postings.db.domain.Posting;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(uses = {LedgerAccountMapper.class, LedgerMapper.class})
public interface PostingMapper {

    @Mapping(source = "posting.oprDetails.opDetails", target = "oprDetails")
    PostingBO toPostingBO(Posting posting);

    Posting toPosting(PostingBO posting);

    String toOprDetailsBO(OperationDetails operationDetails);

    @Mapping(target = "opDetails", source = "operationDetails")
    @Mapping(target = "id", expression = "java(de.adorsys.ledgers.util.Ids.id())")
    OperationDetails toOperationDetails(String operationDetails);

    List toPostingList(List postingsBO);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy