com.ibm.as400.access

Class ObjectDescription

  • java.lang.Object
    • com.ibm.as400.access.ObjectDescription


  • public class ObjectDescription
    extends java.lang.Object
    Represents a system 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.

    Note: This class is not intended for use with database file members (type *MBR). To retrieve attributes of file members, use MemberDescription.

    Performance hint: If you anticipate retrieving multiple attributes for a given QSYS object, first call refresh(), which will make a single API call to retrieve (and cache) all of the object's attribute values.

    Implementation note: This class internally uses the Retrieve Object Description (QUSROBJD) and List Object Locks (QWCLOBJL) APIs.

    See Also:
    ObjectList, MemberDescription
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      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 java.lang.String ASP_NAME_ALL
      Constant indicating that the auxiliary storage pools that are currently part of the the thread's library name space will be searched to locate the library.
      static java.lang.String ASP_NAME_ALLAVL
      Constant indicating that all available ASPs will be searched.
      static java.lang.String ASP_NAME_CURASPGRP
      Constant indicating that if the thread has an ASP group, the primary and secondary ASPs in the ASP group will be searched to locate the library.
      static java.lang.String ASP_NAME_SYSBAS
      Constant indicating that the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to locate the library.
      static java.lang.String ASP_NAME_UNKNOWN
      Constant indicating that the name of the auxiliary storage pool device is not known.
      static java.lang.String ASP_SEARCH_TYPE_ASP
      Constant indicating that only the single ASP named in the auxiliary storage pool device name field will be searched.
      static java.lang.String ASP_SEARCH_TYPE_ASPGRP
      Constant indicating that all ASPs in the auxiliary storage pool group named in the auxiliary storage pool device name field will be searched.
      static int AUDITING
      Object attribute representing the type of auditing for the object.
      static java.lang.String AUDITING_ALL
      Constant representing the auditing value *ALL.
      static java.lang.String AUDITING_CHANGE
      Constant representing the auditing value *CHANGE.
      static java.lang.String AUDITING_NONE
      Constant representing the auditing value *NONE.
      static java.lang.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 java.lang.String COMPRESSION_INELIGIBLE
      Constant representing the compression status "X".
      static java.lang.String COMPRESSION_NO
      Constant representing the compression status "N".
      static java.lang.String COMPRESSION_STORAGE_FREED
      Constant representing the compression status "F".
      static java.lang.String COMPRESSION_TEMPORARY
      Constant representing the compression status "T".
      static java.lang.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 java.lang.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 java.lang.String DOMAIN_SYSTEM
      Constant representing the object domain value of "*S".
      static java.lang.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 java.lang.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 java.lang.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 java.lang.String SAVE_DEVICE_DISKETTE
      Constant representing a save device of *DKT.
      static java.lang.String SAVE_DEVICE_NOT_SAVED
      Constant representing no save device (blank).
      static java.lang.String SAVE_DEVICE_OPTICAL
      Constant representing a save device of *OPT.
      static java.lang.String SAVE_DEVICE_SAVE_FILE
      Constant representing a save device of *SAVF.
      static java.lang.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 java.lang.String STORAGE_STATUS_FREE
      Constant representing a storage status of *FREE.
      static java.lang.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 java.lang.String SYSTEM_OR_BASIC_ASP
      Constant indicating that 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

      Constructors 
      Constructor and Description
      ObjectDescription(AS400 system, QSYSObjectPathName path)
      Constructs an ObjectDescription given the specified path to the object.
      ObjectDescription(AS400 system, java.lang.String path)
      Constructs an ObjectDescription given the specified path to the object.
      ObjectDescription(AS400 system, java.lang.String objectLibrary, java.lang.String objectName, java.lang.String objectType)
      Constructs an ObjectDescription given the object's library, name, and type.
      ObjectDescription(AS400 system, java.lang.String objectLibrary, java.lang.String objectName, java.lang.String objectType, java.lang.String aspDeviceName)
      Constructs an ObjectDescription given the object's library, name, and type.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.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.
      java.lang.String getAspDeviceName()
      Returns the name of an auxiliary storage pool (ASP) device in which storage is allocated for the library that contains the object.
      java.lang.String getAspSearchType()
      Returns the type of search to be used withn a specific auxiliary storage pool device name is specified.
      java.lang.String getLibrary()
      Returns the library of this object.
      java.lang.String getName()
      Returns the name of this object.
      ObjectLockListEntry[] getObjectLockList()
      Returns a list of all ObjectLockListEntry objects representing possible Object Locks on this ObjectDescription.
      java.lang.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.
      java.lang.String getType()
      Returns the type of this object.
      java.lang.Object getValue(int attribute)
      Returns the value of the given attribute of this ObjectDescription.
      java.lang.String getValueAsString(int attribute)
      Returns the value of the given attribute of this ObjectDescription, as a String.
      int hashCode()
      Returns a hash code value for the object.
      void refresh()
      Retrieves all possible attributes of this object from the system.
      void setAspSearchType(java.lang.String aspSearchType)
      Specifies the type of the search when a specific auxiliary storage pool device name is specified for the ASP device name.
      java.lang.String toString()
      Returns a String representation of this ObjectDescription.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, 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_ALL

        public static final java.lang.String ASP_NAME_ALL
        Constant indicating that the auxiliary storage pools that are currently part of the the thread's library name space will be searched to locate the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.
        See Also:
        Constant Field Values
      • ASP_NAME_SYSBAS

        public static final java.lang.String ASP_NAME_SYSBAS
        Constant indicating that the system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to locate the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.
        See Also:
        Constant Field Values
      • ASP_NAME_CURASPGRP

        public static final java.lang.String ASP_NAME_CURASPGRP
        Constant indicating that if the thread has an ASP group, the primary and secondary ASPs in the ASP group will be searched to locate the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.
        See Also:
        Constant Field Values
      • ASP_NAME_ALLAVL

        public static final java.lang.String ASP_NAME_ALLAVL
        Constant indicating that all available ASPs will be searched. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and all available primary and secondary ASPs (ASPs 33-255 with a status of 'Available'). The ASP groups are searched in alphabetical order by the primary ASP. The system ASP and all defined basic user ASPs are searched after the ASP groups. ASPs and libraries to which the user is not authorized are bypassed and no authority error messages are sent. The search ends when the first object is found of the specified object name, library name, and object type. If the user is not authorized to the object, an authority error message is sent.
        See Also:
        Constant Field Values
      • ASP_SEARCH_TYPE_ASP

        public static final java.lang.String ASP_SEARCH_TYPE_ASP
        Constant indicating that only the single ASP named in the auxiliary storage pool device name field will be searched.
        See Also:
        Constant Field Values
      • ASP_SEARCH_TYPE_ASPGRP

        public static final java.lang.String ASP_SEARCH_TYPE_ASPGRP
        Constant indicating that all ASPs in the auxiliary storage pool group named in the auxiliary storage pool device name field will be searched. The device name must be the name of the primary auxiliary storage pool in the group.
        See Also:
        Constant Field Values
      • AUDITING

        public static final int AUDITING
        Object attribute representing the type of auditing for the object. Valid values are:
        • AUDITING_NONE - No auditing occurs for the object when it is read or changed, regardless of the user who is accessing the object.
        • AUDITING_USER_PROFILE - Audit the object only if the user accessing the object is being audited.
        • AUDITING_CHANGE - Audit all change access to this object by all users on the system.
        • AUDITING_ALL - Audit all access to the object by all users on the system. All access is defined as a read or change operation.

        Type: String

        See Also:
        Constant Field Values
      • AUDITING_ALL

        public static final java.lang.String AUDITING_ALL
        Constant representing the auditing value *ALL.
        See Also:
        AUDITING, Constant Field Values
      • AUDITING_CHANGE

        public static final java.lang.String AUDITING_CHANGE
        Constant representing the auditing value *CHANGE.
        See Also:
        AUDITING, Constant Field Values
      • AUDITING_NONE

        public static final java.lang.String AUDITING_NONE
        Constant representing the auditing value *NONE.
        See Also:
        AUDITING, Constant Field Values
      • AUDITING_USER_PROFILE

        public static final java.lang.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: Product

        See Also:
        Constant Field Values
      • COMPRESSION_INELIGIBLE

        public static final java.lang.String COMPRESSION_INELIGIBLE
        Constant representing the compression status "X".
        See Also:
        COMPRESSION, Constant Field Values
      • COMPRESSION_NO

        public static final java.lang.String COMPRESSION_NO
        Constant representing the compression status "N".
        See Also:
        COMPRESSION, Constant Field Values
      • COMPRESSION_STORAGE_FREED

        public static final java.lang.String COMPRESSION_STORAGE_FREED
        Constant representing the compression status "F".
        See Also:
        COMPRESSION, Constant Field Values
      • COMPRESSION_TEMPORARY

        public static final java.lang.String COMPRESSION_TEMPORARY
        Constant representing the compression status "T".
        See Also:
        COMPRESSION, Constant Field Values
      • COMPRESSION_YES

        public static final java.lang.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 java.lang.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
      • 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 java.lang.String DOMAIN_SYSTEM
        Constant representing the object domain value of "*S".
        See Also:
        DOMAIN, Constant Field Values
      • DOMAIN_USER

        public static final java.lang.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 omitted; 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_LIST

        public static final java.lang.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: Product

        See Also:
        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 java.lang.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_DISKETTE

        public static final java.lang.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 java.lang.String SAVE_DEVICE_NOT_SAVED
        Constant representing no save device (blank).
        See Also:
        SAVE_DEVICE, Constant Field Values
      • SAVE_DEVICE_OPTICAL

        public static final java.lang.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 java.lang.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 java.lang.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 java.lang.String STORAGE_STATUS_FREE
        Constant representing a storage status of *FREE.
        See Also:
        STORAGE_STATUS, Constant Field Values
      • STORAGE_STATUS_KEEP

        public static final java.lang.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:
        • Vvv - The character 'V' followed by a 2-character version number.
        • Rrr - The character 'R' followed by a 2-character release level.
        • Mmm - The character 'M' followed by a 2-character modification level.

        Type: String

        See Also:
        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
      • 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,
                         java.lang.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, or using ObjectDescription(AS400,QSYSObjectPathName) instead.
      • ObjectDescription

        public ObjectDescription(AS400 system,
                         QSYSObjectPathName 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.
      • ObjectDescription

        public ObjectDescription(AS400 system,
                         java.lang.String objectLibrary,
                         java.lang.String objectName,
                         java.lang.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.
      • ObjectDescription

        public ObjectDescription(AS400 system,
                         java.lang.String objectLibrary,
                         java.lang.String objectName,
                         java.lang.String objectType,
                         java.lang.String aspDeviceName)
        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.
        aspDeviceName - The name of an auxiliary storage pool (ASP) device in which storage is allocated for the library that contains the object or one of the following special values:
    >
    • Method Detail

      • equals

        public boolean equals(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code value for this object.
      • getLibrary

        public java.lang.String getLibrary()
        Returns the library of this object.
        Returns:
        The object library. Never null.
      • getName

        public java.lang.String getName()
        Returns the name of this object.
        Returns:
        The object name. Never null.
      • getAspDeviceName

        public java.lang.String getAspDeviceName()
        Returns the name of an auxiliary storage pool (ASP) device in which storage is allocated for the library that contains the object.
        Returns:
        The auxiliary storage pool (ASP) device name or null if no ASP device name has been set.
      • getAspSearchType

        public java.lang.String getAspSearchType()
        Returns the type of search to be used withn a specific auxiliary storage pool device name is specified.
        Returns:
        The search type.
      • getPath

        public java.lang.String getPath()
        Returns the fully-qualified integrated file system path name of this object.
        Returns:
        The object path name. Never null.
      • 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 system, 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. Never null.
      • getType

        public java.lang.String getType()
        Returns the type of this object.
        Returns:
        The object type. Never null.
      • getValue

        public java.lang.Object getValue(int attribute)
                                  throws AS400Exception,
                                         AS400SecurityException,
                                         ErrorCompletingRequestException,
                                         java.lang.InterruptedException,
                                         java.io.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.

        Performance hint: If multiple attribute values are to be retrieved for a single ObjectDescription, first call refresh() to retrieve (and cache) 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 - If an error occurs.
        AS400SecurityException - If a security or authority error occurs.
        ErrorCompletingRequestException - If an error occurs before the request is completed.
        java.lang.InterruptedException - If this thread is interrupted.
        java.io.IOException - If an error occurs while communicating with the system.
        ObjectDoesNotExistException - If the system API that retrieves object information is missing.
      • getValueAsString

        public java.lang.String getValueAsString(int attribute)
                                          throws AS400Exception,
                                                 AS400SecurityException,
                                                 ErrorCompletingRequestException,
                                                 java.lang.InterruptedException,
                                                 java.io.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.

        Performance hint: If multiple attribute values are to be retrieved for a single ObjectDescription, first call refresh() to retrieve (and cache) 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 - If an error occurs.
        AS400SecurityException - If a security or authority error occurs.
        ErrorCompletingRequestException - If an error occurs before the request is completed.
        java.lang.InterruptedException - If this thread is interrupted.
        java.io.IOException - If an error occurs while communicating with the system.
        ObjectDoesNotExistException - If the system API that retrieves object information is missing.
      • getObjectLockList

        public ObjectLockListEntry[] getObjectLockList()
                                                throws AS400Exception,
                                                       AS400SecurityException,
                                                       ErrorCompletingRequestException,
                                                       java.lang.InterruptedException,
                                                       java.io.IOException,
                                                       ObjectDoesNotExistException
        Returns a list of all ObjectLockListEntry objects representing possible Object Locks on this ObjectDescription.

        This method retrieves the list of locks from the system via a call to the List Object Locks (QWCLOBJL) API. Note: The QWCLOBJL API is not thread safe.

        Returns:
        An array of ObjectLockListEntry representing any Object Locks. If no locks are found, an empty array is returned.
        Throws:
        AS400Exception - If an error occurs.
        AS400SecurityException - If a security or authority error occurs.
        ErrorCompletingRequestException - If an error occurs before the request is completed.
        java.lang.InterruptedException - If this thread is interrupted.
        java.io.IOException - If an error occurs while communicating with the system.
        ObjectDoesNotExistException - If the system API that retrieves object information is missing.
      • setAspSearchType

        public void setAspSearchType(java.lang.String aspSearchType)
                              throws ExtendedIllegalArgumentException
        Specifies the type of the search when a specific auxiliary storage pool device name is specified for the ASP device name.
        Parameters:
        aspSearchType - The type of search to be used. One of the following values may be specified: The default value is ASP_SEARCH_TYPE_ASP.
        Throws:
        ExtendedIllegalArgumentException - if an invalid search type is specified.
      • toString

        public java.lang.String toString()
        Returns a String representation of this ObjectDescription.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The object path name.