package com.brilliance.isc.swift.objmtconvert.model.mt1xx.tag.tag110;

import com.brilliance.isc.swift.objmtconvert.model.AbsMTCreator;
import com.brilliance.isc.swift.objmtconvert.model.AbsTagCreate;
import com.brilliance.isc.swift.objmtconvert.model.mt1xx.MT110Creator;
import com.brilliance.isc.swift.objmtconvert.model.mt1xx.mt1XXAbsCreator.MT110AbsCreator;
import java.util.List;


public class TagCycleCreator extends AbsTagCreate {
    private MT110Creator mt110Creator;

    public TagCycleCreator(AbsMTCreator absMTCreator)
    {
        super(absMTCreator);
        this.mt110Creator= (MT110Creator) absMTCreator;
    }

    public  void creator()
    {
        List<MT110AbsCreator> tagList = mt110Creator.getCycleDomain();
        for (MT110AbsCreator abs110:tagList) {
            mt110Creator.set("21",abs110.getChequeNumber());
            mt110Creator.set("30",abs110.getDateofIssue());
            mt110Creator.set("32"+abs110.getAmount32a().getTagResult().getTagEnd(),abs110.getAmount32a().getTagResult().getValue());
            mt110Creator.set("50"+abs110.getPayer50a().getTagResult().getTagEnd(),abs110.getPayer50a().getTagResult().getValue());
            mt110Creator.set("52"+abs110.getDrawerBank52a().getTagResult().getTagEnd(),abs110.getDrawerBank52a().getTagResult().getValue());
            mt110Creator.set("59"+abs110.getPayee59a().getTagResult().getTagEnd(),abs110.getPayee59a().getTagResult().getValue());
        }


    }
}
