de.adorsys.ledgers.postings.impl.converter.LedgerMapperImpl Maven / Gradle / Ivy
package de.adorsys.ledgers.postings.impl.converter;
import de.adorsys.ledgers.postings.api.domain.ChartOfAccountBO;
import de.adorsys.ledgers.postings.api.domain.LedgerBO;
import de.adorsys.ledgers.postings.db.domain.ChartOfAccount;
import de.adorsys.ledgers.postings.db.domain.Ledger;
import javax.annotation.processing.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2021-01-28T10:29:39+0000",
comments = "version: 1.3.1.Final, compiler: javac, environment: Java 11.0.10 (Azul Systems, Inc.)"
)
public class LedgerMapperImpl implements LedgerMapper {
@Override
public LedgerBO toLedgerBO(Ledger ledger) {
if ( ledger == null ) {
return null;
}
LedgerBO ledgerBO = new LedgerBO();
ledgerBO.setName( ledger.getName() );
ledgerBO.setId( ledger.getId() );
ledgerBO.setCreated( ledger.getCreated() );
ledgerBO.setUserDetails( ledger.getUserDetails() );
ledgerBO.setShortDesc( ledger.getShortDesc() );
ledgerBO.setLongDesc( ledger.getLongDesc() );
ledgerBO.setCoa( chartOfAccountToChartOfAccountBO( ledger.getCoa() ) );
return ledgerBO;
}
@Override
public Ledger toLedger(LedgerBO ledger) {
if ( ledger == null ) {
return null;
}
Ledger ledger1 = new Ledger();
ledger1.setId( ledger.getId() );
ledger1.setCreated( ledger.getCreated() );
ledger1.setUserDetails( ledger.getUserDetails() );
ledger1.setShortDesc( ledger.getShortDesc() );
ledger1.setLongDesc( ledger.getLongDesc() );
ledger1.setName( ledger.getName() );
ledger1.setCoa( chartOfAccountBOToChartOfAccount( ledger.getCoa() ) );
return ledger1;
}
protected ChartOfAccountBO chartOfAccountToChartOfAccountBO(ChartOfAccount chartOfAccount) {
if ( chartOfAccount == null ) {
return null;
}
ChartOfAccountBO chartOfAccountBO = new ChartOfAccountBO();
chartOfAccountBO.setName( chartOfAccount.getName() );
chartOfAccountBO.setId( chartOfAccount.getId() );
chartOfAccountBO.setCreated( chartOfAccount.getCreated() );
chartOfAccountBO.setUserDetails( chartOfAccount.getUserDetails() );
chartOfAccountBO.setShortDesc( chartOfAccount.getShortDesc() );
chartOfAccountBO.setLongDesc( chartOfAccount.getLongDesc() );
return chartOfAccountBO;
}
protected ChartOfAccount chartOfAccountBOToChartOfAccount(ChartOfAccountBO chartOfAccountBO) {
if ( chartOfAccountBO == null ) {
return null;
}
ChartOfAccount chartOfAccount = new ChartOfAccount();
chartOfAccount.setId( chartOfAccountBO.getId() );
chartOfAccount.setCreated( chartOfAccountBO.getCreated() );
chartOfAccount.setUserDetails( chartOfAccountBO.getUserDetails() );
chartOfAccount.setShortDesc( chartOfAccountBO.getShortDesc() );
chartOfAccount.setLongDesc( chartOfAccountBO.getLongDesc() );
chartOfAccount.setName( chartOfAccountBO.getName() );
return chartOfAccount;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy