Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.generator.model
Class RPGFieldType

java.lang.Object
  extended by com.ibm.etools.iseries.edit.generator.model.RPGCommon
      extended by com.ibm.etools.iseries.edit.generator.model.RPGFieldType
All Implemented Interfaces:
IDSpec

public class RPGFieldType
extends RPGCommon
implements IDSpec


Field Summary
protected  boolean array
           
protected  RPGSimpleArray arrayField
           
protected  String arraySize
           
protected  String ccsidNbr
           
protected  String className
           
static String Copyright
           
protected  String dataType
           
protected  String dateFormat
           
protected  int decimals
           
protected  String fmtString
           
protected  int from
           
protected  boolean isDecimalAllowed
           
protected  boolean isLengthAllowed
           
protected  Vector keywords
           
protected  int length
           
protected  boolean likeAnother
           
protected  String likeKeyword
           
protected  String otherField
           
protected  boolean packeven
           
protected  boolean procPointer
           
protected  String sample
           
protected  String separator
           
protected  String timeFormat
           
protected  int to
           
protected  char typeChar
           
protected  int typeIndex
           
 
Fields inherited from class com.ibm.etools.iseries.edit.generator.model.RPGCommon
fieldName, purpose
 
Fields inherited from interface com.ibm.etools.iseries.edit.generator.model.IDSpec
DATEFMT_DMY, DATEFMT_EUR, DATEFMT_ISO, DATEFMT_JIS, DATEFMT_JUL, DATEFMT_MDY, DATEFMT_NONE, DATEFMT_USA, DATEFMT_YMD, DT_AMPERSAND, DT_COLON, DT_COMMA, DT_DASH, DT_NONE, DT_PERIOD, DT_SLASH, INFDS_DB, INFDS_DSPF_ATTR, INFDS_DSPF_DEV, INFDS_FILE, INFDS_ICF_ATTR, INFDS_ICF_DEV, INFDS_IO, INFDS_OPEN, INFDS_PRTF, MSG_ERR_REQ_FIELD, RPGARRAYKWD_B, RPGARRAYKWD_F, RPGARRAYKWD_I, RPGARRAYKWD_L, RPGARRAYKWD_P, RPGARRAYKWD_R, RPGARRAYKWD_S, RPGARRAYKWD_U, RPGTYPE_A, RPGTYPE_AV, RPGTYPE_B, RPGTYPE_C, RPGTYPE_CV, RPGTYPE_D, RPGTYPE_F, RPGTYPE_G, RPGTYPE_GV, RPGTYPE_I, RPGTYPE_I2, RPGTYPE_N, RPGTYPE_P, RPGTYPE_S, RPGTYPE_STAR, RPGTYPE_T, RPGTYPE_U, RPGTYPE_U2, RPGTYPE_Z, TIMEFMT_EUR, TIMEFMT_HMS, TIMEFMT_ISO, TIMEFMT_JIS, TIMEFMT_NONE, TIMEFMT_USA
 
Constructor Summary
RPGFieldType()
           
 
Method Summary
 void createNewArray()
          Sets this FieldDSpec to be an array, and initializes the array-part of the FieldDSpec.
 RPGSimpleArray getArray()
           
 String getArraySize()
           
 String getCcsidNbr()
           
 String getClassName()
           
 String getDataType()
           
 String getDateFormat()
           
 int getDecimals()
           
 Vector getFieldTypeKeywords()
          get all keywords of this field type
 String getFmtString()
           
 int getFrom()
           
 Vector getKeywords()
           
 int getLength()
           
 String getLikeKeyword()
           
 String getOtherField()
           
 String getSample()
           
 String getSeparator()
           
 String getTimeFormat()
           
 int getTo()
           
 char getTypeChar()
           
 int getTypeIndex()
           
 boolean isArray()
           
 boolean isDecimalAllowed()
           
 boolean isLengthAllowed()
           
 boolean isLikeAnother()
           
 boolean isPackeven()
           
 boolean isProcPointer()
           
 void setArray(boolean b)
          Sets whether this FieldDSpec is an array or not.
 void setArraySize(String size)
          Sets the array size of this FieldDSpec, if it is an array.
 void setCcsidNbr(String string)
           
 void setClassName(String string)
           
 void setDataType(String type)
          Sets the data type of the field.
 void setDateFormat(String format)
          Sets the date format of the field, if it is of data type Date, has no effect otherwise.
 void setDecimalAllowed(boolean b)
           
 void setDecimals(int i)
          For binary, packed decimal, and zoned decimal types, sets the number of decimals, otherwise has no effect.
 void setFmtString(String string)
           
 void setFrom(int i)
           
 void setKeywords(Vector keywds)
           
 void setLength(int i)
          Sets the length of the field.
 void setLengthAllowed(boolean b)
           
 void setLikeAnother(boolean b)
          Sets whether this field is defined like another field (LIKE).
 void setLikeKeyword(String string)
           
 void setOtherField(String name)
          If this field is defined to be like another field, sets the name of the other field, otherwise has no effect.
 void setPackeven(boolean b)
           
 void setProcPointer(boolean b)
          Sets whether or not this field is a procedure pointer.
 void setSample(String sample)
           
 void setSeparator(String string)
          Sets the separator character for the Date or Time, if the field is one of these data types, otherwise has no effect.
 void setTimeFormat(String format)
          Sets the time format of the field, if it is of the Time data type, has no effect otherwise.
 void setTo(int i)
           
 void setTypeChar(char c)
           
 void setTypeIndex(int index)
           
 
Methods inherited from class com.ibm.etools.iseries.edit.generator.model.RPGCommon
getMessages, getName, getPurpose, isValid, setFieldName, setPurpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

likeAnother

protected boolean likeAnother

likeKeyword

protected String likeKeyword

className

protected String className

ccsidNbr

protected String ccsidNbr

otherField

protected String otherField

dataType

protected String dataType

typeChar

protected char typeChar

typeIndex

protected int typeIndex

length

protected int length

decimals

protected int decimals

from

protected int from

to

protected int to

arraySize

protected String arraySize

keywords

protected Vector keywords

dateFormat

protected String dateFormat

timeFormat

protected String timeFormat

fmtString

protected String fmtString

separator

protected String separator

sample

protected String sample

procPointer

protected boolean procPointer

array

protected boolean array

packeven

protected boolean packeven

arrayField

protected RPGSimpleArray arrayField

isLengthAllowed

protected boolean isLengthAllowed

isDecimalAllowed

protected boolean isDecimalAllowed
Constructor Detail

RPGFieldType

public RPGFieldType()
Method Detail

getDataType

public String getDataType()
Returns:
The data type of the field. This is one of the constants defined in the interface IDSpec.
See Also:
IDSpec, setDataType(String)

getDateFormat

public String getDateFormat()
Returns:
The date format of the field if it is of data type Date then "", null otherwise. Note that the date format constants are defined in the IDSpec interface.
See Also:
setDateFormat(String), IDSpec

getDecimals

public int getDecimals()
Returns:
For binary, packed decimal, and zoned decimal types, returns the number of decimals, otherwise returns 0.
See Also:
setDecimals(int)

getLength

public int getLength()
Returns:
The length of the field.
See Also:
setLength(int)

isLikeAnother

public boolean isLikeAnother()
Returns:
Whether this field is defined like another field (LIKE).
See Also:
setLikeAnother(boolean), getOtherField(), setOtherField(String)

getOtherField

public String getOtherField()
Returns:
If this field is defined to be like another field, returns the name of the other field, otherwise returns ""
See Also:
isLikeAnother(), setLikeAnother(boolean), setOtherField(String)

isProcPointer

public boolean isProcPointer()
Returns:
Whether or not this field is a procedure pointer. Note that a field can only be a procedure pointer if it is of type Pointer.
See Also:
setProcPointer(boolean)

getSeparator

public String getSeparator()
Returns:
The separator character for the Date or Time, if the field is one of these data types, otherwise returns "". Note that the separator constants are defined in the IDSpec interface.
See Also:
setSeparator(String), IDSpec

getTimeFormat

public String getTimeFormat()
Returns:
The time format of the field, if it is of the Time data type, "" otherwise. Note that the format is one of the constants defined in the IDSpec interface.
See Also:
setTimeFormat(String), IDSpec

setDataType

public void setDataType(String type)
Sets the data type of the field.

Parameters:
type - one of the constants defined in the interface IDSpec
See Also:
IDSpec, getDataType()

setDateFormat

public void setDateFormat(String format)
Sets the date format of the field, if it is of data type Date, has no effect otherwise.

Parameters:
format - one of the date format constants defined in the interface IDSpec
See Also:
getDateFormat()

setDecimals

public void setDecimals(int i)
For binary, packed decimal, and zoned decimal types, sets the number of decimals, otherwise has no effect.

Parameters:
i - the number of decimals
See Also:
getDecimals()

setLength

public void setLength(int i)
Sets the length of the field.

Parameters:
i - the new length of the field
See Also:
getLength()

setLikeAnother

public void setLikeAnother(boolean b)
Sets whether this field is defined like another field (LIKE).

Parameters:
b - is true if and only if this field is defined like another
See Also:
isLikeAnother(), getOtherField(), setOtherField(String)

setOtherField

public void setOtherField(String name)
If this field is defined to be like another field, sets the name of the other field, otherwise has no effect.

Parameters:
name - the name of the other field
See Also:
isLikeAnother(), setLikeAnother(boolean), getOtherField()

setProcPointer

public void setProcPointer(boolean b)
Sets whether or not this field is a procedure pointer. Note that a field can only be a procedure pointer if it is of type Pointer.

Parameters:
b - is true if and only if this field is a procedure pointer
See Also:
isProcPointer()

setSeparator

public void setSeparator(String string)
Sets the separator character for the Date or Time, if the field is one of these data types, otherwise has no effect.

Parameters:
string - One of the separator constants defined in the IDSpec interface
See Also:
getSeparator(), IDSpec

setTimeFormat

public void setTimeFormat(String format)
Sets the time format of the field, if it is of the Time data type, has no effect otherwise.

Parameters:
format - one of the time format constants defined in the IDSpec interface.
See Also:
getTimeFormat(), IDSpec

isArray

public boolean isArray()
Returns:
Whether this FieldDSpec is an array or not.
See Also:
setArray(boolean), createNewArray(), getArray()

setArray

public void setArray(boolean b)
Sets whether this FieldDSpec is an array or not.

Parameters:
b - is true if and only if this FieldDSpec will be and array.
See Also:
isArray(), createNewArray(), getArray()

setArraySize

public void setArraySize(String size)
Sets the array size of this FieldDSpec, if it is an array.

Parameters:
size - the array size of this Field type
See Also:
isArray(), createNewArray(), getArray()

createNewArray

public void createNewArray()
Sets this FieldDSpec to be an array, and initializes the array-part of the FieldDSpec. Note that if this FieldDSpec was already an array, any data previously in the array-part of this FieldDSpec is lost upon calling this method.

See Also:
isArray(), setArray(boolean), getArray()

getArray

public RPGSimpleArray getArray()
Returns:
The array object associated with this field, if this field is an array. Otherwise, returns null.
See Also:
isArray(), setArray(boolean), createNewArray()

getTypeIndex

public int getTypeIndex()
Returns:

setTypeIndex

public void setTypeIndex(int index)
Parameters:
i -

getArraySize

public String getArraySize()
Returns:
the array size of this Field type

getTypeChar

public char getTypeChar()
Returns:

setTypeChar

public void setTypeChar(char c)
Parameters:
c -

getSample

public String getSample()
Returns:

setSample

public void setSample(String sample)
Parameters:
string -

getFmtString

public String getFmtString()
Returns:

setFmtString

public void setFmtString(String string)
Parameters:
string -

getKeywords

public Vector getKeywords()
Returns:

getFieldTypeKeywords

public Vector getFieldTypeKeywords()
get all keywords of this field type

Returns:
all keywords

setKeywords

public void setKeywords(Vector keywds)
Parameters:
vector -

getCcsidNbr

public String getCcsidNbr()
Returns:

getClassName

public String getClassName()
Returns:

getLikeKeyword

public String getLikeKeyword()
Returns:

setCcsidNbr

public void setCcsidNbr(String string)
Parameters:
string -

setClassName

public void setClassName(String string)
Parameters:
string -

setLikeKeyword

public void setLikeKeyword(String string)
Parameters:
string -

isDecimalAllowed

public boolean isDecimalAllowed()
Returns:

isLengthAllowed

public boolean isLengthAllowed()
Returns:

setDecimalAllowed

public void setDecimalAllowed(boolean b)
Parameters:
b -

setLengthAllowed

public void setLengthAllowed(boolean b)
Parameters:
b -

getFrom

public int getFrom()
Returns:

getTo

public int getTo()
Returns:

setFrom

public void setFrom(int i)
Parameters:
i -

setTo

public void setTo(int i)
Parameters:
i -

isPackeven

public boolean isPackeven()
Returns:

setPackeven

public void setPackeven(boolean b)
Parameters:
b -

Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.