public class Bug extends DBPersist
Bug or Project Incident
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
Bug()
Create empty bug
|
Bug(JDCConnection oConn,
int iPgBug,
java.lang.String sWorkArea)
Load Bug from database.
|
Bug(JDCConnection oConn,
java.lang.String sIdBug)
Load Bug from database.
|
Modifier and Type | Method and Description |
---|---|
void |
attachFile(JDCConnection oConn,
java.lang.String sFilePath)
Insert attachment into k_bugs_attach table
|
BugAttachment[] |
attachments(JDCConnection oConn)
Get array of attachments
|
BugChangeLog[] |
changeLog(JDCConnection oConn)
Get change log for all the values of a bug
|
BugChangeLog[] |
changeLog(JDCConnection oConn,
java.lang.String sColumnName)
Get change log for a column of a bug
|
boolean |
delete(JDCConnection oConn)
Delete Bug
Calls k_sp_del_bug stored procedure.
|
boolean |
delete(JDCConnection oConn,
java.util.Properties oCnf)
Delete Bug from database and from lucene index
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sBugGUID)
Delete Bug.
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sBugGUID,
java.util.Properties oCnf)
Delete bug from database and from Lucene index
|
static java.lang.String |
getIdFromPg(JDCConnection oConn,
int iBugPg,
java.lang.String sWorkArea)
Get Bug Unique Identifier from its numeric identifier.
|
static int |
getPgFromId(JDCConnection oConn,
java.lang.String sBugId)
Get Bug Numeric Identifier from Global Unique Identifier.
|
BugTrack[] |
getTrack(JDCConnection oConn)
Get track of conversations for a bug
|
void |
reIndex(JDCConnection oConn,
java.util.Properties oCnf)
Re-index bug
|
void |
removeAttachment(JDCConnection oConn,
java.lang.String sFileName)
Remove attachment from k_bugs_attach table
|
boolean |
store(JDCConnection oConn)
Store Bug and write its change log
This method automatically assigns a new bug number (pg_bug) if one is not
supplied by calling seq_k_bugs sequence
It also updates last modified date (dt_modified) and sinve v2.2 writes changes
to k_bugs_changelog if that table exists
|
boolean |
storeAndIndex(JDCConnection oConn,
java.util.Properties oCnf)
Store bug and add it to a Lucene index
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short ClassId
public Bug()
public Bug(JDCConnection oConn, java.lang.String sIdBug) throws java.sql.SQLException
oConn
- Database ConnectionsIdBug
- GUID of Bug to be loaded.java.sql.SQLException
public Bug(JDCConnection oConn, int iPgBug, java.lang.String sWorkArea) throws java.sql.SQLException
oConn
- Database ConnectioniPgBug
- int Numeric identifier of bug to be loadedsWorkArea
- String GUID of WorkArea to which Bug belongsjava.sql.SQLException
public boolean delete(JDCConnection oConn) throws java.sql.SQLException
Delete Bug
Calls k_sp_del_bug stored procedure.public boolean delete(JDCConnection oConn, java.util.Properties oCnf) throws java.sql.SQLException, java.io.IOException, java.lang.NoSuchFieldException, java.lang.IllegalAccessException
Delete Bug from database and from lucene index
oConn
- Database ConnectionoCnf
- Properties containing luceneindex pathjava.sql.SQLException
java.io.IOException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException
public boolean store(JDCConnection oConn) throws java.sql.SQLException
Store Bug and write its change log
This method automatically assigns a new bug number (pg_bug) if one is not supplied by calling seq_k_bugs sequence It also updates last modified date (dt_modified) and sinve v2.2 writes changes to k_bugs_changelog if that table existspublic boolean storeAndIndex(JDCConnection oConn, java.util.Properties oCnf) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchFieldException, java.lang.IllegalAccessException, java.lang.InstantiationException
oConn
- JDCConnectionoCnf
- Properties containing luceneindex pathjava.sql.SQLException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException
java.lang.InstantiationException
public void reIndex(JDCConnection oConn, java.util.Properties oCnf) throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException, java.lang.NoSuchFieldException, java.lang.IllegalAccessException, java.lang.InstantiationException
oConn
- JDCConnectionoCnf
- Propertiesjava.sql.SQLException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException
java.lang.InstantiationException
public void attachFile(JDCConnection oConn, java.lang.String sFilePath) throws java.sql.SQLException, java.io.FileNotFoundException, java.io.IOException, java.lang.NullPointerException
oConn
- JDCConnectionsFilePath
- String Full path to local filejava.sql.SQLException
java.io.FileNotFoundException
java.io.IOException
java.lang.NullPointerException
public void removeAttachment(JDCConnection oConn, java.lang.String sFileName) throws java.sql.SQLException
oConn
- JDCConnectionsFileName
- Stringjava.sql.SQLException
public BugAttachment[] attachments(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public BugChangeLog[] changeLog(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public BugChangeLog[] changeLog(JDCConnection oConn, java.lang.String sColumnName) throws java.sql.SQLException
oConn
- JDCConnectionsColumnName
- Stringjava.sql.SQLException
public BugTrack[] getTrack(JDCConnection oConn) throws java.sql.SQLException
oConn
- JDCConnectionjava.sql.SQLException
public static boolean delete(JDCConnection oConn, java.lang.String sBugGUID) throws java.sql.SQLException
Delete Bug.
Typically, bugs are never deleted, but their status is changed to some definitive solved or archived condition.oConn
- Database ConnectionsBugGUID
- GUID of Bug to be deleted.java.sql.SQLException
public static boolean delete(JDCConnection oConn, java.lang.String sBugGUID, java.util.Properties oCnf) throws java.sql.SQLException, java.io.IOException, java.lang.NoSuchFieldException, java.lang.IllegalAccessException
oConn
- JDCConnectionsBugGUID
- String Bug GUIDoCnf
- Properties containing luceneindex pathjava.sql.SQLException
java.io.IOException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException
public static int getPgFromId(JDCConnection oConn, java.lang.String sBugId) throws java.sql.SQLException
Get Bug Numeric Identifier from Global Unique Identifier.
Each Bug is assigned a GUID. But, as GUID are 32 characters hexadecimals string very difficult to remember, each bug is also automatically assigned to an integer identifier. The bug numeric identifier is an alternative primary key.oConn
- Database ConnectionsBugId
- Bug GUIDjava.sql.SQLException
public static java.lang.String getIdFromPg(JDCConnection oConn, int iBugPg, java.lang.String sWorkArea) throws java.sql.SQLException
Get Bug Unique Identifier from its numeric identifier.
Each Bug is assigned a GUID. But, as GUID are 32 characters hexadecimals string very difficult to remember, each bug is also automatically assigned to an integer identifier. The bug numeric identifier is an alternative primary key.oConn
- Database ConnectioniBugPg
- Bug numeric identifiersWorkArea
- GUIDjava.sql.SQLException