public abstract class FieldDescription
extends java.lang.Object
implements java.io.Serializable
Examples
Modifier and Type | Field and Description |
---|---|
static int |
ALIGN_LEFT
This is only used for record level writing.
|
static int |
ALIGN_RIGHT
This is only used for record level writing.
|
Modifier | Constructor and Description |
---|---|
protected |
FieldDescription()
Constructs a FieldDescription object.
|
protected |
FieldDescription(AS400DataType dataType,
java.lang.String name)
Constructs a FieldDescription object.
|
protected |
FieldDescription(AS400DataType dataType,
java.lang.String name,
java.lang.String ddsName)
Constructs a FieldDescription object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getALIAS()
Returns the value specified for the ALIAS keyword for this field.
|
boolean |
getALWNULL()
Returns the value specified for the ALWNULL keyword for this field.
|
java.lang.String |
getCOLHDG()
Returns the value specified for the COLHDG keyword for this field.
|
AS400DataType |
getDataType()
Returns the AS400DataType object describing this field, as specified on construction.
|
java.lang.String |
getDDSName()
Returns the DDS name of this field, as specified on the construct.
|
java.lang.Object |
getDFT()
Returns the value specified for the DFT keyword for this field.
|
java.lang.String |
getDFTCurrentValue()
Returns the default value setting based on the current timestamp.
|
java.lang.String |
getFieldName()
Returns the name of this field.
|
java.lang.String[] |
getKeyFieldFunctions()
Returns the string specified for any key field-level keywords for this
field.
|
int |
getLayoutAlignment()
Returns the layout alignment of this field.
|
int |
getLayoutLength()
Returns the layout length of this field.
|
int |
getLength()
Returns the length of this field.
|
java.lang.String |
getREFFIL()
Returns the value specified for the REFFIL keyword for this field.
|
java.lang.String |
getREFFLD()
Returns the value specified for the REFFLD keyword for this field.
|
java.lang.String |
getREFFMT()
Returns the value specified for the REFFMT keyword for this field.
|
java.lang.String |
getREFLIB()
Returns the value specified for the REFLIB keyword for this field.
|
java.lang.String |
getTEXT()
Returns the value specified for the TEXT keyword for this field.
|
boolean |
isDFTCurrent()
Indicates if the default value for this field is set to one of the
SQL special values of CURRENT_DATE, CURRENT_TIME, or CURRENT_TIMESTAMP.
|
boolean |
isDFTNull()
Indicates if the DFT keyword for this field is set to *NULL.
|
void |
setALIAS(java.lang.String alias)
Sets the value for the ALIAS keyword for this field.
|
void |
setALWNULL(boolean allowNull)
Sets the value for the ALWNULL keyword for this field.
|
void |
setCOLHDG(java.lang.String colHdg)
Sets the value for the COLHDG keyword for this field.
|
protected void |
setDataType(AS400DataType dataType)
Sets the AS400DataType object describing this field.
|
void |
setDDSName(java.lang.String ddsName)
Sets the DDS name of this field.
|
void |
setFieldName(java.lang.String fieldName)
Sets the name of this field.
|
void |
setKeyFieldFunctions(java.lang.String[] keyFunctions)
Sets the string to be specified for all key field-level keywords for this
field.
|
void |
setLayoutAlignment(int layoutAlignment)
Sets the layout alignment of this field.
|
void |
setLayoutAttributes(int layoutLength,
int layoutAlignment)
Sets the layout length and layout alignment of this field.
|
void |
setLayoutLength(int layoutLength)
Sets the layout length of this field.
|
void |
setREFFIL(java.lang.String refFil)
Sets the value to be specified for the REFFIL keyword for this field.
|
void |
setREFFLD(java.lang.String refFld)
Sets the value to be specified for the REFFLD keyword for this field.
|
void |
setREFFMT(java.lang.String refFmt)
Sets the value to be specified for the REFFMT keyword for this field.
|
void |
setREFLIB(java.lang.String refLib)
Sets the value to be specified for the REFLIB keyword for this field.
|
void |
setTEXT(java.lang.String text)
Sets the value to be specified for the TEXT keyword for this field.
|
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
protected FieldDescription()
protected FieldDescription(AS400DataType dataType, java.lang.String name)
dataType
- Describes the field and provides
the conversion capability for the contents of the field.name
- The name of the field.protected FieldDescription(AS400DataType dataType, java.lang.String name, java.lang.String ddsName)
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.public java.lang.String getALIAS()
public boolean getALWNULL()
public java.lang.String getCOLHDG()
setCOLHDG()
.public AS400DataType getDataType()
public java.lang.Object getDFT()
public java.lang.String getDFTCurrentValue()
public java.lang.String getDDSName()
public java.lang.String getFieldName()
public java.lang.String[] getKeyFieldFunctions()
public int getLayoutAlignment()
public int getLayoutLength()
public int getLength()
public java.lang.String getREFFIL()
public java.lang.String getREFFLD()
public java.lang.String getREFFMT()
public java.lang.String getREFLIB()
public java.lang.String getTEXT()
public boolean isDFTCurrent()
public void setALIAS(java.lang.String alias)
alias
- The alias for this field.public void setALWNULL(boolean allowNull)
allowNull
- true if a null value is allowed; false otherwise.public void setCOLHDG(java.lang.String colHdg)
colHdg
- The value for the COLHDG (column heading) keyword
for this field.String colHdg = "'Name'"; String colHdg = "'Employee' 'Number'"; String colHdg = "'Name' 'And' 'Address'";
protected void setDataType(AS400DataType dataType)
dataType
- The AS400DataType that describes this field. The dataType
cannot be null.public void setDDSName(java.lang.String ddsName)
ddsName
- The DDS name of this field. The ddsName cannot be
more than 10 characters in length.public void setFieldName(java.lang.String fieldName)
fieldName
- The name of this field. The fieldName cannot be null.public void setKeyFieldFunctions(java.lang.String[] keyFunctions)
keyFunctions
- The key field-level keywords to be
specified for this key field.
The keyFunctions must contain at least one element.public void setLayoutAlignment(int layoutAlignment)
The following special values are valid:
layoutAlignment
- The layout alignment of this field.public void setLayoutAttributes(int layoutLength, int layoutAlignment)
The following special values for the layout alignment are valid:
layoutLength
- The layout length of this field.layoutAlignment
- The layout alignment of this field.public void setLayoutLength(int layoutLength)
layoutLength
- The layout length of this field.public void setREFFIL(java.lang.String refFil)
refFil
- The value for the REFFIL (reference file) keyword
for this field.public void setREFFLD(java.lang.String refFld)
refFld
- The value for the REFFLD (reference field) keyword
for this field.public void setREFFMT(java.lang.String refFmt)
refFmt
- The value for the REFFMT (reference record format) keyword
for this field.public void setREFLIB(java.lang.String refLib)
refLib
- The value for the REFLIB (reference library) keyword
for this field.public void setTEXT(java.lang.String text)
text
- The value for the TEXT keyword
for this field. The single quotes required to
surround the TEXT keyword value are added by this class.
The text must be 50 characters or less in length.public boolean isDFTNull()