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:
- The user to describe a float field to the RecordFormat object.
- The RecordFormat object to describe a float field to the user.
Examples
-
FloatFieldDescription()
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float4, String)
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float4, String, String, int)
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float4, String, String, int, int)
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float8, String)
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float8, String, String, int)
- Constructs a FloatFieldDescription object.
-
FloatFieldDescription(AS400Float8, String, String, int, int)
- Constructs a FloatFieldDescription object.
-
getDecimalPositions()
- Returns the number of digits after the decimal point for this field.
-
getFLTPCN()
- Returns the value specified for the FLTPCN keyword for this field.
-
setDataType(AS400Float4)
- Sets the AS400DataType object describing this field.
-
setDataType(AS400Float8)
- Sets the AS400DataType object describing this field.
-
setDecimalPositions(int)
- Sets the number of digits after the decimal point for this field.
-
setDFT(Double)
- Sets the value for the DFT keyword for this field.
-
setDFT(Float)
- Sets the value for the DFT keyword for this field.
-
setDFTNull()
- Sets the value for the DFT keyword to be *NULL for this field.
-
setFLTPCN(String)
- Sets the value for the FLTPCN keyword for this field.
-
setLength(int)
- Sets the length of this field.
FloatFieldDescription
public FloatFieldDescription()
- Constructs a FloatFieldDescription object.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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