package com.brilliance.isc.common.stgmod.vo;


import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.brilliance.mda.runtime.mda.IStream;
import com.brilliance.mda.runtime.mda.impl.StreamImpl;
import com.brilliance.mda.runtime.mda.util.Decimals;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;


@Data
@NoArgsConstructor
public class StgmodVo extends AbstractCommonVo {

    //List of Values for StreamGrid
    private IStream valstm = new StreamImpl();
    //List of Fields for SQL
    private IStream fldstm = new StreamImpl();
    //List of Instances for SQL
    private IStream insstm = new StreamImpl();
    //List of additional streamgrid parameter
    private IStream addstm = new StreamImpl();
    //Stream Data for Postprocessing
    private IStream dtastm = new StreamImpl();
    //Last Used Column Position
    private BigDecimal poslst = Decimals.ZERO_SCALE1;
    //Number of Fields for initial SQL
    private int fldcnt;
    //Number of instances for initial SQL
    private int inscnt;

    public void reset() {
        if (valstm == null) {
            valstm = new StreamImpl();
        }
        if (fldstm == null) {
            fldstm = new StreamImpl();
        }
        if (insstm == null) {
            insstm = new StreamImpl();
        }
        if (addstm == null) {
            addstm = new StreamImpl();
        }
        if (dtastm == null) {
            dtastm = new StreamImpl();
        }
    }

}
