java.lang.Object
com.ibm.jzos.fields.DatatypeFactory
com.ibm.jzos.fields.AssemblerDatatypeFactory
Concrete implementation of
DatatypeFactory with Assembler Field
related factory methods.
A running offset to the next field is maintained, along with a
stack which can be used to push and pop the current Field offset.
A DatatypeFactory is typically used to statically initialize static
Field variables in a Java class which maps a record described by a byte array.
For an example, see Format1DSCB.
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 TypeMethodDescriptiongetPackedDecimalAsBigDecimalField(int length, int scale, boolean signed) Construct and return a PackedDecimalAsBigDecimalField, advancing the current offset by its byte length.getPackedDecimalAsBigIntegerField(int length, int scale, boolean signed) Construct and return a PackedDecimalAsBigIntegerField, advancing the current offset by its byte length.getPackedDecimalAsIntField(int length, boolean signed) Construct and return a PackedDecimalAsIntField, advancing the current offset by its byte length.getPackedDecimalAsLongField(int length, boolean signed) Construct and return a PackedDecimalAsLongField, advancing the current offset by its byte length.getPackedDecimalField(int length, int scale, boolean signed) Construct and return a PackedDecimalAs<*>Field, advancing the current offset by its byte length.getZonedDecimalField(int length, int scale, boolean signed) Construct and return a ExternalDecimalAs<*>Field, depending on the length and scale requested.Methods inherited from class com.ibm.jzos.fields.DatatypeFactory
getBinaryAsBigDecimalField, getBinaryAsBigIntegerField, getBinaryAsBigIntegerField, getBinaryAsIntField, getBinaryAsLongField, getBinaryField, getByteArrayField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigDecimalField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsBigIntegerField, getExternalDecimalAsIntField, getExternalDecimalAsIntField, getExternalDecimalAsLongField, getExternalDecimalAsLongField, getExternalDecimalField, getIbmDoubleField, getIbmFloatField, getMaximumOffset, getOffset, getStringEncoding, getStringField, getStringField, getStringField, getStringField, getStringField, getStringTrimDefault, incrementOffset, popOffset, pushOffset, setOffset, setStringEncoding, setStringTrimDefault, setUseDaa, useDaa
-
Constructor Details
-
AssemblerDatatypeFactory
public AssemblerDatatypeFactory()
-
-
Method Details
-
getPackedDecimalAsBigDecimalField
public PackedDecimalAsBigDecimalField getPackedDecimalAsBigDecimalField(int length, int scale, boolean signed) Construct and return a PackedDecimalAsBigDecimalField, advancing the current offset by its byte length.- Overrides:
getPackedDecimalAsBigDecimalFieldin classDatatypeFactory- Parameters:
length- the size of the field in bytesscale- the number of implied decimal digits to the right of the decimal pointsigned- boolean true if the value is signed- Returns:
- PackedDecimalAsBigDecimalField
- See Also:
-
getPackedDecimalAsBigIntegerField
public PackedDecimalAsBigIntegerField getPackedDecimalAsBigIntegerField(int length, int scale, boolean signed) Construct and return a PackedDecimalAsBigIntegerField, advancing the current offset by its byte length.- Overrides:
getPackedDecimalAsBigIntegerFieldin classDatatypeFactory- Parameters:
length- the size of the field in bytesscale- the number of implied decimal digits to the right of the decimal pointsigned- boolean true if the value is signed- Returns:
- PackedDecimalAsBigIntegerField
- See Also:
-
getPackedDecimalAsIntField
Construct and return a PackedDecimalAsIntField, advancing the current offset by its byte length.- Overrides:
getPackedDecimalAsIntFieldin classDatatypeFactory- Parameters:
length- the size of the field in bytessigned- boolean true if the value is signed- Returns:
- PackedDecimalAsIntField
- See Also:
-
getPackedDecimalAsLongField
Construct and return a PackedDecimalAsLongField, advancing the current offset by its byte length.- Overrides:
getPackedDecimalAsLongFieldin classDatatypeFactory- Parameters:
length- the size of the field in bytessigned- boolean true if the value is signed- Returns:
- PackedDecimalAsLongField
- See Also:
-
getPackedDecimalField
Construct and return a PackedDecimalAs<*>Field, advancing the current offset by its byte length. The actual field returned is based on the length and scale.- Specified by:
getPackedDecimalFieldin classDatatypeFactory- Parameters:
length- the field length in bytesscale- the number of implied decimal digits to the right of the decimal pointsigned- true if the value is signed- Returns:
- a PackedDecimalAs<*>Field.
- Throws:
IllegalArgumentException- if length implies a precision > 31 digits.- See Also:
-
getZonedDecimalField
Construct and return a ExternalDecimalAs<*>Field, depending on the length and scale requested. Advance the current offset by its byte length.- Parameters:
length- int the length of the field in bytesscale- int the number of digits to the right of the decimal pointsigned- boolean true if the field is signed, false if unsigned.- Returns:
- Field
- See Also:
-