Class MArchive

    • Constructor Detail

      • MArchive

        public MArchive​(Properties ctx,
                        int AD_Archive_ID,
                        String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_Archive_ID - id
        trxName - transaction
      • MArchive

        public MArchive​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MArchive

        public MArchive​(Properties ctx,
                        PrintInfo info,
                        String trxName)
        Constructor
        Parameters:
        ctx - context
        info - print info
        trxName - transaction
    • Method Detail

      • get

        public static MArchive[] get​(Properties ctx,
                                     String whereClause)
        Get Archives
        Parameters:
        ctx - context
        whereClause - optional where clause (starting with AND)
        Returns:
        archives
      • getInputStream

        public InputStream getInputStream()
        Get Data as Input Stream
        Returns:
        input stream or null
      • setBinaryData

        public void setBinaryData​(byte[] inflatedData)
        Save Binary Data to file system or db.
        Specified by:
        setBinaryData in interface I_AD_Archive
        Overrides:
        setBinaryData in class X_AD_Archive
        Parameters:
        inflatedData - inflated data
      • getCreatedByName

        public String getCreatedByName()
        Get Created By (User) Name
        Returns:
        name
      • getArchivePathSnippet

        public String getArchivePathSnippet()
        Returns the archive path (snippet), containing client, org and archive id. The process, table and record id are only included when they are not null.
        Returns:
        String
      • getByteData

        public byte[] getByteData()
      • setByteData

        public void setByteData​(byte[] BinaryData)
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true if can be saved
      • postDelete

        protected boolean postDelete()
        Description copied from class: PO
        Executed after the Delete operation is committed in the database.
        Overrides:
        postDelete in class PO
        Returns:
        true if post delete is a success
      • saveNew_afterSetID

        protected void saveNew_afterSetID()
        Description copied from class: PO
        Call after ID have been assigned for new record
        Overrides:
        saveNew_afterSetID in class PO
      • setStorageProvider

        public void setStorageProvider​(MStorageProvider p)
        Set Storage Provider Used temporarily for the process to migrate storage provider
        Parameters:
        p - Storage provider
      • saveAsZip

        public File saveAsZip()
        Save the Archive as zip file, used by Pack Out when storage provider is not DB
        Returns:
        File - the temporary file