All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.BinaryFieldDescription

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

public class BinaryFieldDescription
extends FieldDescription
implements Serializable
The BinaryFieldDescription class represents the description of the data in a binary (integer) field. It allows: Examples


Constructor Index

 o BinaryFieldDescription()
Constructs a BinaryFieldDescription object.
 o BinaryFieldDescription(AS400Bin2, String)
Constructs a BinaryFieldDescription object.
 o BinaryFieldDescription(AS400Bin2, String, String, int)
Constructs a BinaryFieldDescription object.
 o BinaryFieldDescription(AS400Bin4, String)
Constructs a BinaryFieldDescription object.
 o BinaryFieldDescription(AS400Bin4, String, String, int)
Constructs a BinaryFieldDescription object.

Method Index

 o setDataType(AS400Bin2)
Sets the AS400DataType object describing this field.
 o setDataType(AS400Bin4)
Sets the AS400DataType object describing this field.
 o setDFT(Integer)
Sets the value for the DFT keyword for this field.
 o setDFT(Short)
Sets the value for the DFT keyword for this field.
 o setLength(int)
Sets the length of this field.

Constructors

 o BinaryFieldDescription
 public BinaryFieldDescription()
Constructs a BinaryFieldDescription object.

 o BinaryFieldDescription
 public BinaryFieldDescription(AS400Bin4 dataType,
                               String name)
Constructs a BinaryFieldDescription object. It uses the specified data type and name of the field. The length of this field is represented by the number of digits it can contain. This constructor defaults the length (as returned by getLength()) to 9. The length is used by the Record Level Access classes when creating a file from a RecordFormat object. Nine (9) is the maximum number of digits allowed for a binary field by DDS.

Parameters:
dataType - Describes the field and provides the conversion capability for the contents of the field.
name - The name of the field.
 o BinaryFieldDescription
 public BinaryFieldDescription(AS400Bin4 dataType,
                               String name,
                               String ddsName,
                               int length)
Constructs a BinaryFieldDescription object. It uses the specified data type, name, DDS name, and length of the field. This constructor is used when the field description will be used with the record level access classes.

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.
length - The number of digits that the field will hold. This is the length of the field as it would appear in a DDS description. The length must be greater than 0.
 o BinaryFieldDescription
 public BinaryFieldDescription(AS400Bin2 dataType,
                               String name)
Constructs a BinaryFieldDescription object. It uses the specified data type and name of the field. The length of this field is represented by the number of digits it can contain. This constructor defaults the length (as returned by getLength()) to 5. The length is used by the Record Level Access classes when creating a file from a RecordFormat object. Five (5) is the maximum number of digits allowed for a binary field (when represented by a bin2) by DDS.

Parameters:
dataType - Describes the field and provides the conversion capability for the contents of the field.
name - The name of the field.
 o BinaryFieldDescription
 public BinaryFieldDescription(AS400Bin2 dataType,
                               String name,
                               String ddsName,
                               int length)
Constructs a BinaryFieldDescription object. It uses the specified data type, name, DDS name, and length of the field. This constructor is used when the field description will be used with the record level access classes.

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.
length - The number of digits that the field will hold. This is the length of the field as it would appear in a DDS description. The length must be greater than 0.

Methods

 o setDataType
 public void setDataType(AS400Bin2 dataType)
Sets the AS400DataType object describing this field.

Parameters:
dataType - The AS400DataType that describes this field. The dataType cannot be null.
 o setDataType
 public void setDataType(AS400Bin4 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(Integer defaultValue)
Sets the value for the DFT keyword for this field. Use this version of setDFT() when an AS400Bin4 object was used to construct the object.

Parameters:
defaultValue - The default value for this field. The defaultValuecannot be null.
 o setDFT
 public void setDFT(Short defaultValue)
Sets the value for the DFT keyword for this field. Use this version of setDFT() when an AS400Bin2 object was used to construct the object.

Parameters:
defaultValue - The default value for this field. The defaultValuecannot be null.
 o setLength
 public void setLength(int length)
Sets the length of this field.

Parameters:
length - The length of this field. The length must be greater than zero.

All Packages  Class Hierarchy  This Package  Previous  Next  Index