com.knowgate.projtrack
Class BugAttachment

java.lang.Object
  extended bycom.knowgate.projtrack.BugAttachment

public class BugAttachment
extends java.lang.Object

Bug Attachment

This class represents objects stored as blobs at k_bugs_attach table

Version:
3.0

Field Summary
static short ClassId
           
 
Constructor Summary
BugAttachment()
           
BugAttachment(java.lang.String sIdBug, java.lang.String sNameFile, int iSizeFile)
           
 
Method Summary
 java.lang.String bugId()
           
static void createFromFile(JDCConnection oConn, java.lang.String sBugId, java.lang.String sFilePath)
          Insert attachment into k_bugs_attach table
 void delete(JDCConnection oConn)
          Remove attachment from k_bugs_attach table
static void delete(JDCConnection oConn, java.lang.String sBugId, java.lang.String sFileName)
          Remove attachment from k_bugs_attach table
 java.lang.String fileName()
           
 byte[] getBytes(JDCConnection oConn)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClassId

public static final short ClassId
See Also:
Constant Field Values
Constructor Detail

BugAttachment

public BugAttachment()

BugAttachment

public BugAttachment(java.lang.String sIdBug,
                     java.lang.String sNameFile,
                     int iSizeFile)
Method Detail

size

public int size()

fileName

public java.lang.String fileName()

bugId

public java.lang.String bugId()

getBytes

public byte[] getBytes(JDCConnection oConn)
                throws java.sql.SQLException,
                       java.io.IOException
Throws:
java.sql.SQLException
java.io.IOException

delete

public void delete(JDCConnection oConn)
            throws java.sql.SQLException
Remove attachment from k_bugs_attach table

Parameters:
oConn - JDCConnection
Throws:
java.sql.SQLException

delete

public static void delete(JDCConnection oConn,
                          java.lang.String sBugId,
                          java.lang.String sFileName)
                   throws java.sql.SQLException
Remove attachment from k_bugs_attach table

Parameters:
oConn - JDCConnection
sBugId - String
sFileName - String
Throws:
java.sql.SQLException

createFromFile

public static void createFromFile(JDCConnection oConn,
                                  java.lang.String sBugId,
                                  java.lang.String sFilePath)
                           throws java.sql.SQLException,
                                  java.io.FileNotFoundException,
                                  java.io.IOException,
                                  java.lang.NullPointerException
Insert attachment into k_bugs_attach table

Parameters:
oConn - JDCConnection
sBugId - String GUID of Bug to which attachment belongs
sFilePath - String Full path to local file
Throws:
java.sql.SQLException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException