Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.projtrack
Class Bug

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.projtrack.Bug

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public class Bug

extends DBPersist

Bug or Project Incident

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Field Summary
`static short` | `ClassId`

Fields inherited from class com.knowgate.dataobjs.DBPersist
`AllVals, sAuditCls, sAuditUsr, sTransactId`

Constructor Summary
`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.

Method Summary
`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

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, 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, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### Bug

    public Bug()

  Create empty bug

### Bug

    public Bug(JDCConnection oConn,
               java.lang.String sIdBug)
        throws java.sql.SQLException

  Load Bug from database.

  Parameters:
    `oConn` - Database Connection
    `sIdBug` - GUID of Bug to be loaded.
  Throws:
    `java.sql.SQLException`

### Bug

    public Bug(JDCConnection oConn,
               int iPgBug,
               java.lang.String sWorkArea)
        throws java.sql.SQLException

  Load Bug from database.

  Parameters:
    `oConn` - Database Connection
    `iPgBug` - int Numeric identifier of bug to be loaded
    `sWorkArea` - String GUID of WorkArea to which Bug belongs
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

Method Detail

### delete

    public boolean delete(JDCConnection oConn)
                   throws java.sql.SQLException

  Delete Bug

  Calls k_sp_del_bug stored procedure.

  Overrides:
    `delete` in class `DBPersist`
  Parameters:
    `oConn` - Database Connection
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`

### delete

    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

  Parameters:
    `oConn` - Database Connection
    `oCnf` - Properties containing luceneindex path
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
    `java.io.IOException`
    `java.lang.NoSuchFieldException`
    `java.lang.IllegalAccessException`
  Since:
    3.0

### store

    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 exists

  Overrides:
    `store` in class `DBPersist`
  Parameters:
    `oConn` - JDCConnection
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`

### storeAndIndex

    public 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

  Store bug and add it to a Lucene index

  Parameters:
    `oConn` - JDCConnection
    `oCnf` - Properties containing luceneindex path
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
    `java.io.IOException`
    `java.lang.ClassNotFoundException`
    `java.lang.NoSuchFieldException`
    `java.lang.IllegalAccessException`
    `java.lang.InstantiationException`
  Since:
    3.0

### reIndex

    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

  Re-index bug

  Parameters:
    `oConn` - JDCConnection
    `oCnf` - Properties
  Throws:
    `java.sql.SQLException`
    `java.io.IOException`
    `java.lang.ClassNotFoundException`
    `java.lang.NoSuchFieldException`
    `java.lang.IllegalAccessException`
    `java.lang.InstantiationException`
  Since:
    3.0

### attachFile

    public void attachFile(JDCConnection oConn,
                           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
    `sFilePath` - String Full path to local file
  Throws:
    `java.sql.SQLException`
    `java.io.FileNotFoundException`
    `java.io.IOException`
    `java.lang.NullPointerException`
  Since:
    3.0

### removeAttachment

    public void removeAttachment(JDCConnection oConn,
                                 java.lang.String sFileName)
                          throws java.sql.SQLException

  Remove attachment from k_bugs_attach table

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

### attachments

    public BugAttachment[] attachments(JDCConnection oConn)
                                throws java.sql.SQLException

  Get array of attachments

  Parameters:
    `oConn` - JDCConnection
  Returns:
    BugAttachment[] Array of BugAttachment objects or null if this Bug has no attachments
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### changeLog

    public BugChangeLog[] changeLog(JDCConnection oConn)
                             throws java.sql.SQLException

  Get change log for all the values of a bug

  Parameters:
    `oConn` - JDCConnection
  Returns:
    BugChangeLog[]
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### changeLog

    public BugChangeLog[] changeLog(JDCConnection oConn,
                                    java.lang.String sColumnName)
                             throws java.sql.SQLException

  Get change log for a column of a bug

  Parameters:
    `oConn` - JDCConnection
    `sColumnName` - String
  Returns:
    BugChangeLog[]
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### getTrack

    public BugTrack[] getTrack(JDCConnection oConn)
                        throws java.sql.SQLException

  Get track of conversations for a bug

  Parameters:
    `oConn` - JDCConnection
  Returns:
    BugTrack[] or null if there is no track record for this bug
  Throws:
    `java.sql.SQLException`
  Since:
    3.0

### delete

    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.
  Calls k_sp_del_bug stored procedure.

  Parameters:
    `oConn` - Database Connection
    `sBugGUID` - GUID of Bug to be deleted.
  Throws:
    `java.sql.SQLException`

### delete

    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

  Delete bug from database and from Lucene index

  Parameters:
    `oConn` - JDCConnection
    `sBugGUID` - String Bug GUID
    `oCnf` - Properties containing luceneindex path
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`
    `java.io.IOException`
    `java.lang.NoSuchFieldException`
    `java.lang.IllegalAccessException`
  Since:
    3.0

### getPgFromId

    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.

  Parameters:
    `oConn` - Database Connection
    `sBugId` - Bug GUID
  Returns:
    Bug Integer Identifier
  Throws:
    `java.sql.SQLException`

### getIdFromPg

    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.

  Parameters:
    `oConn` - Database Connection
    `iBugPg` - Bug numeric identifier
    `sWorkArea` - GUID
  Returns:
    Bug GUID or null if no bug with such numeric identifier is found at given WorkArea
  Throws:
    `java.sql.SQLException`
  Since:
    2.2

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD