All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.as400.access.CharacterFieldDescription
java.lang.Object
|
+----com.ibm.as400.access.FieldDescription
|
+----com.ibm.as400.access.CharacterFieldDescription
- public class CharacterFieldDescription
- extends FieldDescription
- implements VariableLengthFieldDescription, Serializable
The CharacterFieldDescription class represents the description of the data in a character field.
It allows:
- The user to describe a character field to the RecordFormat object.
- The RecordFormat object to describe a character field to the user.
Examples
-
CharacterFieldDescription()
- Constructs a CharacterFieldDescription object.
-
CharacterFieldDescription(AS400Text, String)
- Constructs a CharacterFieldDescription object.
-
CharacterFieldDescription(AS400Text, String, String)
- Constructs a CharacterFieldDescription object.
-
getCCSID()
- Returns the value specified for the CCSID keyword for this field.
-
getVARLEN()
- Returns the value specified for the VARLEN keyword for this field.
-
isVariableLength()
- Indicates if the field is a variable-length field.
-
setCCSID(String)
- Sets the value for the CCSID keyword for this field.
-
setDataType(AS400Text)
- Sets the AS400DataType object describing this field.
-
setDFT(String)
- Sets the value for the DFT keyword for this field.
-
setVariableLength(boolean)
- Sets the value that indicates if the field is a variable length field.
-
setVARLEN(int)
- Sets the value to specify for the VARLEN keyword for this field.
CharacterFieldDescription
public CharacterFieldDescription()
- Constructs a CharacterFieldDescription object.
CharacterFieldDescription
public CharacterFieldDescription(AS400Text dataType,
String name)
- Constructs a CharacterFieldDescription object. It uses the specified data type and name of the field.
The length of the field will be the length specified on the AS400Text object.
- Parameters:
- dataType - Describes the field and provides
the conversion capability for the contents of the field.
- name - The name of the field.
CharacterFieldDescription
public CharacterFieldDescription(AS400Text dataType,
String name,
String ddsName)
- Constructs a CharacterFieldDescription object. It uses the specified data type of the field, name,
and DDS name. The length of the field will be the length specified on the AS400Text
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.
getCCSID
public String getCCSID()
- Returns the value specified for the CCSID keyword for this field.
- Returns:
- The value specified for the CCSID keyword
for this field. If CCSID was not specified for this field,
an empty string is returned.
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.
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.
setCCSID
public void setCCSID(String ccsid)
- Sets the value for the CCSID keyword for this field.
- Parameters:
- ccsid - The value for the CCSID keyword
for this field.
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.
setDFT
public void setDFT(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.
setVariableLength
public void setVariableLength(boolean value)
- Sets the value that indicates if the field is a variable length field.
- Parameters:
- value - true if the field is a variable length field; false otherwise.
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