|
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.Objectcom.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString
com.ibm.etools.iseries.comm.filters.ISeriesRecordFilterString
public class ISeriesRecordFilterString
A class representing an AS/400 Record filter string. This is a name pattern for returning lists of AS/400 records. Getting a list of records requires the library and file names to list in, and the name pattern for the records.
All this information can be specified by calling the setLibrary(String)
,
setFile(String)
and setRecord(String)
methods.
Alternatively, it can be set by passing in a filter string in the constructor.
Filter strings for records are of the form:
lib/file RCDNAME(rcd)
where rcd is either an explicit record name or a generic record name.
The library and file names can also be generic, if you desire a list of records from more than one file. If the file name is generic , then it is possible multiple files from the same library will match the generic file name, with some of the files being data files and some of the files being device files. By default, you will get back the records for all files that match the name pattern given for the file.
In this case of a generic file name, you may call the method setObjectType(String)
with "*FILE:" as the prefix and a file attribute name or generic name appended. For example,
"*FILE:PF-DTA" or "*FILE:DSPF". These attributes are used restrict the list to
specific file types. You can also specify multiple type:attr pairs as in
setObjectType("*FILE:DSPF *FILE:PRTF");
.
Alternatively, in the filter given in this class' constructor, specify the optional filter
keyword OBJTYPE. The valid forms of this are the same as the setObjectType method.
For example, to get a list of all records in all data files whose name ends with "ACC"
in all libraries in the user part of the library list, specify this on the constructor:
*USRLIBL/*ACC(*) RCDNAME(*) OBJTYPE(*FILE:PF-DTA)
.
Note that OBJTYPE syntax follows the rules of the ISeriesObjectFilterString
class,
and indeed generic file names result in a call to the getList method of
ISeriesListObjects
to resolve
the list of files, as part of the processing in the getList method of
ISeriesListRecords
.
Valid generic library, file, record and attribute names are names with one or two asterisks
anywhere in the name, as in:
ABC*
or *ABC
or A*C
*ABC*
or *A*C
or A*C*
To get the actual filter string from objects of this class, just call toString()
.
Objects of this class are used in the ISeriesListRecords
class for returning a list of information about each record meeting the filter's criteria.
ISeriesListRecords
Field Summary | |
---|---|
static String |
ALL
Default value for file name, member name and member type is * (meaning all). |
static String |
Copyright
|
static String |
DEFAULT_LIBRARY
Default library name is *CURLIB |
Fields inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
QUOTE, WILDCARD |
Constructor Summary | |
---|---|
ISeriesRecordFilterString()
Constructor to use when there is no existing filter string. |
|
ISeriesRecordFilterString(String input)
Constructor to use when filter string already exists. |
Method Summary | |
---|---|
String |
getFile()
Return the file name part of this filter string. |
String |
getLibrary()
Return the library name part of this filter string. |
String |
getObjectType()
Retrieve the object type as specified on the setObjectType(String) method. |
String |
getRecord()
Return the record name part of this filter string. |
boolean |
isGeneric()
Returns true if current filter represents a generic name or vs a scalar name. |
boolean |
isMultiGeneric()
Returns true if current filter represents a generic name that has more than one generic name part. |
void |
setFile(String obj)
Set the name of the file containing the records to list. |
void |
setLibrary(String lib)
Set the library name part of this filter string. |
void |
setObjectType(String type)
Specify the type of files to list records in: data or device say. |
void |
setRecord(String rcd)
Set the record name part of this filter string. |
String |
toString()
Convert this filter into a filter string. |
Methods inherited from class com.ibm.etools.iseries.comm.filters.ISeriesAbstractFilterString |
---|
addQuotes, clone, countHostOccurrencesOf, countOccurrencesOf, createFilterStringObject, equals, hashCode, hostIndexOf, hostIndexOf, isGenericLibraryName, isGenericName, isQuoted, stripQuotes, verifyGenericName, verifyGenericNameAdvanced, verifyGenericNameAdvancedQuoted, verifyGenericNameQuoted |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final String DEFAULT_LIBRARY
public static final String ALL
Constructor Detail |
---|
public ISeriesRecordFilterString()
*CURLIB/* RCDNAME(*) OBJTYPE(*FILE:PF-DTA)
, which
means list all records in all data files in the current library.
To change any of the default values, after instantiation call:
setLibrary(String)
to set the library name. Note this can be generic too,
but this will result in a call to retrieve files in every library matching the library name pattern,
and a subsequent call to retrieve records in every file found.
setFile(String)
to set the file name. This can be a simple or generic
name. If generic, you will get records from multiple files.
setRecord(String)
to set the record name. This can be a simple record name
or *FIRST or a generic name.
setObjectType(String)
to set the file type. Ignored unless the file name is generic.
public ISeriesRecordFilterString(String input)
lib/file RCDNAME(rcd) OBJTYPE(*FILE:attr)
where :
lib
is the library containing the file containing the records. This can
be a single library name or a generic library name like *ABC or *ROLL*.
Special values supported for library are *LIBL, *CURLIB, *USRLIBL and
*ALLUSR. Note that *LIBL means all files matching the file name pattern, not
the first library containing a match.
file
is the file containing the records. This can
be a single file name or a generic file name like *A* or *ROLL*.
rcd
is the name or generic name of the records to list.
OBJTYPE
is optional and only used when the file name is generic.
This tells the list processor what type of files - data or device - to consider when
resolving the list of files. Records in all files matching the file name and object type
will be returned. The default is to consider only data files, but by specifying
*FILE:PF-DSPF you can restrict it to display files, say.
toString()
.
Method Detail |
---|
public String getLibrary()
public String getFile()
public String getRecord()
public void setLibrary(String lib)
ISeriesListRecords
public void setFile(String obj)
public void setRecord(String rcd)
public void setObjectType(String type)
*FILE:PF-DTA
.
type
- The file type and file attribute to use when resolving a generic file
name as part of processing this record filter. The type part must be *FILE, while the
attribute part can be any database or device file attribute such as PF-DTA or DSPF.
OBJTYPE(*FILE:PF-DTA)
or
OBJTYPE(*FILE:DSPF)
.
ISeriesObjectFilterString
public String getObjectType()
setObjectType(String)
method.
This is only used when processing lists of fields where the file name is generic.
public String toString()
lib/file RCDNAME(rcd)
where rcd is either an explicit record name or a generic record name or *FIRST
to get the first record.
toString
in class ISeriesAbstractFilterString
public boolean isGeneric()
isGeneric
in class ISeriesAbstractFilterString
public boolean isMultiGeneric()
isMultiGeneric
in class ISeriesAbstractFilterString
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |