Class MImage

    • Constructor Detail

      • MImage

        public MImage​(Properties ctx,
                      int AD_Image_ID,
                      String trxName)
        Constructor
        Parameters:
        ctx - context
        AD_Image_ID - image
        trxName - transaction
      • MImage

        public MImage​(Properties ctx,
                      ResultSet rs,
                      String trxName)
        Load Constructor
        Parameters:
        ctx -
        rs -
        trxName - transaction
      • MImage

        public MImage​(MImage copy)
        Parameters:
        copy -
      • MImage

        public MImage​(Properties ctx,
                      MImage copy)
        Parameters:
        ctx -
        copy -
    • Method Detail

      • get

        public static MImage get​(int AD_Image_ID)
        Get MImage from Cache (immutable)
        Parameters:
        AD_Image_ID - id
        Returns:
        MImage
      • get

        public static MImage get​(Properties ctx,
                                 int AD_Image_ID)
        Get MImage (Immutable) from Cache
        Parameters:
        ctx - context
        AD_Image_ID - id
        Returns:
        MImage
      • getCopy

        public static MImage getCopy​(Properties ctx,
                                     int AD_Image_ID,
                                     String trxName)
        Get updateable copy of MImage from cache
        Parameters:
        ctx - context
        AD_Image_ID -
        trxName - transaction name
        Returns:
        MImage
      • getImage

        public Image getImage()
        Get Image
        Returns:
        image or null
      • getIcon

        public Icon getIcon()
        Get Icon
        Returns:
        icon or null
      • getData

        public byte[] getData()
        Get Data
        Returns:
        data
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • getImageStoragePath

        public String getImageStoragePath()
      • setStorageProvider

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

        public byte[] getByteData()
      • setByteData

        public void setByteData​(byte[] BinaryData)
      • 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