com.ibm.as400.access

Class SaveFile

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int CLS
      Special value for the "waitTime" property.
      static String CURRENT_RELEASE
      Value for the "targetRelease" property, indicating "current release".
      static int DEFAULT
      Special value for the "maximumNumberOfRecords", "waitTime", and "asp" properties.
      static int IMMED
      Value for the "waitTime" property, indicating "immediate".
      static long NO_MAX
      Value for the "maximumNumberOfRecords" property, indicating that the system maximum is used.
      static String PREVIOUS_RELEASE
      Value for the "targetRelease" property, indicating "previous release".
    • Constructor Summary

      Constructors 
      Constructor and Description
      SaveFile(AS400 system, String library, String name)
      Constructs a SaveFile object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void clear()
      Clears all existing records from the save file and reduces the amount of storage used by this file.
      void copyTo(String library, String name)
      Copies the save file to another save file on the same system.
      void create()
      Creates a save file on the system.
      void create(long maxRecords, int asp, int waitTime, boolean shared, String authority, String description)
      Creates a save file on the system.
      void delete()
      Deletes the save file.
      boolean equals(Object obj)
      Determines whether this SaveFile object is equal to another object.
      boolean exists()
      Determines if the save file currently exists on the system.
      int getASP()
      Returns the auxiliary storage pool ID for the save file.
      long getCurrentNumberOfRecords()
      Returns the current number of records in the save file.
      String getDescription()
      Returns the text description of the save file.
      long getLength()
      Returns the current total size (in bytes) of the save file.
      String getLibrary()
      Returns the name of the library where the save file is located on the system.
      long getMaximumNumberOfRecords()
      Returns the capacity (maximum number of records) of the save file.
      String getName()
      Returns the name of the save file on the system.
      ObjectDescription getObjectDescription()
      Returns an ObjectDescription instance representing the save file.
      String getPath()
      Returns the fully-qualifed IFS pathname of the save file.
      AS400 getSystem()
      Returns the system where the save file is located.
      String getTargetRelease()
      Returns the target release level of the operating system on which you intend to restore and use the object(s) saved in the save file by a subsequent invocation of one of the save() methods.
      int getWaitTime()
      Returns the wait time for the save file.
      int hashCode()
      Returns a hash code value for the object.
      boolean isSaveOutput()
      Indicates whether output from called API's will be saved in the job's spooled output.
      boolean isShared()
      Reports whether the open data path (ODP) for the save file is shared with other programs in the routing step.
      SaveFileEntry[] listEntries()
      Lists the contents of the save file.
      Product[] listProducts()
      Lists the product loads in the save file.
      void refresh()
      Purges any cached attribute information about the save file.
      void renameTo(String name)
      Renames the save file.
      void restore(Product product)
      Restores a licenced program product that was saved into the save file.
      void restore(String libraryName)
      Restores a library that was saved into the save file.
      void restore(String libraryName, String[] objectList, String toLibraryName)
      Restores objects that were saved into the save file.
      void save(Product product)
      Saves a copy of all of the objects that make up a licenced program product, into the save file.
      void save(String libraryName)
      Saves a library into the save file.
      void save(String[] pathList)
      Saves files from the root file system into the save file.
      void save(String libraryName, String[] objectList)
      Saves objects into the save file.
      void setDescription(String description)
      Sets the text description of the save file.
      void setMaximumNumberOfRecords(long maximumNumberOfRecords)
      Sets the capacity (maximum number of records) of the save file.
      void setSaveOutput(boolean save)
      Indicates whether output from called API's will be saved in the job's spooled output.
      void setShared(boolean shared)
      Sets whether the open data path (ODP) for the save file is shared with other programs in the routing step.
      void setTargetRelease(String targetRelease)
      Sets the target release level of the operating system on which you intend to restore and use the object(s) saved in the save file by a subsequent invocation of one of the save() methods.
      void setWaitTime(int seconds)
      Sets the number of seconds to wait for the file resources and session resources to be allocated when the save file is opened, or for the device or session resources to be allocated when an acquire operation is performed to the save file.
      String toString()
      Returns the String representation of this object.