com.ibm.as400.access

Class TimeFieldDescription

  • All Implemented Interfaces:
    java.io.Serializable


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

      • TimeFieldDescription

        public TimeFieldDescription()
        Constructs a TimeFieldDescription object.
      • TimeFieldDescription

        public TimeFieldDescription(AS400Text dataType,
                            java.lang.String name)
        Constructs a TimeFieldDescription object. It uses the data type and name of the field specified.
        Parameters:
        dataType - Describes the field and provides the conversion capability for the contents of the field.
        name - The name of the field.
      • TimeFieldDescription

        public TimeFieldDescription(AS400Text dataType,
                            java.lang.String name,
                            java.lang.String ddsName)
        Constructs a TimeFieldDescription object. It uses the data type, name, and DDS name of the field specified.
        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.
      • TimeFieldDescription

        public TimeFieldDescription(AS400Time dataType,
                            java.lang.String name)
        Constructs a TimeFieldDescription object. It uses the data type and name of the field specified.
        Parameters:
        dataType - Describes the field and provides the conversion capability for the contents of the field.
        name - The name of the field.
      • TimeFieldDescription

        public TimeFieldDescription(AS400Time dataType,
                            java.lang.String name,
                            java.lang.String ddsName)
        Constructs a TimeFieldDescription object. It uses the data type, name, and DDS name of the field specified.
        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

      • getTIMFMT

        public java.lang.String getTIMFMT()
        Returns the value specified for the TIMFMT keyword for this field.
        Returns:
        The value specified for TIMFMT for this field. If TIMFMT was not specified for this field, an empty string is returned.
      • getTIMSEP

        public java.lang.String getTIMSEP()
        Returns the value specified for the TIMSEP keyword for this field.
        Returns:
        The value specified for TIMSEP for this field. If TIMSEP was not specified for this field, an empty string is returned.
      • setDataType

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

        public void setDataType(AS400Time 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.lang.String 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.
      • setDFTCurrent

        public void setDFTCurrent()
        Sets the default value for this field to be the current date. Calling this method will replace the DFT keyword that was previously set on a call to setDFT(String) or setDFTNull().
      • 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(String) or setDFTCurrent(). Note: This field must also have its ALWNULL keyword set to true to prevent DDS errors.
      • setTIMFMT

        public void setTIMFMT(java.lang.String timeFormat)
        Sets the value to specify for the TIMFMT keyword for this field.
        Parameters:
        timeFormat - The value to specify for TIMFMT for this field. The timeFormat cannot be null.
      • setTIMSEP

        public void setTIMSEP(java.lang.String separator)
        Sets the value to specify for the TIMSEP keyword for this field.
        Parameters:
        separator - The value to specify for TIMSEP for this field. A null value indicates "no separator".