com.ibm.as400.access
Class TimestampFieldDescription
- java.lang.Object
-
- com.ibm.as400.access.FieldDescription
-
- com.ibm.as400.access.TimestampFieldDescription
-
- All Implemented Interfaces:
- java.io.Serializable
public class TimestampFieldDescription extends FieldDescription implements java.io.Serializable
Represents the description of the data in a Timestamp field. The TimestampFieldDescription class allows:- The user to describe a Timestamp field to the RecordFormat object.
- The RecordFormat object to describe a Timestamp field to the user.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.ibm.as400.access.FieldDescription
ALIGN_LEFT, ALIGN_RIGHT
-
-
Constructor Summary
Constructors Constructor and Description TimestampFieldDescription()
Constructs a TimestampFieldDescription object.TimestampFieldDescription(AS400Text dataType, java.lang.String name)
Constructs a TimestampFieldDescription object.TimestampFieldDescription(AS400Text dataType, java.lang.String name, java.lang.String ddsName)
Constructs a TimestampFieldDescription object.TimestampFieldDescription(AS400Timestamp dataType, java.lang.String name)
Constructs a TimestampFieldDescription object.TimestampFieldDescription(AS400Timestamp dataType, java.lang.String name, java.lang.String ddsName)
Constructs a TimestampFieldDescription object.
-
Method Summary
Methods Modifier and Type Method and Description void
setDataType(AS400Text dataType)
Sets the AS400DataType object describing this field.void
setDataType(AS400Timestamp dataType)
Sets the AS400DataType object describing this field.void
setDFT(java.lang.String defaultValue)
Sets the value for the DFT keyword for this field.void
setDFTCurrent()
Sets the default value for this field to be the current date.void
setDFTNull()
Sets the value for the DFT keyword to be *NULL for this field.-
Methods inherited from class com.ibm.as400.access.FieldDescription
getALIAS, getALWNULL, getCOLHDG, getDataType, getDDSName, getDFT, getDFTCurrentValue, getFieldName, getKeyFieldFunctions, getLayoutAlignment, getLayoutLength, getLength, getREFFIL, getREFFLD, getREFFMT, getREFLIB, getTEXT, isDFTCurrent, isDFTNull, setALIAS, setALWNULL, setCOLHDG, setDataType, setDDSName, setFieldName, setKeyFieldFunctions, setLayoutAlignment, setLayoutAttributes, setLayoutLength, setREFFIL, setREFFLD, setREFFMT, setREFLIB, setTEXT
-
-
-
-
Constructor Detail
-
TimestampFieldDescription
public TimestampFieldDescription()
Constructs a TimestampFieldDescription object.
-
TimestampFieldDescription
public TimestampFieldDescription(AS400Text dataType, java.lang.String name)
Constructs a TimestampFieldDescription 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.
-
TimestampFieldDescription
public TimestampFieldDescription(AS400Text dataType, java.lang.String name, java.lang.String ddsName)
Constructs a TimestampFieldDescription 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.
-
TimestampFieldDescription
public TimestampFieldDescription(AS400Timestamp dataType, java.lang.String name)
Constructs a TimestampFieldDescription 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.
-
TimestampFieldDescription
public TimestampFieldDescription(AS400Timestamp dataType, java.lang.String name, java.lang.String ddsName)
Constructs a TimestampFieldDescription 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
-
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(AS400Timestamp 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.
-
-