|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.framework.PO
org.compiere.model.X_AD_Attachment
org.compiere.model.MAttachment
public class MAttachment
Attachment Model. One Attachment can have multiple entries
| Field Summary | |
|---|---|
static String |
NONE
Indicator for no data |
static String |
ZIP
Indicator for zip data |
| Fields inherited from class org.compiere.model.X_AD_Attachment |
|---|
accessLevel, Model, Table_ID, Table_Name, updatedMS |
| Fields inherited from class org.compiere.framework.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MAttachment(Ctx ctx,
int AD_Table_ID,
int Record_ID,
String trxName)
New Constructor |
|
MAttachment(Ctx ctx,
int AD_Attachment_ID,
String trxName)
Standard Constructor |
|
MAttachment(Ctx ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
boolean |
addEntry(File file)
Add new Data Entry |
boolean |
addEntry(MAttachmentEntry item)
Add Entry |
static boolean |
addEntry(PO po,
File file)
Add Attachment Entry for PO |
static boolean |
addEntry(PO po,
URI uri)
Add Attachment Entry Reference for PO |
boolean |
addEntry(String name,
byte[] data)
Add new Data Entry |
boolean |
addEntry(URI uri)
Add URI Entry |
void |
addTextMsg(String added)
Add to Text Msg |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
boolean |
deleteAllEntries()
Delete All Entries |
boolean |
deleteEntry(int index)
Delete Entry |
void |
dumpEntryNames()
Dump Entry Names |
static MAttachment |
get(Ctx ctx,
int AD_Table_ID,
int Record_ID)
Get Attachment |
MAttachmentEntry[] |
getEntries()
Get Attachment Entries as array |
MAttachmentEntry |
getEntry(int index)
Get Attachment Entry |
int |
getEntryCount()
Get Entry Count |
byte[] |
getEntryData(int index)
Get Entry Data |
File |
getEntryFile(int index,
File file)
Save Entry in File with name |
File |
getEntryFile(int index,
String fileName)
Get Entry File with name |
String |
getEntryName(int index)
Get Entry Name |
String |
getTextMsg()
Get Text Msg |
static void |
main(String[] args)
Test |
void |
setClientOrg(int AD_Client_ID,
int AD_Org_ID)
Set Client Org |
String |
toString()
String Representation |
| Methods inherited from class org.compiere.model.X_AD_Attachment |
|---|
get_AccessLevel, getAD_Attachment_ID, getAD_Table_ID, getBinaryData, getKeyNamePair, getRecord_ID, getTitle, initPO, setAD_Attachment_ID, setAD_Table_ID, setBinaryData, setRecord_ID, setTextMsg, setTitle |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NONE
public static final String ZIP
| Constructor Detail |
|---|
public MAttachment(Ctx ctx,
int AD_Attachment_ID,
String trxName)
ctx - contextAD_Attachment_ID - idtrxName - transaction
public MAttachment(Ctx ctx,
int AD_Table_ID,
int Record_ID,
String trxName)
ctx - contextAD_Table_ID - tableRecord_ID - recordtrxName - transaction
public MAttachment(Ctx ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result settrxName - transaction| Method Detail |
|---|
public static MAttachment get(Ctx ctx,
int AD_Table_ID,
int Record_ID)
ctx - contextAD_Table_ID - tableRecord_ID - record
public static boolean addEntry(PO po,
URI uri)
po - persistent objecturi - url or file reference
public static boolean addEntry(PO po,
File file)
po - persistent objectfile - file to be loaded
public void setClientOrg(int AD_Client_ID,
int AD_Org_ID)
setClientOrg in class POAD_Client_ID - clientAD_Org_ID - orgpublic void addTextMsg(String added)
added - textpublic String getTextMsg()
getTextMsg in class X_AD_Attachmentpublic String toString()
toString in class X_AD_Attachmentpublic boolean addEntry(File file)
file - file
public boolean addEntry(URI uri)
uri - uri
public boolean addEntry(String name,
byte[] data)
name - namedata - data
public boolean addEntry(MAttachmentEntry item)
item - attachment entry
public MAttachmentEntry getEntry(int index)
index - index of the item
public MAttachmentEntry[] getEntries()
public boolean deleteEntry(int index)
index - index
public boolean deleteAllEntries()
public int getEntryCount()
public String getEntryName(int index)
index - index
public void dumpEntryNames()
public byte[] getEntryData(int index)
index - index
public File getEntryFile(int index,
String fileName)
index - indexfileName - optional file name
public File getEntryFile(int index,
File file)
index - indexfile - file
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
public static void main(String[] args)
args - ignored
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||