All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.FloatFieldDescription

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

public class FloatFieldDescription
extends FieldDescription
implements Serializable
The FloatFieldDescription class represents the description of the data in a float field. It allows: Examples


Constructor Index

 o FloatFieldDescription()
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float4, String)
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float4, String, String, int)
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float4, String, String, int, int)
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float8, String)
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float8, String, String, int)
Constructs a FloatFieldDescription object.
 o FloatFieldDescription(AS400Float8, String, String, int, int)
Constructs a FloatFieldDescription object.

Method Index

 o getDecimalPositions()
Returns the number of digits after the decimal point for this field.
 o getFLTPCN()
Returns the value specified for the FLTPCN keyword for this field.
 o setDataType(AS400Float4)
Sets the AS400DataType object describing this field.
 o setDataType(AS400Float8)
Sets the AS400DataType object describing this field.
 o setDecimalPositions(int)
Sets the number of digits after the decimal point for this field.
 o setDFT(Double)
Sets the value for the DFT keyword for this field.
 o setDFT(Float)
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 setFLTPCN(String)
Sets the value for the FLTPCN keyword for this field.
 o setLength(int)
Sets the length of this field.

Constructors

 o FloatFieldDescription
 public FloatFieldDescription()
Constructs a FloatFieldDescription object.

 o FloatFieldDescription
 public FloatFieldDescription(AS400Float8 dataType,
                              String name)
Constructs a FloatFieldDescription object. It uses the specified data type and name of the field.

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

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 zero.
 o FloatFieldDescription
 public FloatFieldDescription(AS400Float8 dataType,
                              String name,
                              String ddsName,
                              int length,
                              int decimalPositions)
Constructs a FloatFieldDescription object. It uses the specified data type, name, DDS name, length and decimal positions of the field.

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 zero.
decimalPositions - The number of digits to the right of the decimal point. The decimalPositions cannot be negative.
 o FloatFieldDescription
 public FloatFieldDescription(AS400Float4 dataType,
                              String name)
Constructs a FloatFieldDescription object. It uses the specified data type and name of the field.

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

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 zero.
 o FloatFieldDescription
 public FloatFieldDescription(AS400Float4 dataType,
                              String name,
                              String ddsName,
                              int length,
                              int decimalPositions)
Constructs a FloatFieldDescription object. It uses the specified data type, name, DDS name, length and decimal positions of the field.

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 zero.
decimalPositions - The number of digits to the right of the decimal point. The decimalPositions cannot be negative.

Methods

 o 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.
 o getFLTPCN
 public String getFLTPCN()
Returns the value specified for the FLTPCN keyword for this field.

Returns:
The value specified for FLTPCN for this field. Possible values are *SINGLE or *DOUBLE. If FLTPCN was not specified for this field, an empty string is returned.
 o setDataType
 public void setDataType(AS400Float4 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(AS400Float8 dataType)
Sets the AS400DataType object describing this field.

Parameters:
dataType - The AS400DataType that describes this field. The dataType cannot be null.
 o setDecimalPositions
 public void setDecimalPositions(int decimalPositions)
Sets the number of digits after the decimal point for this field.

Parameters:
decimalPositions - The number of digits after the decimal point. The decimalPositions cannot be less than zero.
 o setFLTPCN
 public void setFLTPCN(String floatPrecision)
Sets the value for the FLTPCN keyword for this field.

Parameters:
floatPrecision - The value to set for the FLTPCN keyword for this field. Possible values are *SINGLE or *DOUBLE. The floatPrecision cannot be null.
 o setDFT
 public void setDFT(Double defaultValue)
Sets the value for the DFT keyword for this field. Use this version of setDFT() when an AS400Float8 was used to construct the object.

Parameters:
defaultValue - The default value for this field. The defaultValue cannot be null. To set a default value of *NULL, use the setDFTNull() method.
 o setDFT
 public void setDFT(Float defaultValue)
Sets the value for the DFT keyword for this field. Use this version of setDFT() when an AS400Float4 was used to construct the object.

Parameters:
defaultValue - The default value for this field. The defaultValue cannot be null. 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 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