Package org.compiere.model
Class MImage
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_AD_Image
-
- org.compiere.model.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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.X_AD_Image
ENTITYTYPE_AD_Reference_ID
-
Fields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_AD_Image
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Image_ID, COLUMNNAME_AD_Image_UU, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_StorageProvider_ID, COLUMNNAME_BinaryData, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_EntityType, COLUMNNAME_ImageURL, COLUMNNAME_IsActive, COLUMNNAME_Name, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MImage(Properties ctx, int AD_Image_ID, String trxName)
ConstructorMImage(Properties ctx, ResultSet rs, String trxName)
Load ConstructorMImage(Properties ctx, MImage copy)
MImage(Properties ctx, MImage copy, String trxName)
MImage(MImage copy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
beforeSave(boolean newRecord)
Before Savestatic MImage
get(int AD_Image_ID)
Get MImage from Cache (immutable)static MImage
get(Properties ctx, int AD_Image_ID)
Get MImage (Immutable) from Cachebyte[]
getBinaryData()
Get Binary Data.byte[]
getByteData()
static MImage
getCopy(Properties ctx, int AD_Image_ID, String trxName)
Get updateable copy of MImage from cachebyte[]
getData()
Get DataIcon
getIcon()
Get IconImage
getImage()
Get ImageString
getImageStoragePath()
MImage
markImmutable()
mark PO as immutableprotected boolean
postDelete()
Executed after the Delete operation is committed in the database.protected void
saveNew_afterSetID()
Call after ID have been assigned for new recordvoid
setBinaryData(byte[] BinaryData)
Set Binary Datavoid
setByteData(byte[] BinaryData)
void
setImageURL(String ImageURL)
Set Image URLvoid
setStorageProvider(MStorageProvider p)
Set Storage Provider Used temporarily for the process to migrate storage providerString
toString()
String Representation-
Methods inherited from class org.compiere.model.X_AD_Image
get_AccessLevel, getAD_Image_ID, getAD_Image_UU, getAD_StorageProvider, getAD_StorageProvider_ID, getDescription, getEntityType, getImageURL, getKeyNamePair, getName, initPO, setAD_Image_ID, setAD_Image_UU, setAD_StorageProvider_ID, setDescription, setEntityType, setName
-
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_AD_Image
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Constructor Detail
-
MImage
public MImage(Properties ctx, int AD_Image_ID, String trxName)
Constructor- Parameters:
ctx
- contextAD_Image_ID
- imagetrxName
- 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
-
-
MImage
public MImage(Properties ctx, MImage copy, String trxName)
- Parameters:
ctx
-copy
-trxName
-
-
-
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
- contextAD_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
- contextAD_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 interfaceI_AD_Image
- Overrides:
setImageURL
in classX_AD_Image
- Parameters:
ImageURL
- url
-
setBinaryData
public void setBinaryData(byte[] BinaryData)
Set Binary Data- Specified by:
setBinaryData
in interfaceI_AD_Image
- Overrides:
setBinaryData
in classX_AD_Image
- Parameters:
BinaryData
- data
-
getBinaryData
public byte[] getBinaryData()
Description copied from class:X_AD_Image
Get Binary Data.- Specified by:
getBinaryData
in interfaceI_AD_Image
- Overrides:
getBinaryData
in classX_AD_Image
- Returns:
- Binary Data
-
getData
public byte[] getData()
Get Data- Returns:
- data
-
toString
public String toString()
String Representation- Overrides:
toString
in classX_AD_Image
- Returns:
- String
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Before Save- Overrides:
beforeSave
in classPO
- 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 classPO
- 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 classPO
-
markImmutable
public MImage markImmutable()
Description copied from interface:ImmutablePOSupport
mark PO as immutable- Specified by:
markImmutable
in interfaceImmutablePOSupport
- Returns:
- PO
-
-