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

legstar.test.jaxb.flat01.CobolFlat01Record Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package legstar.test.jaxb.flat01;

import java.util.LinkedHashMap;
import java.util.Map;

import com.legstar.base.type.CobolType;
import com.legstar.base.type.composite.*;
import com.legstar.base.type.primitive.*;

public class CobolFlat01Record extends CobolComplexType {

    public CobolFlat01Record() {
        super(new CobolComplexType.Builder()
                    .name("Flat01Record")
                    .fields(createFlat01RecordFields())
              );
    }

    private static Map < String, CobolType > createFlat01RecordFields() {

        Map < String, CobolType > fields = new LinkedHashMap < String, CobolType >();

        CobolZonedDecimalType < Long > comNumber =
                new CobolZonedDecimalType.Builder < Long >(Long.class)
                        .totalDigits(6)
                        .build();
        fields.put("comNumber", comNumber);

        CobolStringType < String > comName =
                new CobolStringType.Builder < String >(String.class)
                        .charNum(20)
                        .build();
        fields.put("comName", comName);

        CobolPackedDecimalType < java.math.BigDecimal > comAmount =
                new CobolPackedDecimalType.Builder < java.math.BigDecimal >(java.math.BigDecimal.class)
                        .totalDigits(7)
                        .fractionDigits(2)
                        .build();
        fields.put("comAmount", comAmount);

        return fields;

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy