Class MImage

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_Image, I_Persistent, Evaluatee, ImmutablePOSupport

public class MImage extends X_AD_Image implements ImmutablePOSupport
Image Model (DisplayType = 32)
Version:
$Id: MImage.java,v 1.5 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MImage

      public MImage(Properties ctx, String AD_Image_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_Image_UU - UUID key
      trxName - Transaction
    • 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)
      Copy constructor
      Parameters:
      copy -
    • MImage

      public MImage(Properties ctx, MImage copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MImage

      public MImage(Properties ctx, MImage copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • 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
    • setImageURL

      public void setImageURL(String ImageURL)
      Set Image URL
      Specified by:
      setImageURL in interface I_AD_Image
      Overrides:
      setImageURL in class X_AD_Image
      Parameters:
      ImageURL - url
    • setBinaryData

      public void setBinaryData(byte[] BinaryData)
      Set Binary Data
      Specified by:
      setBinaryData in interface I_AD_Image
      Overrides:
      setBinaryData in class X_AD_Image
      Parameters:
      BinaryData - binary data of an image
    • getBinaryData

      public byte[] getBinaryData()
      Load binary data through storage provider
      Specified by:
      getBinaryData in interface I_AD_Image
      Overrides:
      getBinaryData in class X_AD_Image
      Returns:
      Binary Data
    • getData

      public byte[] getData()
      Get Data
      Returns:
      binary data of an image
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_AD_Image
      Returns:
      String
    • beforeSave

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

      public String getImageStoragePath()
      Returns:
      relative image storage path (without the image id/name)
    • setStorageProvider

      public void setStorageProvider(MStorageProvider p)
      Set Storage Provider.
      Used by storage provider migration process to migrate storage provider.
      Parameters:
      p - Storage provider
    • getByteData

      public byte[] getByteData()
      Returns:
      binary data of image
    • setByteData

      public void setByteData(byte[] BinaryData)
      Set binary data of image
      Parameters:
      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
    • markImmutable

      public MImage markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO