public class MemberDescription
extends java.lang.Object
MemberList.getMemberDescriptions()
.
A member's attributes can be retrieved by calling getValue()
and passing one of the attribute identifier constants defined in this class.
Note: String data is always stored and returned without trailing blanks.
Performance hint:
If you anticipate retrieving multiple attributes for a given member,
first call refresh()
, which will make a single API call
to retrieve (and cache) all of the member's attribute values.
Implementation note: This class internally calls the "Retrieve Member Description" (QUSRMBRD) API. Information from formats MBRD0100, MBRD0200, and MBRD0300 is retrieved.
This class is mostly based on a prototype contributed by Mihael Schmidt.
MemberList
,
AS400File
,
ObjectDescription
Modifier and Type | Field and Description |
---|---|
static int |
ACCESS_PATH_MAINTENANCE
Specifies, for files with key fields or join logical files, the type of access path
maintenance used for all members of the physical or logical file.
|
static int |
ACCESS_PATH_SIZE
The access path size in bytes for this file member.
|
static int |
ACCESS_PATH_SIZE_MULTIPLIER
The value to multiply the access path size by to get its true size.
|
static int |
ALLOW_DELETE_OPERATION
Whether records in this file can be deleted.
|
static int |
ALLOW_READ_OPERATION
Whether records in the physical file can be read.
|
static int |
ALLOW_UPDATE_OPERATION
Whether records in this file can be updated.
|
static int |
ALLOW_WRITE_OPERATION
Whether records can be written to the file.
|
static int |
CHANGE_DATE_AND_TIME
The date and time this member was changed.
|
static int |
CREATION_DATE_TIME
The date and time the member was created.
|
static int |
CURRENT_NUMBER_OF_INCREMENTS
The number of increments that have been added to the member size (data space size).
|
static int |
CURRENT_NUMBER_OF_RECORDS
The number of records that currently exist in this member.
|
static int |
DATA_SPACE_SIZE
The size of the space that contains the data of the file member, in bytes.
|
static int |
DATA_SPACE_SIZE_MULTIPLIER
The value to multiply the data space size by to get its true size.
|
static int |
DATE_LAST_USED
The century and date this member was last used.
|
static int |
EXPIRATION_DATE
The date that this member expires.
|
static int |
FILE_ATTRIBUTE
The type of file found.
|
static int |
FILE_NAME
The name of the database file whose member names are placed in the list.
|
static int |
INCREMENT_NUMBER_OF_RECORDS
The maximum number of records that are automatically added to the member when the number of
records in the member is greater than the initial member size.
|
static int |
INITIAL_NUMBER_OF_RECORDS
The number of records that can be written to each member of the file before the member size is
automatically extended.
|
static int |
JOIN_MEMBER
Whether the member's logical file member combines (in one record format) fields from two or
more physical file members (true = join member, false = not a join member).
|
static int |
LAST_SOURCE_CHANGE_DATE
For source files, the date and time that this source member was last changed.
|
static int |
LIBRARY_NAME
The name of the library where the database file is located.
|
static int |
LOGICAL_FILE
Whether the database file is a logical or physical file (true = logical file, false =
physical file).
|
static int |
MAXIMUM_NUMBER_OF_INCREMENTS
The maximum number of increments automatically added to the member size.
|
static int |
MAXIMUM_PERCENT_DELETED_RECORDS_ALLOWED
The maximum allowed percentage of deleted records for each member in the physical file.
|
static int |
MEMBER_NAME
The name of a member found in the database file.
|
static int |
MEMBER_TEXT_DESCRIPTION
Description of the member found in the database file.
|
static int |
MEMBER_TEXT_DESCRIPTION_CCSID
The CCSID for the member text description.
|
static int |
NUMBER_OF_BASED_ON_PHYICAL_FILE_MEMBERS
The number of database file members for the logical file member.
|
static int |
NUMBER_OF_DAYS_USED
The number of days the member has been used.
|
static int |
NUMBER_OF_DELETED_RECORDS
The number of deleted records returned in the file member.
|
static int |
ODP_SHARING
Whether the open data path (ODP) allows sharing with other programs in the same job
(true = ODP sharing is allowed, false = ODP sharing is not allowed).
|
static int |
RECORD_CAPACITY
The actual number of records this member can contain.
|
static int |
RECORD_FORMAT_SELECTOR_LIBRARY_NAME
The library in which the record format selector program resides.
|
static int |
RECORD_FORMAT_SELECTOR_PROGRAM_NAME
The name of a record format selector program that is called when the logical file member
contains more than one logical record format.
|
static int |
RECORDS_TO_FORCE_A_WRITE
The number of inserted, updated, or deleted records that are processed before the records are
forced into auxiliary storage.
|
static int |
REMOTE_FILE
Whether the database file is a remote file (true = remote file, false = local file).
|
static int |
RESTORE_DATE_AND_TIME
The date and time that the member was last restored.
|
static int |
SAVE_DATE_AND_TIME
The date and time that this member was last saved.
|
static int |
SOURCE_FILE
Whether the database file is a source file or a data file.
|
static int |
SOURCE_TYPE
The type of source member if this is a source file.
|
static int |
SQL_FILE_TYPE
The kind of SQL file type the file is.
|
static int |
USE_RESET_DATE
The century and date when the days-used count was last set to 0.
|
Constructor and Description |
---|
MemberDescription(AS400 system,
QSYSObjectPathName path)
Constructs a MemberDescription object.
|
MemberDescription(AS400 system,
java.lang.String path)
Constructs an MemberDescription.
|
MemberDescription(AS400 system,
java.lang.String libraryName,
java.lang.String objectName,
java.lang.String memberName)
Constructs a MemberDescription object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPath()
Returns the IFS path of this member.
|
java.lang.Object |
getValue(int attribute)
Returns the requested member attribute information object.
|
void |
refresh()
Retrieves (and caches) all attributes of this member from the system.
|
public static final int FILE_NAME
public static final int LIBRARY_NAME
public static final int MEMBER_NAME
public static final int FILE_ATTRIBUTE
public static final int SOURCE_TYPE
public static final int CREATION_DATE_TIME
public static final int LAST_SOURCE_CHANGE_DATE
public static final int MEMBER_TEXT_DESCRIPTION
public static final int SOURCE_FILE
public static final int REMOTE_FILE
public static final int LOGICAL_FILE
public static final int ODP_SHARING
public static final int CURRENT_NUMBER_OF_RECORDS
public static final int DATA_SPACE_SIZE
public static final int ACCESS_PATH_SIZE
public static final int NUMBER_OF_BASED_ON_PHYICAL_FILE_MEMBERS
public static final int CHANGE_DATE_AND_TIME
public static final int SAVE_DATE_AND_TIME
public static final int RESTORE_DATE_AND_TIME
public static final int EXPIRATION_DATE
public static final int NUMBER_OF_DAYS_USED
public static final int DATE_LAST_USED
public static final int USE_RESET_DATE
public static final int DATA_SPACE_SIZE_MULTIPLIER
public static final int ACCESS_PATH_SIZE_MULTIPLIER
public static final int MEMBER_TEXT_DESCRIPTION_CCSID
public static final int NUMBER_OF_DELETED_RECORDS
public static final int JOIN_MEMBER
public static final int ACCESS_PATH_MAINTENANCE
public static final int SQL_FILE_TYPE
public static final int ALLOW_READ_OPERATION
public static final int ALLOW_WRITE_OPERATION
public static final int ALLOW_UPDATE_OPERATION
public static final int ALLOW_DELETE_OPERATION
public static final int RECORDS_TO_FORCE_A_WRITE
public static final int MAXIMUM_PERCENT_DELETED_RECORDS_ALLOWED
public static final int INITIAL_NUMBER_OF_RECORDS
public static final int INCREMENT_NUMBER_OF_RECORDS
public static final int MAXIMUM_NUMBER_OF_INCREMENTS
public static final int CURRENT_NUMBER_OF_INCREMENTS
public static final int RECORD_CAPACITY
public static final int RECORD_FORMAT_SELECTOR_PROGRAM_NAME
public static final int RECORD_FORMAT_SELECTOR_LIBRARY_NAME
public MemberDescription(AS400 system, java.lang.String path)
system
- The system.path
- The fully-qualified integrated file system path to the database file member.
Consider using QSYSObjectPathName
to compose
the fully-qualified path string,
or using MemberDescription(AS400,QSYSObjectPathName)
instead.public MemberDescription(AS400 system, QSYSObjectPathName path)
system
- The system.path
- The fully-qualified integrated file system path to the database file member.
Consider using QSYSObjectPathName
to compose the fully-qualified path string.public MemberDescription(AS400 system, java.lang.String libraryName, java.lang.String objectName, java.lang.String memberName)
system
- AS400 system objectlibraryName
- Library where the database file is located.objectName
- The name of the database file.memberName
- The name of the member within the database file.public java.lang.Object getValue(int attribute) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.io.IOException, java.lang.InterruptedException, ObjectDoesNotExistException
attribute
- Attribute to be retrieved (either from cache or from system)ObjectDoesNotExistException
- If a system object necessary for the call does not exist on the system.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ErrorCompletingRequestException
- If an error occurs before the request is completed.AS400SecurityException
- If a security or authority error occurs.AS400Exception
- If the program on the server sends an escape message.public void refresh() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
ObjectDoesNotExistException
- If a system object necessary for the call does not exist on the system.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ErrorCompletingRequestException
- If an error occurs before the request is completed.AS400SecurityException
- If a security or authority error occurs.AS400Exception
- If the program on the server sends an escape message.public java.lang.String getPath()