- java.lang.Object
-
- com.ibm.jzos.fields.DatatypeFactory
-
- com.ibm.jzos.fields.CobolDatatypeFactory
-
public class CobolDatatypeFactory extends DatatypeFactory
Concrete implementation ofDatatypeFactory
with COBOLField
related factory methods.Instances of this class or its subclasses will automatically construct instances of
com.ibm.jzos.fields.daa
classes if the com.ibm.jzos.fields.daa package is available at runtime. SeeDatatypeFactory
for more information.- Since:
- 2.1.0, 2.4.5 Data Access Accelerator support
- See Also:
DatatypeFactory
-
-
Field Summary
-
Fields inherited from class com.ibm.jzos.fields.DatatypeFactory
USE_DAA_DEFAULT, USE_DAA_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description CobolDatatypeFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryAsBigDecimalField
getBinaryAsBigDecimalField(int precision, int scale, boolean signed)
Construct and return a BinaryAsBigDecimalField, advancing the current offset by its byte length.BinaryAsBigIntegerField
getBinaryAsBigIntegerField(int precision, int scale, boolean signed)
Construct and return a BinaryAsBigIntegerField, advancing the current offset by its byte length.BinaryAsIntField
getBinaryAsIntField(int precision, boolean signed)
Construct and return a BinaryAsIntField, advancing the current offset by its byte length.BinaryAsLongField
getBinaryAsLongField(int precision, boolean signed)
Construct and return a BinaryAsLongField, advancing the current offset by its byte length.Field
getBinaryField(int precision, int scale, boolean signed, boolean comp5)
Construct and return a BinaryField, advancing the current offset by its byte length.ExternalFloatField
getExternalFloatField(int precision, int scale, boolean showMantissaPlusSign, boolean showExponentPlusSign, boolean impliedDecimalPoint)
Construct and return a FloatDisplayField, advancing the current offset by its byte length.Field
getPackedDecimalField(int precision, int scale, boolean signed)
Construct and return a PackedDecimalAs<*>Field, advancing the current offset by its byte length.-
Methods inherited from class com.ibm.jzos.fields.DatatypeFactory
getBinaryAsBigIntegerField, getBinaryField, getByteArrayField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsIntField, getExternalDecimalAsIntField, getExternalDecimalAsLongField, getExternalDecimalAsLongField, getExternalDecimalField, getIbmDoubleField, getIbmFloatField, getMaximumOffset, getOffset, getPackedDecimalAsBigDecimalField, getPackedDecimalAsBigIntegerField, getPackedDecimalAsIntField, getPackedDecimalAsLongField, getStringEncoding, getStringField, getStringField, getStringField, getStringField, getStringField, getStringTrimDefault, incrementOffset, popOffset, pushOffset, setOffset, setStringEncoding, setStringTrimDefault, setUseDaa, useDaa
-
-
-
-
Method Detail
-
getBinaryAsLongField
public BinaryAsLongField getBinaryAsLongField(int precision, boolean signed)
Construct and return a BinaryAsLongField, advancing the current offset by its byte length.Note that the field behaves as if TRUNC(BIN) was set in COBOL.
- Overrides:
getBinaryAsLongField
in classDatatypeFactory
- Parameters:
precision
- the number of decimal digits of precisionsigned
- true if the value is signed- Returns:
- BinaryAsLongField
- See Also:
BinaryAsLongField
-
getBinaryAsIntField
public BinaryAsIntField getBinaryAsIntField(int precision, boolean signed)
Construct and return a BinaryAsIntField, advancing the current offset by its byte length.Note that the field behaves as if TRUNC(BIN) was set in COBOL.
- Overrides:
getBinaryAsIntField
in classDatatypeFactory
- Parameters:
precision
- the number of decimal digits of precisionsigned
- true if the value is signed- Returns:
- BinaryAsIntField
- See Also:
BinaryAsIntField
-
getBinaryAsBigDecimalField
public BinaryAsBigDecimalField getBinaryAsBigDecimalField(int precision, int scale, boolean signed)
Construct and return a BinaryAsBigDecimalField, advancing the current offset by its byte length.Note that the field behaves as if TRUNC(BIN) was set in COBOL.
- Overrides:
getBinaryAsBigDecimalField
in classDatatypeFactory
- Parameters:
precision
- the number of decimal digits of precisionscale
- the number of implied decimal digits in the fractional part of the fieldsigned
- true if the value is signed- Returns:
- BinaryAsBigDecimalField
-
getBinaryAsBigIntegerField
public BinaryAsBigIntegerField getBinaryAsBigIntegerField(int precision, int scale, boolean signed)
Construct and return a BinaryAsBigIntegerField, advancing the current offset by its byte length.Note that the field behaves as if TRUNC(BIN) was set in COBOL.
- Overrides:
getBinaryAsBigIntegerField
in classDatatypeFactory
- Parameters:
precision
- the number of decimal digits of precisionscale
- a negative integer specifying the power of the numbersigned
- true if the value is signed- Returns:
- BinaryAsBigIntegerField
-
getBinaryField
public Field getBinaryField(int precision, int scale, boolean signed, boolean comp5)
Construct and return a BinaryField, advancing the current offset by its byte length. The actual field returned is based on the precision and scale.Note that the field behaves as if TRUNC(BIN) was set in COBOL.
- Parameters:
precision
- the number of decimal digits of precisionscale
- the number of implied decimal digits in the fractional part of the fieldsigned
- true if the value is signedcomp5
- true if the entire bit range is to be allowed- Returns:
- Field
-
getExternalFloatField
public ExternalFloatField getExternalFloatField(int precision, int scale, boolean showMantissaPlusSign, boolean showExponentPlusSign, boolean impliedDecimalPoint)
Construct and return a FloatDisplayField, advancing the current offset by its byte length.- Parameters:
precision
- the number of decimal digits of precisionscale
- the number of implied decimal digits in the fractional part of the fieldshowMantissaPlusSign
- true if a plus sign is to be displayed for positive mantissa valuesshowExponentPlusSign
- true if a plus sign is to be displayed for positive exponent valuesimpliedDecimalPoint
- true if the decimal point is implied.- Returns:
- ExternalFloatField
-
getPackedDecimalField
public Field getPackedDecimalField(int precision, int scale, boolean signed)
Construct and return a PackedDecimalAs<*>Field, advancing the current offset by its byte length. The actual field returned is based on the precision and scale.- Specified by:
getPackedDecimalField
in classDatatypeFactory
- Parameters:
precision
- the number of decimal digits of precisionscale
- the number of implied decimal digits to the right of the decimal pointsigned
- true if the value is signed- Returns:
- Field
- Throws:
java.lang.IllegalArgumentException
- if length implies a precision > 31 digits.- See Also:
PackedDecimalAsIntField
,PackedDecimalAsLongField
,PackedDecimalAsBigIntegerField
,PackedDecimalAsBigDecimalField
-
-