java.lang.Object
com.ibm.jzos.fields.DatatypeFactory
com.ibm.jzos.fields.CobolDatatypeFactory
Concrete implementation of
DatatypeFactory
with COBOL Field
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.
See DatatypeFactory
for more information.
- Since:
- 2.1.0, 2.4.5 Data Access Accelerator support
- See Also:
-
Field Summary
Fields inherited from class com.ibm.jzos.fields.DatatypeFactory
USE_DAA_DEFAULT, USE_DAA_PROPERTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBinaryAsBigDecimalField
(int precision, int scale, boolean signed) Construct and return a BinaryAsBigDecimalField, advancing the current offset by its byte length.getBinaryAsBigIntegerField
(int precision, int scale, boolean signed) Construct and return a BinaryAsBigIntegerField, advancing the current offset by its byte length.getBinaryAsIntField
(int precision, boolean signed) Construct and return a BinaryAsIntField, advancing the current offset by its byte length.getBinaryAsLongField
(int precision, boolean signed) Construct and return a BinaryAsLongField, advancing the current offset by its byte length.getBinaryField
(int precision, int scale, boolean signed, boolean comp5) Construct and return a BinaryField, advancing the current offset by its byte length.getExternalFloatField
(int precision, int scale, boolean showMantissaPlusSign, boolean showExponentPlusSign, boolean impliedDecimalPoint) Construct and return a FloatDisplayField, advancing the current offset by its byte length.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
-
Constructor Details
-
CobolDatatypeFactory
public CobolDatatypeFactory()
-
-
Method Details
-
getBinaryAsLongField
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:
-
getBinaryAsIntField
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:
-
getBinaryAsBigDecimalField
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
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
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
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:
IllegalArgumentException
- if length implies a precision > 31 digits.- See Also:
-