iSeries Remote Systems
v6.0.1

com.ibm.etools.iseries.editor.generator.model
Class DataStructureDSpec

java.lang.Object
  extended bycom.ibm.etools.iseries.editor.generator.model.RPGCommon
      extended bycom.ibm.etools.iseries.editor.generator.model.DataStructureDSpec
All Implemented Interfaces:
IDSpec
Direct Known Subclasses:
DataAreaDSpec

public class DataStructureDSpec
extends RPGCommon
implements IDSpec


Field Summary
protected  boolean altSeq
           
protected  boolean based
           
protected  String basedName
           
protected  boolean dataArea
           
protected  String dataAreaName
           
protected  boolean exportField
           
protected  String exportFieldName
           
protected  boolean importField
           
protected  String importFieldName
           
protected  boolean inz
           
protected  int occurs
           
protected  boolean qualified
           
protected  boolean staticValue
           
protected  Vector subFields
           
 
Fields inherited from class com.ibm.etools.iseries.editor.generator.model.RPGCommon
fieldName, purpose
 
Fields inherited from interface com.ibm.etools.iseries.editor.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
DataStructureDSpec()
           
 
Method Summary
 void addSubField(SubField sf)
          Adds sb to the collection of SubFields belonging to this data structure.
 String getBasedName()
           
 String getDataAreaName()
           
 String getExportFieldName()
           
 String getImportFieldName()
           
 int getOccurs()
           
 SubField getSubField(int i)
           
 Vector getSubFields()
           
 boolean ignoreAltSeq()
           
 boolean isAssociatedWithDataArea()
           
 boolean isBased()
           
 boolean isExportField()
           
 boolean isImportField()
           
 boolean isInz()
           
 boolean isQualified()
           
 boolean isStatic()
           
 boolean isValid()
           
 void removeSubField(int i)
          Removes the i'th SubField from the collection of SubFields belonging to this data structure
 void removeSubField(SubField sf)
          Removes sf from the collection of SubFields belonging to this data structure, or has no effect if sf is not in the collection
 void setAssociatedWithDataArea(boolean b)
          Sets whether the data structure is associated with a data area (*DTAARA)
 void setBased(boolean b)
          Sets whether the memory address of the data structure is based on the current address in a basing pointer field (BASED)
 void setBasedName(String name)
          Sets the name of the basing pointer field, if the data structure is declared to be based on the contents therein, has no effect otherwise
 void setDataAreaName(String name)
          If the data structure is associated with a data area, sets the name of the data area, otherwise has no effect.
 void setExportField(boolean accessible)
          Sets whether this data structure is available or accessible to other modules
 void setExportFieldName(String name)
          Sets the name of this field given to external callers, if the data structure is available/accessible to other modules, has no effect otherwise.
 void setIgnoreAltSeq(boolean ignore)
          Sets whether or not to ignore alternating collating sequence for this data structure
 void setImportField(boolean b)
          Sets whether this data structure is defined in other modules and bound into this program or service program.
 void setImportFieldName(String name)
          Sets the name of the field given to external callers, if the field is defined in another module, has no effect otherwise.
 void setInz(boolean initialize)
          Sets whether or not to initialize all subfields to values dependent on their types, ie: 0 for numeric, blanks for characters, etc.
 void setOccurs(int i)
          Sets the number of occurrences of this data structure.
 void setQualified(boolean b)
          Sets whether or not to qualify data structure subfields using the data structure name.
 void setStatic(boolean b)
          Sets whether this data structure holds its data value between procedure calls.
 void swapSubFields(int i, int j)
          Swaps the i'th and j'th subfields in the list of subfields.
 
Methods inherited from class com.ibm.etools.iseries.editor.generator.model.RPGCommon
getMessages, getName, getPurpose, setFieldName, setPurpose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

altSeq

protected boolean altSeq

staticValue

protected boolean staticValue

qualified

protected boolean qualified

inz

protected boolean inz

based

protected boolean based

basedName

protected String basedName

dataArea

protected boolean dataArea

dataAreaName

protected String dataAreaName

importField

protected boolean importField

importFieldName

protected String importFieldName

exportField

protected boolean exportField

exportFieldName

protected String exportFieldName

occurs

protected int occurs

subFields

protected Vector subFields
Constructor Detail

DataStructureDSpec

public DataStructureDSpec()
Method Detail

ignoreAltSeq

public boolean ignoreAltSeq()
Returns:
Whether or not to ignore the alternate collating sequence specified on the control specification for this field. (ALTSEQ(*NONE))
See Also:
setIgnoreAltSeq(boolean b)

isBased

public boolean isBased()
Returns:
Whether the memory address of the data structure is based on the current address in a basing pointer field (BASED)
See Also:
getBasedName(), setBasedName(String), setBased(boolean)

getBasedName

public String getBasedName()
Returns:
The name of the basing pointer field, if the data structure is based on the contents therein, "" otherwise.
See Also:
isBased(), setBasedName(String), setBased(boolean)

isAssociatedWithDataArea

public boolean isAssociatedWithDataArea()
Returns:
Whether the data structure is associated with a data area (*DTAARA)
See Also:
setAssociatedWithDataArea(boolean), setDataAreaName(String), getDataAreaName()

getDataAreaName

public String getDataAreaName()
Returns:
If the data structure is associated with a data area, returns the name of the data area, or "*LDA" (local data area) if one has not been specified. If the data structure is not currently associated with a data area, returns "".
See Also:
isAssociatedWithDataArea(), setDataAreaName(String), setAssociatedWithDataArea(boolean)

isExportField

public boolean isExportField()
Returns:
Whether this data structure is available or accessible to other modules
See Also:
getExportFieldName(), setExportFieldName(String), setExportField(boolean)

getExportFieldName

public String getExportFieldName()
Returns:
The name of this field given to external callers, if the data structure is available/accessible to other modules, "" otherwise.
See Also:
isExportField(), setExportFieldName(String), setExportField(boolean)

isImportField

public boolean isImportField()
Returns:
Whether this data structure is defined in other modules and bound into this program or service program.
See Also:
setImportField(boolean), getImportFieldName(), setImportFieldName(String)

getImportFieldName

public String getImportFieldName()
Returns:
The name of the field given to external callers, if the field is defined in another module, "" otherwise.
See Also:
setImportFieldName(String), isImportField(), setImportField(boolean)

isInz

public boolean isInz()
Returns:
Whether or not to initialize all subfields to values dependent on their types, ie: 0 for numeric, blanks for characters, etc.
See Also:
setInz(boolean)

getOccurs

public int getOccurs()
Returns:
The number of occurrences of this data structure.
See Also:
setOccurs(int)

isQualified

public boolean isQualified()
Returns:
Whether or not to qualify data structure subfields using data structure name.
See Also:
setQualified(boolean)

isStatic

public boolean isStatic()
Returns:
Whether this data structure holds its data value between procedure calls.
See Also:
setStatic(boolean)

getSubFields

public Vector getSubFields()
Returns:
The set of subfields in the data structure.
See Also:
SubField

getSubField

public SubField getSubField(int i)
Parameters:
i - the index of the SubField to return
Returns:
the i'th SubField in the collection of subfields in the data structure.

setIgnoreAltSeq

public void setIgnoreAltSeq(boolean ignore)
Sets whether or not to ignore alternating collating sequence for this data structure

Parameters:
ignore - true for ignore or ALTSEQ(*NONE), false otherwise
See Also:
ignoreAltSeq()

setBased

public void setBased(boolean b)
Sets whether the memory address of the data structure is based on the current address in a basing pointer field (BASED)

Parameters:
b - is true if the data structure is BASED, false otherwise
See Also:
isBased(), getBasedName(), setBasedName(String)

setBasedName

public void setBasedName(String name)
Sets the name of the basing pointer field, if the data structure is declared to be based on the contents therein, has no effect otherwise

Parameters:
name - the name of the basing pointer field
See Also:
getBasedName(), #getBased(), setBased(boolean)

setAssociatedWithDataArea

public void setAssociatedWithDataArea(boolean b)
Sets whether the data structure is associated with a data area (*DTAARA)

Parameters:
b - true if the data structure is to be associated with a data area, false otherwise
See Also:
isAssociatedWithDataArea(), getDataAreaName(), #setDataAreaName()

setDataAreaName

public void setDataAreaName(String name)
If the data structure is associated with a data area, sets the name of the data area, otherwise has no effect.

Parameters:
name - The name of the data area.
See Also:
isAssociatedWithDataArea(), getDataAreaName(), setAssociatedWithDataArea(boolean)

setExportField

public void setExportField(boolean accessible)
Sets whether this data structure is available or accessible to other modules

Parameters:
accessible - true if the data structure is available/accessible to other modules, false otherwise
See Also:
isExportField(), getExportFieldName(), setExportFieldName(String)

setExportFieldName

public void setExportFieldName(String name)
Sets the name of this field given to external callers, if the data structure is available/accessible to other modules, has no effect otherwise.

Parameters:
name - the name of the field given to external callers
See Also:
isExportField(), getExportFieldName(), setExportField(boolean)

setImportField

public void setImportField(boolean b)
Sets whether this data structure is defined in other modules and bound into this program or service program.

Parameters:
b - true if this data structure is defined in other modules, false otherwise
See Also:
isImportField(), getImportFieldName(), setImportFieldName(String)

setImportFieldName

public void setImportFieldName(String name)
Sets the name of the field given to external callers, if the field is defined in another module, has no effect otherwise.

Parameters:
name - the name of the field given to external callers
See Also:
isImportField(), getImportFieldName(), setImportField(boolean)

setInz

public void setInz(boolean initialize)
Sets whether or not to initialize all subfields to values dependent on their types, ie: 0 for numeric, blanks for characters, etc.

Parameters:
initialize - true if the subfields are to be initialized to values dependent on their types, false if they are to be initialized to blanks only
See Also:
isInz()

setOccurs

public void setOccurs(int i)
Sets the number of occurrences of this data structure. Pre: i > 0

Parameters:
i - the number of occurrences
See Also:
getOccurs()

setQualified

public void setQualified(boolean b)
Sets whether or not to qualify data structure subfields using the data structure name.

Parameters:
b - true if the subfields will be qualified using the data structure name, false otherwise
See Also:
isQualified()

setStatic

public void setStatic(boolean b)
Sets whether this data structure holds its data value between procedure calls.

Parameters:
b - true if the data structure is static, false otherwise
See Also:
isStatic()

addSubField

public void addSubField(SubField sf)
Adds sb to the collection of SubFields belonging to this data structure.

Parameters:
sf - the SubField to add.
See Also:
getSubFields(), SubField, removeSubField(int)

removeSubField

public void removeSubField(int i)
Removes the i'th SubField from the collection of SubFields belonging to this data structure

Parameters:
i - the index of the SubField to remove

removeSubField

public void removeSubField(SubField sf)
Removes sf from the collection of SubFields belonging to this data structure, or has no effect if sf is not in the collection

Parameters:
sf - the SubField to remove.

swapSubFields

public void swapSubFields(int i,
                          int j)
Swaps the i'th and j'th subfields in the list of subfields.

Parameters:
i - the position of the subfield that will be swapped with the j'th subfield
j - the position of the subfield that will be swapped with the i'th subfield

isValid

public boolean isValid()
Overrides:
isValid in class RPGCommon
Returns:
Whether or not this data structure is well defined, ie: all required fields have been filled in, and there are no contradictory boolean fields.

iSeries Remote Systems
v6.0.1

Copyright © 2005 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.