com.ibm.as400.access
Class ObjectDescription

java.lang.Object
  extended bycom.ibm.as400.access.ObjectDescription

public class ObjectDescription
extends Object

Represents a server QSYS object and its attributes. ObjectDescription objects can be constructed individually, or generated from an ObjectList. An object's attributes can be retrieved by calling getValue() and passing one of the integer attribute constants defined in this class.

Implementation note: This class internally uses the Retrieve Object Description (QUSROBJD) API.

See Also:
ObjectList

Field Summary
static int ALLOW_CHANGE_BY_PROGRAM
          Object attribute representing whether the object can be changed by the Change Object Description (QLICOBJD) API.
static int APAR
          Object attribute representing the identifier of the authorized program analysis report (APAR) that caused this object to be replaced.
static String ASP_NAME_UNKNOWN
          Constant indicating the name of the auxiliary storage pool device is not known.
static int AUDITING
          Object attribute representing the type of auditing for the object.
static String AUDITING_ALL
          Constant representing the auditing value *ALL.
static String AUDITING_CHANGE
          Constant representing the auditing value *CHANGE.
static String AUDITING_NONE
          Constant representing the auditing value *NONE.
static String AUDITING_USER_PROFILE
          Constant representing the auditing value *USRPRF.
static int CHANGE_DATE
          Object attribute representing the time at which the object was last changed.
static int CHANGED_BY_PROGRAM
          Object attribute representing whether the object has been changed by the Change Object Description (QLICOBJD) API.
static int COMPILER
          Object attribute representing the licensed program of the compiler used to generate this object.
static int COMPRESSION
          Object attribute representing the compression status of the object.
static String COMPRESSION_INELIGIBLE
          Constant representing the compression status "X".
static String COMPRESSION_NO
          Constant representing the compression status "N".
static String COMPRESSION_STORAGE_FREED
          Constant representing the compression status "F".
static String COMPRESSION_TEMPORARY
          Constant representing the compression status "T".
static String COMPRESSION_YES
          Constant representing the compression status "Y".
static int CREATION_DATE
          Object attribute representing the time at which the object was created.
static int CREATOR_SYSTEM
          Object attribute representing the name of the system on which the object was created.
static int CREATOR_USER_PROFILE
          Object attribute representing the name of the user that created the object.
static String CURRENT_LIBRARY
          Constant representing the value *CURLIB.
static int DAYS_USED
          Object attribute representing the number of days the object was used, or 0 if the object does not have a last-used date.
static int DIGITALLY_SIGNED
          Object attribute representing whether the object has a digital signature.
static int DIGITALLY_SIGNED_MULTIPLE
          Object attribute representing whether the object has more than one digital signature.
static int DIGITALLY_SIGNED_TRUSTED
          Object attribute representing whether the object is signed by a source that is trusted by the system.
static int DOMAIN
          Object attribute representing the domain that contains the object.
static String DOMAIN_SYSTEM
          Constant representing the object domain value of "*S".
static String DOMAIN_USER
          Constant representing the object domain value of "*U".
static int EXTENDED_ATTRIBUTE
          Object attribute representing the extended attribute that further describes the object, such as a program or file type.
static int JOURNAL
          Object attribute representing the fully-qualified integrated file system path name of the journal.
static int JOURNAL_IMAGES
          Object attribute representing the type of images that are written to the journal receiver for updates to the object.
static int JOURNAL_OMITTED_ENTRIES
          Object attribute representing whether journal entries to be omitted are journaled.
static int JOURNAL_START_DATE
          Object attribute representing the time at which journaling for the object was last started.
static int JOURNAL_STATUS
          Object attribute representing whether the object is currently being journaled or not.
static int LAST_USED_DATE
          Object attribute representing the time at which the object was last used.
static int LIBRARY
          Object attribute representing the library of the object.
static int LIBRARY_ASP_DEVICE_NAME
          Object attribute representing the name of the auxiliary storage pool (ASP) device where storage is allocated for the library containing the object.
static int LIBRARY_ASP_NUMBER
          Object attribute representing the number of the auxiliary storage pool (ASP) where storage is allocated for the library containing the object.
static String LIBRARY_LIST
          Constant representing the value *LIBL.
static int LICENSED_PROGRAM
          Object attribute representing the licensed program of the object.
static int NAME
          Object attribute representing the name of the object.
static int OBJECT_ASP_DEVICE_NAME
          Object attribute representing the name of the auxiliary storage pool (ASP) device where storage is allocated for the object.
static int OBJECT_ASP_NUMBER
          Object attribute representing the number of the auxiliary storage pool (ASP) where storage is allocated for the object.
static int OBJECT_LEVEL
          Object attribute representing the object control level for the created object.
static int OBJECT_SIZE
          Object attribute representing the size of the object in bytes.
static int ORDER_IN_LIBRARY_LIST
          Object attribute representing the order in which the library appears in the entire library list.
static int OVERFLOWED_ASP
          Object attribute representing whether the object overflowed the auxiliary storage pool (ASP).
static int OWNER
          Object attribute representing the name of the object owner's user profile.
static int PRIMARY_GROUP
          Object attribute representing the name of the primary group profile for the object.
static String PRIMARY_GROUP_NONE
          Constant representing a primary group of *NONE.
static int PTF
          Object attribute representing the number of the program temporary fix (PTF) number that caused this object to be replaced.
static int RESET_DATE
          Object attribute representing the time the days-used count was last reset to 0.
static int RESTORE_DATE
          Object attribute representing the time at which the object was restored.
static int SAVE_ACTIVE_DATE
          Object attribute representing the time the object was last saved when the SAVACT(*LIB, *SYSDFN, or *YES) save operation was specified.
static int SAVE_COMMAND
          Object attribute representing the command used to save the object.
static int SAVE_DATE
          Object attribute representing the time at which the object was saved.
static int SAVE_DEVICE
          Object attribute representing the type of device to which the object was last saved.
static String SAVE_DEVICE_DISKETTE
          Constant representing a save device of *DKT.
static String SAVE_DEVICE_NOT_SAVED
          Constant representing no save device (blank).
static String SAVE_DEVICE_OPTICAL
          Constant representing a save device of *OPT.
static String SAVE_DEVICE_SAVE_FILE
          Constant representing a save device of *SAVF.
static String SAVE_DEVICE_TAPE
          Constant representing a save device of *TAP.
static int SAVE_FILE
          Object attribute representing the fully-qualified integrated file system path name of the save file to which the object was saved.
static int SAVE_LABEL
          Object attribute representing the file label used when the object was saved.
static int SAVE_SEQUENCE_NUMBER
          Object attribute representing the tape sequence number assigned when the object was saved on tape, or 0 if the object was not saved.
static int SAVE_SIZE
          Object attribute representing the size of the object in bytes of storage at the time of the last save operation, or 0 if the object was not saved.
static int SAVE_VOLUME_ID
          Object attribute representing the tape, diskette, or optical volumes that are used for saving the object.
static int SOURCE_FILE
          Object attribute representing the fully-qualified integrated file system path name of the source file that was used to create the object.
static int SOURCE_FILE_UPDATED_DATE
          Object attribute representing the time the member in the source file was last updated.
static byte STATUS_DAMAGED
          Constant representing a status of 'D' for the information in this object when generated by an ObjectList.
static byte STATUS_LOCKED
          Constant representing a status of 'L' for the information in this object when generated by an ObjectList.
static byte STATUS_NO_AUTHORITY
          Constant representing a status of 'A' for the information in this object when generated by an ObjectList.
static byte STATUS_NO_ERRORS
          Constant representing a status of ' ' for the information in this object when generated by an ObjectList.
static byte STATUS_PARTIALLY_DAMAGED
          Constant representing a status of 'P' for the information in this object when generated by an ObjectList.
static byte STATUS_UNKNOWN
          Constant representing an unknown status for the information in this object.
static int STORAGE_STATUS
          Object attribute representing the storage status of the object.
static String STORAGE_STATUS_FREE
          Constant representing a storage status of *FREE.
static String STORAGE_STATUS_KEEP
          Constant representing a storage status of *FREE.
static int SYSTEM_LEVEL
          Object attribute representing the level of the operating system when the object was created.
static String SYSTEM_OR_BASIC_ASP
          Constant indicating the auxiliary storage pool device is the system ASP or a defined basic user ASP.
static int TEXT_DESCRIPTION
          Object attribute representing the text description of the object.
static int TYPE
          Object attribute representing the type of the object.
static int USAGE_INFO_UPDATED
          Object attribute representing whether the object usage information is updated for this object type.
static int USER_CHANGED
          Object attribute representing whether the user program was changed.
static int USER_DEFINED_ATTRIBUTE
          Object attribute representing the characteristic of the object type.
 
Constructor Summary
ObjectDescription(AS400 system, String path)
          Constructs an ObjectDescription given the specified path to the object.
ObjectDescription(AS400 system, String objectLibrary, String objectName, String objectType)
          Constructs an ObjectDescription given the object's library, name, and type.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 boolean exists()
          Checks to see if this object currently exists on the system.
 String getLibrary()
          Returns the library of this object.
 String getName()
          Returns the name of this object.
 String getPath()
          Returns the fully-qualified integrated file system path name of this object.
 byte getStatus()
          Returns the status of the information returned in this object if it was generated by an ObjectList.
 AS400 getSystem()
          Returns the system.
 String getType()
          Returns the type of this object.
 Object getValue(int attribute)
          Returns the value of the given attribute of this ObjectDescription.
 String getValueAsString(int attribute)
          Returns the value of the given attribute of this ObjectDescription, as a String.
 void refresh()
          Retrieves all possible attributes of this object from the system.
 String toString()
          Returns a String representation of this ObjectDescription.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLOW_CHANGE_BY_PROGRAM

public static final int ALLOW_CHANGE_BY_PROGRAM
Object attribute representing whether the object can be changed by the Change Object Description (QLICOBJD) API.

Type: Boolean

See Also:
Constant Field Values

APAR

public static final int APAR
Object attribute representing the identifier of the authorized program analysis report (APAR) that caused this object to be replaced. This field is null if the object did not change because of an APAR.

Type: String

See Also:
Constant Field Values

ASP_NAME_UNKNOWN

public static final String ASP_NAME_UNKNOWN
Constant indicating the name of the auxiliary storage pool device is not known.

See Also:
LIBRARY_ASP_DEVICE_NAME, OBJECT_ASP_DEVICE_NAME, Constant Field Values

AUDITING

public static final int AUDITING
Object attribute representing the type of auditing for the object. Valid values are:

Type: String

See Also:
Constant Field Values

AUDITING_ALL

public static final String AUDITING_ALL
Constant representing the auditing value *ALL.

See Also:
AUDITING, Constant Field Values

AUDITING_CHANGE

public static final String AUDITING_CHANGE
Constant representing the auditing value *CHANGE.

See Also:
AUDITING, Constant Field Values

AUDITING_NONE

public static final String AUDITING_NONE
Constant representing the auditing value *NONE.

See Also:
AUDITING, Constant Field Values

AUDITING_USER_PROFILE

public static final String AUDITING_USER_PROFILE
Constant representing the auditing value *USRPRF.

See Also:
AUDITING, Constant Field Values

CHANGE_DATE

public static final int CHANGE_DATE
Object attribute representing the time at which the object was last changed.

Type: java.util.Date

See Also:
Constant Field Values

CHANGED_BY_PROGRAM

public static final int CHANGED_BY_PROGRAM
Object attribute representing whether the object has been changed by the Change Object Description (QLICOBJD) API.

Type: Boolean

See Also:
Constant Field Values

COMPILER

public static final int COMPILER
Object attribute representing the licensed program of the compiler used to generate this object. The field will be null if the program was not compiled.

Type: com.ibm.as400.access.Product

See Also:
Constant Field Values

COMPRESSION

public static final int COMPRESSION
Object attribute representing the compression status of the object. Valid values are:

Type: String

See Also:
Constant Field Values

COMPRESSION_INELIGIBLE

public static final String COMPRESSION_INELIGIBLE
Constant representing the compression status "X".

See Also:
COMPRESSION, Constant Field Values

COMPRESSION_NO

public static final String COMPRESSION_NO
Constant representing the compression status "N".

See Also:
COMPRESSION, Constant Field Values

COMPRESSION_STORAGE_FREED

public static final String COMPRESSION_STORAGE_FREED
Constant representing the compression status "F".

See Also:
COMPRESSION, Constant Field Values

COMPRESSION_TEMPORARY

public static final String COMPRESSION_TEMPORARY
Constant representing the compression status "T".

See Also:
COMPRESSION, Constant Field Values

COMPRESSION_YES

public static final String COMPRESSION_YES
Constant representing the compression status "Y".

See Also:
COMPRESSION, Constant Field Values

CREATION_DATE

public static final int CREATION_DATE
Object attribute representing the time at which the object was created.

Type: java.util.Date

See Also:
Constant Field Values

CREATOR_SYSTEM

public static final int CREATOR_SYSTEM
Object attribute representing the name of the system on which the object was created.

Type: String

See Also:
Constant Field Values

CREATOR_USER_PROFILE

public static final int CREATOR_USER_PROFILE
Object attribute representing the name of the user that created the object.

Type: String

See Also:
Constant Field Values

CURRENT_LIBRARY

public static final String CURRENT_LIBRARY
Constant representing the value *CURLIB.

See Also:
Constant Field Values

DAYS_USED

public static final int DAYS_USED
Object attribute representing the number of days the object was used, or 0 if the object does not have a last-used date.

Type: Integer

See Also:
LAST_USED_DATE, Constant Field Values

DIGITALLY_SIGNED

public static final int DIGITALLY_SIGNED
Object attribute representing whether the object has a digital signature.

Type: Boolean

See Also:
DIGITALLY_SIGNED_TRUSTED, DIGITALLY_SIGNED_MULTIPLE, Constant Field Values

DIGITALLY_SIGNED_MULTIPLE

public static final int DIGITALLY_SIGNED_MULTIPLE
Object attribute representing whether the object has more than one digital signature.

Type: Boolean

See Also:
DIGITALLY_SIGNED, DIGITALLY_SIGNED_TRUSTED, Constant Field Values

DIGITALLY_SIGNED_TRUSTED

public static final int DIGITALLY_SIGNED_TRUSTED
Object attribute representing whether the object is signed by a source that is trusted by the system.

Type: Boolean

See Also:
DIGITALLY_SIGNED, DIGITALLY_SIGNED_MULTIPLE, Constant Field Values

DOMAIN

public static final int DOMAIN
Object attribute representing the domain that contains the object. Valid values are:

Type: String

See Also:
Constant Field Values

DOMAIN_SYSTEM

public static final String DOMAIN_SYSTEM
Constant representing the object domain value of "*S".

See Also:
DOMAIN, Constant Field Values

DOMAIN_USER

public static final String DOMAIN_USER
Constant representing the object domain value of "*U".

See Also:
DOMAIN, Constant Field Values

EXTENDED_ATTRIBUTE

public static final int EXTENDED_ATTRIBUTE
Object attribute representing the extended attribute that further describes the object, such as a program or file type. For example, an object type of *PGM may have a value of RPG (RPG program) or CLP (CL program); an object type of *FILE may have a value of PF (physical file), LF (logical file), DSPF (display file), SAVF (save file), and so on.

Type: String

See Also:
Constant Field Values

JOURNAL_STATUS

public static final int JOURNAL_STATUS
Object attribute representing whether the object is currently being journaled or not.

Type: Boolean

See Also:
Constant Field Values

JOURNAL

public static final int JOURNAL
Object attribute representing the fully-qualified integrated file system path name of the journal. This field is blank if the object has never been journaled.

Type: String

See Also:
Constant Field Values

JOURNAL_IMAGES

public static final int JOURNAL_IMAGES
Object attribute representing the type of images that are written to the journal receiver for updates to the object. This field is true if both before and after images are generated for changes to the object. This field is false if only after images are generated for changes to the object, or, if the object has never been journaled.

Type: Boolean

See Also:
Constant Field Values

JOURNAL_OMITTED_ENTRIES

public static final int JOURNAL_OMITTED_ENTRIES
Object attribute representing whether journal entries to be omitted are journaled. This field is true if no entries are ommitted; that is, all entries are journaled including open and close entries that would normally be omitted. This field is false if open and close operations do not generate open and close journal entries, or, if this object has never been journaled.

Type: Boolean

See Also:
Constant Field Values

JOURNAL_START_DATE

public static final int JOURNAL_START_DATE
Object attribute representing the time at which journaling for the object was last started. This field will contain Date value of 0 ms if the object has never been journaled.

Type: java.util.Date

See Also:
Constant Field Values

LAST_USED_DATE

public static final int LAST_USED_DATE
Object attribute representing the time at which the object was last used. This field will contain a Date value of 0 ms if the object has no last-used date.

Type: java.util.Date

See Also:
Constant Field Values

LIBRARY

public static final int LIBRARY
Object attribute representing the library of the object.

Type: String

See Also:
getLibrary(), Constant Field Values

LIBRARY_ASP_DEVICE_NAME

public static final int LIBRARY_ASP_DEVICE_NAME
Object attribute representing the name of the auxiliary storage pool (ASP) device where storage is allocated for the library containing the object. Special values include:

Type: String

See Also:
LIBRARY_ASP_NUMBER, OBJECT_ASP_NUMBER, OBJECT_ASP_DEVICE_NAME, Constant Field Values

LIBRARY_ASP_NUMBER

public static final int LIBRARY_ASP_NUMBER
Object attribute representing the number of the auxiliary storage pool (ASP) where storage is allocated for the library containing the object. Valid values are:

Type: Integer

See Also:
LIBRARY_ASP_DEVICE_NAME, OBJECT_ASP_NUMBER, OBJECT_ASP_DEVICE_NAME, Constant Field Values

LIBRARY_LIST

public static final String LIBRARY_LIST
Constant representing the value *LIBL.

See Also:
Constant Field Values

LICENSED_PROGRAM

public static final int LICENSED_PROGRAM
Object attribute representing the licensed program of the object. This field is null if the object does not belong to a licensed program.

Type: com.ibm.as400.access.Product

See Also:
Constant Field Values

NAME

public static final int NAME
Object attribute representing the name of the object.

Type: String

See Also:
getName(), Constant Field Values

OBJECT_ASP_DEVICE_NAME

public static final int OBJECT_ASP_DEVICE_NAME
Object attribute representing the name of the auxiliary storage pool (ASP) device where storage is allocated for the object. Special values include:

Type: String

See Also:
OBJECT_ASP_NUMBER, LIBRARY_ASP_DEVICE_NAME, LIBRARY_ASP_NUMBER, Constant Field Values

OBJECT_ASP_NUMBER

public static final int OBJECT_ASP_NUMBER
Object attribute representing the number of the auxiliary storage pool (ASP) where storage is allocated for the object. Valid values are:

Type: Integer

See Also:
OBJECT_ASP_DEVICE_NAME, LIBRARY_ASP_DEVICE_NAME, LIBRARY_ASP_NUMBER, Constant Field Values

OBJECT_LEVEL

public static final int OBJECT_LEVEL
Object attribute representing the object control level for the created object.

Type: String

See Also:
Constant Field Values

OBJECT_SIZE

public static final int OBJECT_SIZE
Object attribute representing the size of the object in bytes.

Type: Long

See Also:
Constant Field Values

ORDER_IN_LIBRARY_LIST

public static final int ORDER_IN_LIBRARY_LIST
Object attribute representing the order in which the library appears in the entire library list. If the library is in the list more than once, the order of the first occurrence of the library is returned. If the library is not in the library list, 0 is returned.

Note that this field can only be retrieved via the ObjectList class. If getValue() is called and this field was not retrieved via an ObjectList, -1 is returned.

Type: Integer

See Also:
Constant Field Values

OVERFLOWED_ASP

public static final int OVERFLOWED_ASP
Object attribute representing whether the object overflowed the auxiliary storage pool (ASP). Note that it is not possible for objects that reside in the system ASP, a primary ASP, or a secondary ASP to overflow the ASP.

Type: Boolean

See Also:
Constant Field Values

OWNER

public static final int OWNER
Object attribute representing the name of the object owner's user profile.

Type: String

See Also:
Constant Field Values

PRIMARY_GROUP

public static final int PRIMARY_GROUP
Object attribute representing the name of the primary group profile for the object. Special values include:

Type: String

See Also:
Constant Field Values

PRIMARY_GROUP_NONE

public static final String PRIMARY_GROUP_NONE
Constant representing a primary group of *NONE.

See Also:
PRIMARY_GROUP, Constant Field Values

PTF

public static final int PTF
Object attribute representing the number of the program temporary fix (PTF) number that caused this object to be replaced. This field is blank if the object was not changed because of a PTF.

Type: String

See Also:
Constant Field Values

RESET_DATE

public static final int RESET_DATE
Object attribute representing the time the days-used count was last reset to 0. If the days-used count has never been reset, this field contains a Date value of 0 ms.

Type: java.util.Date

See Also:
DAYS_USED, Constant Field Values

RESTORE_DATE

public static final int RESTORE_DATE
Object attribute representing the time at which the object was restored. This field will contain a Date value of 0 ms if the object has never been restored.

Type: java.util.Date

See Also:
Constant Field Values

SAVE_ACTIVE_DATE

public static final int SAVE_ACTIVE_DATE
Object attribute representing the time the object was last saved when the SAVACT(*LIB, *SYSDFN, or *YES) save operation was specified. If the object has never been saved, or if SAVACT(*NO) was specified on the last save operation for the object, this field contains a Date value of 0 ms.

Type: java.util.Date

See Also:
Constant Field Values

SAVE_COMMAND

public static final int SAVE_COMMAND
Object attribute representing the command used to save the object. This field is blank if the object was not saved.

Type: String

See Also:
Constant Field Values

SAVE_DATE

public static final int SAVE_DATE
Object attribute representing the time at which the object was saved. This field will contain a Date value of 0 ms if the object has never been saved.

Type: java.util.Date

See Also:
Constant Field Values

SAVE_DEVICE

public static final int SAVE_DEVICE
Object attribute representing the type of device to which the object was last saved. Possible values are:

Type: String

See Also:
Constant Field Values

SAVE_DEVICE_DISKETTE

public static final String SAVE_DEVICE_DISKETTE
Constant representing a save device of *DKT.

See Also:
SAVE_DEVICE, Constant Field Values

SAVE_DEVICE_NOT_SAVED

public static final String SAVE_DEVICE_NOT_SAVED
Constant representing no save device (blank).

See Also:
SAVE_DEVICE, Constant Field Values

SAVE_DEVICE_OPTICAL

public static final String SAVE_DEVICE_OPTICAL
Constant representing a save device of *OPT.

See Also:
SAVE_DEVICE, Constant Field Values

SAVE_DEVICE_SAVE_FILE

public static final String SAVE_DEVICE_SAVE_FILE
Constant representing a save device of *SAVF.

See Also:
SAVE_DEVICE, Constant Field Values

SAVE_DEVICE_TAPE

public static final String SAVE_DEVICE_TAPE
Constant representing a save device of *TAP.

See Also:
SAVE_DEVICE, Constant Field Values

SAVE_FILE

public static final int SAVE_FILE
Object attribute representing the fully-qualified integrated file system path name of the save file to which the object was saved. This field is blank if the object was not saved to a save file.

Type: String

See Also:
Constant Field Values

SAVE_LABEL

public static final int SAVE_LABEL
Object attribute representing the file label used when the object was saved. This field is blank if the object was not saved to tape, diskette, or optical. This field corresponds to the LABEL parameter on the command used to save the object.

Type: String

See Also:
Constant Field Values

SAVE_SEQUENCE_NUMBER

public static final int SAVE_SEQUENCE_NUMBER
Object attribute representing the tape sequence number assigned when the object was saved on tape, or 0 if the object was not saved.

Type: Integer

See Also:
Constant Field Values

SAVE_SIZE

public static final int SAVE_SIZE
Object attribute representing the size of the object in bytes of storage at the time of the last save operation, or 0 if the object was not saved.

Type: Long

See Also:
Constant Field Values

SAVE_VOLUME_ID

public static final int SAVE_VOLUME_ID
Object attribute representing the tape, diskette, or optical volumes that are used for saving the object. This field returns a maximum of ten 6-character volumes. Each volume is separated by a single character.

If the object was saved in parallel format, the separator character contains a 2 before the first volume in the second media file, a 3 before the third media file, and so on, up to a 0 before the tenth media file. Otherwise, the separator characters are blank. If more than ten volumes are used and the object was saved in serial format, 1 is returned in the 71st character of this field.

The field is blank if the object was last saved to a save file or if it was never saved.

Type: String

See Also:
Constant Field Values

SOURCE_FILE

public static final int SOURCE_FILE
Object attribute representing the fully-qualified integrated file system path name of the source file that was used to create the object. This field is blank if no source file was used to create the object.

Type: String

See Also:
Constant Field Values

SOURCE_FILE_UPDATED_DATE

public static final int SOURCE_FILE_UPDATED_DATE
Object attribute representing the time the member in the source file was last updated. This field is null if no source file created the object.

Type: java.util.Date

See Also:
SOURCE_FILE, Constant Field Values

STATUS_DAMAGED

public static final byte STATUS_DAMAGED
Constant representing a status of 'D' for the information in this object when generated by an ObjectList.

See Also:
getStatus(), Constant Field Values

STATUS_LOCKED

public static final byte STATUS_LOCKED
Constant representing a status of 'L' for the information in this object when generated by an ObjectList.

See Also:
getStatus(), Constant Field Values

STATUS_NO_AUTHORITY

public static final byte STATUS_NO_AUTHORITY
Constant representing a status of 'A' for the information in this object when generated by an ObjectList.

See Also:
getStatus(), Constant Field Values

STATUS_NO_ERRORS

public static final byte STATUS_NO_ERRORS
Constant representing a status of ' ' for the information in this object when generated by an ObjectList.

See Also:
getStatus(), Constant Field Values

STATUS_PARTIALLY_DAMAGED

public static final byte STATUS_PARTIALLY_DAMAGED
Constant representing a status of 'P' for the information in this object when generated by an ObjectList.

See Also:
getStatus(), Constant Field Values

STATUS_UNKNOWN

public static final byte STATUS_UNKNOWN
Constant representing an unknown status for the information in this object.

See Also:
getStatus(), Constant Field Values

STORAGE_STATUS

public static final int STORAGE_STATUS
Object attribute representing the storage status of the object. Possible values are:

Type: String

See Also:
Constant Field Values

STORAGE_STATUS_FREE

public static final String STORAGE_STATUS_FREE
Constant representing a storage status of *FREE.

See Also:
STORAGE_STATUS, Constant Field Values

STORAGE_STATUS_KEEP

public static final String STORAGE_STATUS_KEEP
Constant representing a storage status of *FREE.

See Also:
STORAGE_STATUS, Constant Field Values

SYSTEM_LEVEL

public static final int SYSTEM_LEVEL
Object attribute representing the level of the operating system when the object was created. This field has the format VvvRrrMmm where:

Type: String

See Also:
Constant Field Values

SYSTEM_OR_BASIC_ASP

public static final String SYSTEM_OR_BASIC_ASP
Constant indicating the auxiliary storage pool device is the system ASP or a defined basic user ASP.

See Also:
LIBRARY_ASP_DEVICE_NAME, OBJECT_ASP_DEVICE_NAME, Constant Field Values

TEXT_DESCRIPTION

public static final int TEXT_DESCRIPTION
Object attribute representing the text description of the object. This field is blank if no text description is specified.

Type: String

See Also:
Constant Field Values

TYPE

public static final int TYPE
Object attribute representing the type of the object.

Type: String

See Also:
getType(), Constant Field Values

USAGE_INFO_UPDATED

public static final int USAGE_INFO_UPDATED
Object attribute representing whether the object usage information is updated for this object type.

Type: Boolean

See Also:
Constant Field Values

USER_CHANGED

public static final int USER_CHANGED
Object attribute representing whether the user program was changed. This field is true if the user changed the object; false if the object was not changed by the user.

Type: Boolean

See Also:
Constant Field Values

USER_DEFINED_ATTRIBUTE

public static final int USER_DEFINED_ATTRIBUTE
Object attribute representing the characteristic of the object type. This field is set by the user while using the Change Object Description (QLICOBJD) API.

Type: String

See Also:
Constant Field Values
Constructor Detail

ObjectDescription

public ObjectDescription(AS400 system,
                         String path)
Constructs an ObjectDescription given the specified path to the object.

Parameters:
system - The system.
path - The fully-qualified integrated file system path to the object. Special values for the library portion of the path include %CURLIB% and %LIBL%. Only external object types are allowed for the object type. Consider using QSYSObjectPathName to compose the fully-qualified path string.

ObjectDescription

public ObjectDescription(AS400 system,
                         String objectLibrary,
                         String objectName,
                         String objectType)
Constructs an ObjectDescription given the object's library, name, and type.

Parameters:
system - The system.
objectLibrary - The library. Special values include:
objectName - The name of the object. Wildcards are not allowed.
objectType - The type of the object, e.g. "FILE". Only external object types are allowed.
Method Detail

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - The reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

exists

public boolean exists()
               throws AS400Exception,
                      AS400SecurityException,
                      ErrorCompletingRequestException,
                      InterruptedException,
                      IOException,
                      ObjectDoesNotExistException
Checks to see if this object currently exists on the system.

Returns:
true if the object exists; false if the object or library do not exist.
Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException

getLibrary

public String getLibrary()
Returns the library of this object.

Returns:
The object library.

getName

public String getName()
Returns the name of this object.

Returns:
The object name.

getPath

public String getPath()
Returns the fully-qualified integrated file system path name of this object.

Returns:
The object path name.

getStatus

public byte getStatus()
Returns the status of the information returned in this object if it was generated by an ObjectList.

Returns:
The status. Possible values are:
  • STATUS_NO_ERRORS - The requested attribute information was returned. No errors occurred.
  • STATUS_NO_AUTHORITY - No information was returned because the job did not have the authority specified in the object authorities field of the object.
  • STATUS_DAMAGED - The requested attribute information was returned, but the object is damaged and should be recreated as soon as possible.
  • STATUS_LOCKED - No information was returned because the object is locked.
  • STATUS_PARTIALLY_DAMAGED - The requested information was returned, but the object is partially damaged.
If two or more conditions occur that include STATUS_NO_AUTHORITY, the status is set to STATUS_NO_AUTHORITY. If the object is locked and either damaged or partially damaged, the status is set to STATUS_LOCKED.

If the status returned is either STATUS_NO_AUTHORITY or STATUS_LOCKED, no attribute information will have been collected by ObjectList, so any call to getValue() will result in another call to the server, where an exception is likely to occur (because of the lack of authority, for example). Only the object name, library, and type are valid in this case.


getSystem

public AS400 getSystem()
Returns the system.

Returns:
The system.

getType

public String getType()
Returns the type of this object.

Returns:
The object type.

getValue

public Object getValue(int attribute)
                throws AS400Exception,
                       AS400SecurityException,
                       ErrorCompletingRequestException,
                       InterruptedException,
                       IOException,
                       ObjectDoesNotExistException
Returns the value of the given attribute of this ObjectDescription. If the value is not found, it is retrieved from the system. The values are cached. Call refresh() to retrieve all of the known attributes of this object from the system.

Parameters:
attribute - One of the attribute constants.
Returns:
The value for the attribute, or null if one was not found.
Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException

getValueAsString

public String getValueAsString(int attribute)
                        throws AS400Exception,
                               AS400SecurityException,
                               ErrorCompletingRequestException,
                               InterruptedException,
                               IOException,
                               ObjectDoesNotExistException
Returns the value of the given attribute of this ObjectDescription, as a String. If the value is not found, it is retrieved from the system. The values are cached. Call refresh() to retrieve all of the known attributes of this object from the system.

Parameters:
attribute - One of the attribute constants.
Returns:
The value for the attribute, or null if one was not found.
Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException

refresh

public void refresh()
             throws AS400Exception,
                    AS400SecurityException,
                    ErrorCompletingRequestException,
                    InterruptedException,
                    IOException,
                    ObjectDoesNotExistException
Retrieves all possible attributes of this object from the system.

Throws:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
InterruptedException
IOException
ObjectDoesNotExistException

toString

public String toString()
Returns a String representation of this ObjectDescription.

Returns:
The object path name.