Set the contents of a Record object by using the setField() method in your Java™ program.
SetField() method
The Java program must specify the appropriate Java object for the field being set. The following table shows the appropriate Java object for each possible field type.
Field Type (DDS) | Field Type (FieldDescription) | Java Object |
---|---|---|
BINARY (B), length <= 4 | BinaryFieldDescription | Short |
BINARY (B), length >= 5 | BinaryFieldDescription | Integer |
CHARACTER (A) | CharacterFieldDescription | String |
DBCS Either (E) | DBCSEitherFieldDescription | String |
DBCS Graphic (G) | DBCSGraphicFieldDescription | String |
DBCS Only (J) | DBCSOnlyFieldDescription | String |
DBCS Open (O) | DBCSOpenFieldDescription | String |
DATE (L) | DateFieldDescription | String |
FLOAT (F), single precision | FloatFieldDescription | Float |
FLOAT (F), double precision | FloatFieldDescription | Double |
HEXADECIMAL (H) | HexFieldDescription | byte[] |
PACKED DECIMAL (P) | PackedDecimalFieldDescription | BigDecimal |
TIME (T) | TimeDecimalFieldDescription | String |
TIMESTAMP (Z) | TimestampDecimalFieldDescription | String |
ZONED DECIMAL (P) | ZonedDecimalFieldDescription | BigDecimal |