com.knowgate.projtrack
Class Duty

java.lang.Object
  extended by com.knowgate.dataobjs.DBPersist
      extended by com.knowgate.projtrack.Duty
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class Duty
extends DBPersist

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
Duty()
          Create empty Duty
Duty(JDCConnection oConn, java.lang.String sIdDuty)
          Load Duty from database
 
Method Summary
 boolean delete(JDCConnection oConn)
          Delete Duty Calls k_sp_del_duty stored procedure.
static boolean delete(JDCConnection oConn, java.lang.String sDutyGUID)
          Delete Duty Calls k_sp_del_duty stored procedure.
 Resource[] resources(JDCConnection oConn)
          Get resources assigned to this duty
 boolean store(JDCConnection oConn)
          Store Duty If gu_duty is null a new GUID is automatically assigned.
 java.lang.String toXML(java.lang.String sIdent, java.lang.String sDelim, java.util.HashMap oAttrs)
          Get an XML dump for the DBPersist values
 
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, 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

Duty

public Duty()
Create empty Duty


Duty

public Duty(JDCConnection oConn,
            java.lang.String sIdDuty)
     throws java.sql.SQLException
Load Duty from database

Throws:
java.sql.SQLException
Method Detail

delete

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

Delete Duty

Calls k_sp_del_duty stored procedure.

Overrides:
delete in class DBPersist
Parameters:
oConn - Database Connection
Returns:
true if register was successfully erased, false if not.
Throws:
java.sql.SQLException

store

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

Store Duty

If gu_duty is null a new GUID is automatically assigned.
dt_modified field is set to current date.

Overrides:
store in class DBPersist
Parameters:
oConn - Database Connection
Returns:
boolean true if register was stored for the first time, false if register already existed.
Throws:
java.sql.SQLException

resources

public Resource[] resources(JDCConnection oConn)
                     throws java.lang.IllegalStateException,
                            java.sql.SQLException

Get resources assigned to this duty

Parameters:
oConn - Database Connection
Throws:
java.lang.IllegalStateException
java.sql.SQLException
Since:
5.0

toXML

public java.lang.String toXML(java.lang.String sIdent,
                              java.lang.String sDelim,
                              java.util.HashMap oAttrs)
Description copied from class: DBPersist

Get an XML dump for the DBPersist values

Overrides:
toXML in class DBPersist
Parameters:
sIdent - Number of blank spaces for left padding at every line.
sDelim - Line delimiter (usually "\n" or "\r\n")
oAttrs - Map of values to be added as attributes of the toplevel node
Returns:
XML String

delete

public static boolean delete(JDCConnection oConn,
                             java.lang.String sDutyGUID)
                      throws java.sql.SQLException

Delete Duty

Calls k_sp_del_duty stored procedure.

Parameters:
oConn - Database Connection
sDutyGUID - GUID of Duty to be deleted
Throws:
java.sql.SQLException