public class DutyAttachment
extends java.lang.Object
Duty Attachment
This class represents objects stored as blobs at k_duties_attach tableModifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
DutyAttachment()
Default constructor
|
DutyAttachment(java.lang.String sIdDuty,
java.lang.String sNameFile,
int iSizeFile)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
createFromFile(JDCConnection oConn,
java.lang.String sDutyId,
java.lang.String sFilePath)
Insert attachment into k_duties_attach table
|
void |
delete(JDCConnection oConn)
Remove attachment from k_duties_attach table
|
static void |
delete(JDCConnection oConn,
java.lang.String sDutyId,
java.lang.String sFileName)
Remove attachment from k_dutys_attach table
|
java.lang.String |
dutyId() |
java.lang.String |
fileName() |
byte[] |
getBytes(JDCConnection oConn)
Get stored attachment as byte array
|
int |
size() |
public static final short ClassId
public DutyAttachment()
public DutyAttachment(java.lang.String sIdDuty, java.lang.String sNameFile, int iSizeFile)
sIdDuty
- String GUID of DutysNameFile
- String File NameiSizeFile
- int File size in bytespublic int size()
public java.lang.String fileName()
public java.lang.String dutyId()
public byte[] getBytes(JDCConnection oConn) throws java.sql.SQLException, java.io.IOException
oConn
- JDCConnectionjava.sql.SQLException
java.io.IOException
public void delete(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public static void delete(JDCConnection oConn, java.lang.String sDutyId, java.lang.String sFileName) throws java.sql.SQLException
oConn
- JDCConnectionsDutyId
- StringsFileName
- Stringjava.sql.SQLException
public static void createFromFile(JDCConnection oConn, java.lang.String sDutyId, java.lang.String sFilePath) throws java.sql.SQLException, java.io.FileNotFoundException, java.io.IOException, java.lang.NullPointerException
oConn
- JDCConnectionsDutyId
- String GUID of Duty to which attachment belongssFilePath
- String Full path to local filejava.sql.SQLException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException