AccountMapperImpl.java

package org.openwms.common.account.impl;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import org.openwms.common.account.Account;
import org.openwms.common.account.api.AccountVO;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor"
)
@Component
public class AccountMapperImpl extends AccountMapper {

    @Override
    public AccountVO convertToVO(Account eo) {
        if ( eo == null ) {
            return null;
        }

        AccountVO accountVO = new AccountVO();

        if ( eo.hasPersistentKey() ) {
            accountVO.setpKey( eo.getPersistentKey() );
        }
        accountVO.setIdentifier( eo.getIdentifier() );
        accountVO.setName( eo.getName() );

        return accountVO;
    }

    @Override
    public List<AccountVO> convertToVO(List<Account> eo) {
        if ( eo == null ) {
            return null;
        }

        List<AccountVO> list = new ArrayList<AccountVO>( eo.size() );
        for ( Account account : eo ) {
            list.add( convertToVO( account ) );
        }

        return list;
    }
}