Class TimesheetAudit

java.lang.Object
com.primavera.integration.client.BOBase
com.primavera.integration.client.bo.BusinessObject
com.primavera.integration.client.bo.object.TimesheetAudit

public class TimesheetAudit extends BusinessObject

The timesheet audit class facilitates reading the timesheet audit records, added to the PM database as triggered by user activity, one record at a time. Fields that can be loaded on the TimesheetAudit object include information about the approval and rejection history (e.g., reviewers and review dates), information about the timesheets (e.g., number of overhead, overtime, and project hours), and information about the audit (e.g, the date the timesheet audit was created). Timesheet audits are readonly.

See Also:   Quick reference of TimesheetAudit fields

  • Constructor Details

    • TimesheetAudit

      public TimesheetAudit(Session session)
      Class constructor specifying the Session. This constructor is most commonly used when create() is intended to be called on this object.
      Parameters:
      session - the Session
    • TimesheetAudit

      public TimesheetAudit(Session session, ObjectId objId) throws BusinessObjectException
      Class constructor specifying the Session and ObjectId of the object.
      Parameters:
      session - the Session
      objId - the ObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • TimesheetAudit

      public TimesheetAudit(Session session, com.primavera.infr.db.PrmRowSet rowSet, int iIndex) throws BusinessObjectException
      Class constructor called internally after objects are retrieved from the server. Client code should use one of the other constructors for this class.
      Parameters:
      session - the Session
      rowSet - the PrmRowSet retrieved from the server
      iIndex - the row index in the PrmRowSet associated with this business object
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
  • Method Details

    • getObjectId

      public ObjectId getObjectId() throws BusinessObjectException
      Gets the unique ID generated by the system. This field is automatically loaded by default whenever this type of business object is loaded from the database.
      Overrides:
      getObjectId in class BusinessObject
      Returns:
      the value in the field ObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getAuditDate

      public Date getAuditDate() throws BusinessObjectException
      Gets the date this timesheet audit was created.
      Returns:
      the value in the field AuditDate
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getResourceObjectId

      public ObjectId getResourceObjectId() throws BusinessObjectException
      Gets the unique ID of the associated resource. This field is automatically loaded by default whenever this type of business object is loaded from the database.
      Returns:
      the value in the field ResourceObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getResourceId

      public String getResourceId() throws BusinessObjectException
      Gets the short code that uniquely identifies the resource.
      Returns:
      the value in the field ResourceId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getResourceName

      public String getResourceName() throws BusinessObjectException
      Gets the name of the resource.
      Returns:
      the value in the field ResourceName
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetStatus

      public TimesheetStatus getTimesheetStatus() throws BusinessObjectException
      Gets the status of the timesheet. Valid values are 'Submitted', 'Approved', 'Resource Manager Approved', 'Project Manager Approved', and 'Rejected'.
      Returns:
      the value in the field TimesheetStatus
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getProjectHours

      public double getProjectHours() throws BusinessObjectException
      Gets the total project hours for the timesheet.
      Returns:
      the value in the field ProjectHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getProjectOvertimeHours

      public double getProjectOvertimeHours() throws BusinessObjectException
      Gets the total project overtime hours for the timesheet.
      Returns:
      the value in the field ProjectOvertimeHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getPendingProjectHours

      public double getPendingProjectHours() throws BusinessObjectException
      Gets the total pending project hours for the timesheet.
      Returns:
      the value in the field PendingProjectHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getPendingProjectOvertimeHours

      public double getPendingProjectOvertimeHours() throws BusinessObjectException
      Gets the total pending project overtime hours for the timesheet.
      Returns:
      the value in the field PendingProjectOvertimeHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getOverheadHours

      public double getOverheadHours() throws BusinessObjectException
      Gets the total overhead hours for the timesheet.
      Returns:
      the value in the field OverheadHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getOverheadOvertimeHours

      public double getOverheadOvertimeHours() throws BusinessObjectException
      Gets the total overhead overtime hours for the timesheet.
      Returns:
      the value in the field OverheadOvertimeHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getPendingOverheadHours

      public double getPendingOverheadHours() throws BusinessObjectException
      Gets the total pending overhead hours for the timesheet.
      Returns:
      the value in the field PendingOverheadHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getPendingOverheadOvertimeHours

      public double getPendingOverheadOvertimeHours() throws BusinessObjectException
      Gets the total pending overhead overtime hours for the timesheet.
      Returns:
      the value in the field PendingOverheadOvertimeHours
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetPeriodObjectId

      public ObjectId getTimesheetPeriodObjectId() throws BusinessObjectException
      Gets the unique ID of the timesheet period. This field is automatically loaded by default whenever this type of business object is loaded from the database.
      Returns:
      the value in the field TimesheetPeriodObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetPeriodStartDate

      public Date getTimesheetPeriodStartDate() throws BusinessObjectException
      Gets the timesheet period start date.
      Returns:
      the value in the field TimesheetPeriodStartDate
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetPeriodEndDate

      public Date getTimesheetPeriodEndDate() throws BusinessObjectException
      Gets the timesheet period end date.
      Returns:
      the value in the field TimesheetPeriodEndDate
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getProjectObjectId

      public ObjectId getProjectObjectId() throws BusinessObjectException
      Gets the unique ID of the associated project. This field is automatically loaded by default whenever this type of business object is loaded from the database.
      Returns:
      the value in the field ProjectObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getProjectId

      public String getProjectId() throws BusinessObjectException
      Gets the short code that uniquely identifies the project.
      Returns:
      the value in the field ProjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetActivityStatus

      public ResourceHourStatus getTimesheetActivityStatus() throws BusinessObjectException
      Gets the status of the timesheet activity, the value of which will depend on who approved or rejected it. Valid values are 'Submitted', 'Approved', 'Resource Manager Approved', 'Project Manager Approved', and 'Rejected'.
      Returns:
      the value in the field TimesheetActivityStatus
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getApproverUserObjectId

      public ObjectId getApproverUserObjectId() throws BusinessObjectException
      Gets the unique user ID of the approver. This field is automatically loaded by default whenever this type of business object is loaded from the database.
      Returns:
      the value in the field ApproverUserObjectId
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getApproverUserName

      public String getApproverUserName() throws BusinessObjectException
      Gets the user name of the approver.
      Returns:
      the value in the field ApproverUserName
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getTimesheetApprovingAs

      public TimesheetApprovingAs getTimesheetApprovingAs() throws BusinessObjectException
      Gets the role of the timesheet approver. Valid values are 'Project Manager', 'Resource Manager', 'Project Manager Delegate', and 'Resource Manager Delegate'.
      Returns:
      the value in the field TimesheetApprovingAs
      Throws:
      BusinessObjectException - if a problem occurred in the client-side business objects
    • getFilterableFields

      public static String[] getFilterableFields()
      Gets all fields that can be filtered.
      Returns:
      String[] an array of filterable fields
    • getInternalDefaultLoadFields

      public static String[] getInternalDefaultLoadFields()
      An internal method that should not be called directly by client code.
      Returns:
      String[] an internal array
    • getAllFields

      public static String[] getAllFields()
      Gets all fields for this business object.
      Returns:
      String[] an array of all fields
    • getInternalAllFields

      public static String[] getInternalAllFields()
      An internal method that should not be called directly by client code.
      Returns:
      String[] an internal array
    • getInternalAllFieldsSet

      public static Set<String> getInternalAllFieldsSet()
      An internal method that should not be called directly by client code.
      Returns:
      String[] an internal array
    • getWritableFields

      public static String[] getWritableFields()
      Gets all writable fields for this business object.
      Returns:
      String[] an array of writable fields
    • getDefaultXMLExportFields

      @Deprecated public static String[] getDefaultXMLExportFields()
      Deprecated.
      Gets the fields that are exported by the hierarchical XML exporter when no fields are specified. This method is no longer relevant since the hierarchical XML exporter has been replaced by the flat XML exporter.
      Returns:
      String[] an array of field names
    • getMinimumXMLExportFields

      public static String[] getMinimumXMLExportFields()
      Gets all fields that are always exported at a minimum by the new flat XML exporter
      Returns:
      String[] an array of exported fields
    • toString

      public String toString()
      Returns a string representation of the object. The output is in XML.
      Overrides:
      toString in class Object
      Returns:
      String a string representation of the object.
    • load

      public static TimesheetAudit load(Session session, String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
      Loads a single TimesheetAudit object from the database.
      Parameters:
      session - the Session object
      fields - fields to load
      objId - unique ID of the TimesheetAudit object
      Returns:
      TimesheetAudit the TimesheetAudit object
      Throws:
      ServerException - if a problem occurred on the server-side
      NetworkException - if a problem occurred in the network layer
      BusinessObjectException - if a problem occurred in the client-side business objects
    • load

      public static BOIterator<TimesheetAudit> load(Session session, String[] fields, ObjectId[] objIds) throws ServerException, NetworkException, BusinessObjectException
      Loads multiple TimesheetAudit objects from the database.
      Parameters:
      session - the Session object
      fields - fields to load
      objIds - object ids of the TimesheetAudit objects
      Returns:
      BOIterator a business object iterator used to get the results of the load request
      Throws:
      ServerException - if a problem occurred on the server-side
      NetworkException - if a problem occurred in the network layer
      BusinessObjectException - if a problem occurred in the client-side business objects