com.ibm.as400.access

Class ZonedDecimalFieldDescription

  • All Implemented Interfaces:
    java.io.Serializable


    public class ZonedDecimalFieldDescription
    extends FieldDescription
    implements java.io.Serializable
    Represents the description of the data in a zoned decimal field. The ZonedDecimalFieldDescription class allows:
    • The user to describe a zoned decimal field to the RecordFormat object.
    • The RecordFormat object to describe a zoned decimal field to the user.
    Click here to see an example.
    See Also:
    Serialized Form
    • Constructor Detail

      • ZonedDecimalFieldDescription

        public ZonedDecimalFieldDescription()
        Constructs a ZonedDecimalFieldDescription object.
      • ZonedDecimalFieldDescription

        public ZonedDecimalFieldDescription(AS400ZonedDecimal dataType,
                                    java.lang.String name)
        Constructs a ZonedDecimalFieldDescription object. It uses the data type and name of the field specified. The number of digits and the number of decimal positions will be determined from dataType.
        Parameters:
        dataType - Describes the field and provides the conversion capability for the contents of the field.
        name - The name of the field.
      • ZonedDecimalFieldDescription

        public ZonedDecimalFieldDescription(AS400ZonedDecimal dataType,
                                    java.lang.String name,
                                    java.lang.String ddsName)
        Constructs a ZonedDecimalFieldDescription object. It uses the data type, name, and DDS name of the field specified. The number of digits and the number of decimal positions will be determined from dataType.
        Parameters:
        dataType - Describes the field and provides the conversion capability for the contents of the field.
        name - The name of the field.
        ddsName - The DDS name of this field. This is the name of the field as it would appear in a DDS description of the field. The length of ddsName must be 10 characters or less.
    >
    • Method Detail

      • getDecimalPositions

        public int getDecimalPositions()
        Returns the number of digits after the decimal point for this field.
        Returns:
        The number of digits after the decimal point.
      • setDataType

        public void setDataType(AS400ZonedDecimal dataType)
        Sets the AS400DataType object describing this field.
        Parameters:
        dataType - The AS400DataType that describes this field. The dataType cannot be null.
      • setDFT

        public void setDFT(java.math.BigDecimal defaultValue)
        Sets the value for the DFT keyword for this field.
        Parameters:
        defaultValue - The default value for this field. The defaultValue cannot be null. To set a default value of *NULL, use the setDFTNull() method.
      • setDFTNull

        public void setDFTNull()
        Sets the value for the DFT keyword to be *NULL for this field. Calling this method will replace the DFT keyword that was previously set on a call to setDFT(). Note: This field must also have its ALWNULL keyword set to true to prevent DDS errors.