|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor com.ibm.etools.iseries.comm.ISeriesListFields
public class ISeriesListFields
A class for listing fields in a *FILE object on an ISeries. This is done by calling the system API QUSLFLD.
You must first decide how much information you want returned for each
field found in the given file(s) and then call the appropriate method for that list type.
LIST_NAMES
-> return only the field names. Use getListNameOnly(ISeriesAbstractFilterString)
LIST_BASIC
-> return commonly needed field information. getList(ISeriesAbstractFilterString)
LIST_NAMES
-> returns objects that implement IISeriesHostFieldNameOnly
LIST_BASIC
-> returns objects that implement IISeriesHostFieldBasic
For some callers, it is important for performance to get a list of their own objects, versus a list of objects of a hard-coded class that
just needs to be subsequently traversed and the data copied. To enable this, use the method
getList(ISeriesAbstractFilterString, IISeriesHostListBaseFactory, IISeriesHostListStatusCallback)
. This requires an object implementing
IISeriesHostListFieldFactory
which is
used to create each object returned in the list. Depending on the list type (LIST_NAME, LIST_BASIC) specified
in the third parameter, either the createNameOnlyObject or createFielddObject method will be
called to create each object returned. These must return objects that implement IISeriesHostFieldNameOnly or IISeriesHostFieldBasic
respectively.
Finally, it is possible to list fields in not just one file, but multiple files if a generic library, file or record name is specified. In this case, GUI callers
can specify an object to call back to as the list processing starts for each record. This is handy for updating status dialogs. The
method to use in this case is: getList(ISeriesAbstractFilterString, IISeriesHostListBaseFactory, IISeriesHostListStatusCallback)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.ibm.etools.iseries.comm.ISeriesAbstractHostAPIProcessor |
---|
ISeriesAbstractHostAPIProcessor.HostAPIErrorCodeStructure |
Field Summary | |
---|---|
static String |
Copyright
|
protected static IISeriesHostListFieldFactory |
DEFAULT_LISTFIELD_FACTORY_NAMEARRAY
For listing names only returning a string array. |
static int |
LIST_BASIC
Return list with basic information per field ( IISeriesHostFieldBasic ) |
static int |
LIST_NAMES
Return list of names only. |
Constructor Summary | |
---|---|
ISeriesListFields()
Constructor used when you do not have an AS400 object already. |
|
ISeriesListFields(AS400 system)
Constructor when there is an existing AS400 object. |
Method Summary | |
---|---|
protected void |
buildList(int nbrRows,
int listStartingPosition,
int sizePerRow)
Build the list. |
protected void |
buildList0200(int nbrRows,
int listStartingPosition,
int listSize)
Build the list. |
List |
getFieldList(ISeriesFieldFilterString fsObj)
Retrieve a list of fields, returning all the information available for fields. |
List |
getFieldList(ISeriesFieldFilterString fsObj,
IISeriesHostListFieldFactory listFieldFactory)
Retrieve a list of fields, returning objects created by a supplied object factory. |
List |
getFieldList(ISeriesFieldFilterString fsObj,
IISeriesHostListFieldFactory listFieldFactory,
IISeriesHostListStatusCallback callback)
Retrieve a list of fields, informing the caller when processing starts for each part of a multi-generic list. |
List |
getFieldListNameOnly(ISeriesFieldFilterString fsObj)
Retrieve a list of fields, returning only the name per field. |
boolean |
getFileOverride()
Query whether this list processor honors file override information |
protected String |
getFilterString()
Return the filter string used for this list request. |
protected ISeriesFieldFilterString |
getFilterStringObject()
Return the filter string object used for this list request. |
List |
getList(ISeriesAbstractFilterString fsObj)
As per the IISeriesListProcessor interface requirements. |
List |
getList(ISeriesAbstractFilterString fsObj,
IISeriesHostListBaseFactory listFactory)
Retrieve a list of fields, returning objects created by a supplied object factory. |
List |
getList(ISeriesAbstractFilterString fsObj,
IISeriesHostListBaseFactory listFactory,
IISeriesHostListStatusCallback callback)
Retrieve a list of fields, informing the caller when processing starts for each part of a multi-generic list. |
List |
getListBrief(ISeriesAbstractFilterString fsObj)
As per the IISeriesListProcessor interface requirements. |
protected IISeriesHostListFieldFactory |
getListFieldFactory()
Get object factory used to create new objects. |
protected void |
getListFromAS400(String filterString)
Call QUSLFLD on AS/400 to get the list. |
ISeriesListFieldsHeader |
getListHeader()
This method returns the Record list header information. |
String[] |
getListNameArray(ISeriesAbstractFilterString fsObj)
Retrieve list of names-only as an array of strings. |
List |
getListNameOnly(ISeriesAbstractFilterString fsObj)
As per the IISeriesListProcessor interface requirements. |
int |
getListType()
Retrieve file override value. |
protected void |
populateObj(byte[] dftValue)
Build a return object with information for one field object. |
void |
setFileOverride(boolean override)
Specify whether file overrides are honored or not during list processing. |
protected void |
setFilterStringObj(ISeriesFieldFilterString fsObj)
Set the filter string used for this list request. |
protected void |
setListFieldFactory(IISeriesHostListFieldFactory factory)
Set list field factory used to create new objects. |
void |
setListType(int listType)
Set the list type. |
void |
setSystem(AS400 system)
Set the AS/400 object used for this list processor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.etools.iseries.comm.interfaces.IISeriesAPIProcessor |
---|
getWarnings |
Field Detail |
---|
public static final String Copyright
public static final int LIST_NAMES
public static final int LIST_BASIC
IISeriesHostFieldBasic
)
protected static final IISeriesHostListFieldFactory DEFAULT_LISTFIELD_FACTORY_NAMEARRAY
Constructor Detail |
---|
public ISeriesListFields()
public ISeriesListFields(AS400 system)
AS400
- system to use for the connection.Method Detail |
---|
public void setFileOverride(boolean override)
true=>honor
- overrides, false=>do not honor overridespublic boolean getFileOverride()
public List getListNameOnly(ISeriesAbstractFilterString fsObj) throws Exception
Same as getFieldListNameOnly(ISeriesFieldFilterString)
getListNameOnly
in interface IISeriesListProcessor
ISeriesHostFieldNameOnly
objects.
Exception
public String[] getListNameArray(ISeriesAbstractFilterString fsObj) throws Exception
Exception
public List getListBrief(ISeriesAbstractFilterString fsObj) throws Exception
getList(ISeriesAbstractFilterString)
!
getListBrief
in interface IISeriesListProcessor
Exception
public List getList(ISeriesAbstractFilterString fsObj) throws Exception
Same as getFieldList(ISeriesFieldFilterString)
getList
in interface IISeriesListProcessor
ISeriesHostFieldBasic
objects.
Exception
public List getList(ISeriesAbstractFilterString fsObj, IISeriesHostListBaseFactory listFactory) throws Exception
As per the IISeriesListProcessor interface requirements. Not typesafe.
getList
in interface IISeriesListProcessor
Exception
getFieldList(ISeriesFieldFilterString, IISeriesHostListFieldFactory)
public List getList(ISeriesAbstractFilterString fsObj, IISeriesHostListBaseFactory listFactory, IISeriesHostListStatusCallback callback) throws Exception
As per the IISeriesListProcessor interface requirements. Not typesafe.
getList
in interface IISeriesListProcessor
Exception
getFieldList(ISeriesFieldFilterString, IISeriesHostListFieldFactory, IISeriesHostListStatusCallback)
public List getFieldListNameOnly(ISeriesFieldFilterString fsObj) throws Exception
ISeriesHostFieldNameOnly
objects.
Exception
public List getFieldList(ISeriesFieldFilterString fsObj) throws Exception
ISeriesHostFieldBasic
objects.
Exception
public List getFieldList(ISeriesFieldFilterString fsObj, IISeriesHostListFieldFactory listFieldFactory) throws Exception
fsObj
- ISeriesFieldFilterString
filter string
object identify what list to get. To construct one of these, pass a string of the form
library/file RCDNAME(record) FLDNAME(field)
to its constructor.
The record and field names can simple, * or generic as in A*. Further, the record name can be *FIRST.listFieldFactory
- An object implementing the
IISeriesHostListFieldFactory
interface. This interface prescribes two methods, and the one called depends on the type of list requested
via a previous call to setListType(int)
:
LIST_NAMES
calls createNameOnlyObject
.
LIST_BASIC
calls createFieldObject
.
Exception
setListType(int)
public int getListType()
public void setListType(int listType)
listType
- One of LIST_NAMES
, LIST_BASIC
depending if you want:
public List getFieldList(ISeriesFieldFilterString fsObj, IISeriesHostListFieldFactory listFieldFactory, IISeriesHostListStatusCallback callback) throws Exception
getList(ISeriesAbstractFilterString, IISeriesHostListBaseFactory, IISeriesHostListStatusCallback)
method,
but includes a callback object that is called when processing starts for each part of a multi-generic
list request. A multi-generic field list is a request where either the library, file or record name is itself
generic, requiring multiple calls to the host to the field list API.
This version of getList is usually used by GUI code that wishes to update a status dialog.
Exception
public ISeriesListFieldsHeader getListHeader()
ISeriesListFieldsHeader
objectprotected void getListFromAS400(String filterString) throws Exception
Exception
protected void buildList(int nbrRows, int listStartingPosition, int sizePerRow) throws Exception
This is method for the FLDL0100 format
Overridden from parent.
Updates theFieldList global list.
Exception
protected void buildList0200(int nbrRows, int listStartingPosition, int listSize) throws Exception
This is method for the FLDL0200 format
Overridden from parent.
Updates theFieldList global list.
Exception
protected void populateObj(byte[] dftValue)
dftValue
- the default value byte array already parsed out of the buffer by bldList0200.protected void setListFieldFactory(IISeriesHostListFieldFactory factory)
protected IISeriesHostListFieldFactory getListFieldFactory()
protected void setFilterStringObj(ISeriesFieldFilterString fsObj)
protected ISeriesFieldFilterString getFilterStringObject()
protected String getFilterString()
public void setSystem(AS400 system)
ISeriesAbstractHostAPIProcessor
setSystem
in class ISeriesAbstractHostAPIProcessor
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |