All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.HexFieldDescription

java.lang.Object
   |
   +----com.ibm.as400.access.FieldDescription
           |
           +----com.ibm.as400.access.HexFieldDescription

public class HexFieldDescription
extends FieldDescription
implements VariableLengthFieldDescription, Serializable
The HexFieldDescription class represents the description of the data in a hexadecimal field. It allows: Examples


Constructor Index

 o HexFieldDescription()
Constructs a HexFieldDescription object.
 o HexFieldDescription(AS400ByteArray, String)
Constructs a HexFieldDescription object.
 o HexFieldDescription(AS400ByteArray, String, String)
Constructs a HexFieldDescription object.

Method Index

 o getVARLEN()
Returns the value specified for the VARLEN keyword for this field.
 o isVariableLength()
Indicates if the field is a variable-length field.
 o setDataType(AS400ByteArray)
Sets the AS400DataType object describing this field.
 o setDFT(byte[])
Sets the value for the DFT keyword for this field.
 o setDFTNull()
Sets the value for the DFT keyword to be *NULL for this field.
 o setVariableLength(boolean)
Indicates that the field is a variable-length field.
 o setVARLEN(int)
Sets the value to specify for the VARLEN keyword for this field.

Constructors

 o HexFieldDescription
 public HexFieldDescription()
Constructs a HexFieldDescription object.

 o HexFieldDescription
 public HexFieldDescription(AS400ByteArray dataType,
                            String name)
Constructs a HexFieldDescription object. It uses the specified data type and name of the field. The length of the field will be the length specified on the AS400ByteArray object.

Parameters:
dataType - Describes the field and provides the conversion capability for the contents of the field.
name - The name of the field.
 o HexFieldDescription
 public HexFieldDescription(AS400ByteArray dataType,
                            String name,
                            String ddsName)
Constructs a HexFieldDescription object. It uses the specified data type, name, and DDS name of the field. The length of the field will be the length specified on the AS400ByteArray object.

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.

Methods

 o getVARLEN
 public int getVARLEN()
Returns the value specified for the VARLEN keyword for this field.

Returns:
The value specified for VARLEN for this field. If VARLEN was not specified for this field, 0 is returned.
 o isVariableLength
 public boolean isVariableLength()
Indicates if the field is a variable-length field.

Returns:
true if the field is a variable-length field; false otherwise.
 o setDataType
 public void setDataType(AS400ByteArray dataType)
Sets the AS400DataType object describing this field.

Parameters:
dataType - The AS400DataType that describes this field. The dataType cannot be null.
 o setDFT
 public void setDFT(byte defaultValue[])
Sets the value for the DFT keyword for this field.

Parameters:
defaultValue - The default value for this field. The length of defaultValue must be greater than zero. To set a default value of *NULL, use the setDFTNull() method.
 o 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.

 o setVariableLength
 public void setVariableLength(boolean value)
Indicates that the field is a variable-length field.

Parameters:
value - true if the field is a variable-length field; false otherwise.
 o setVARLEN
 public void setVARLEN(int varLen)
Sets the value to specify for the VARLEN keyword for this field.

Parameters:
varLen - The value to specify for the VARLEN keyword for this field. The varLen cannot be less than zero.

All Packages  Class Hierarchy  This Package  Previous  Next  Index