Class MRequestType

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_Persistent, I_R_RequestType, Evaluatee, ImmutablePOSupport

public class MRequestType extends X_R_RequestType implements ImmutablePOSupport
Request Type Model
Version:
$Id: MRequestType.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ Teo Sarca - bug fix [ 1642833 ] MRequestType minor typo bug
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MRequestType

      public MRequestType(Properties ctx, String R_RequestType_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      R_RequestType_UU - UUID key
      trxName - Transaction
    • MRequestType

      public MRequestType(Properties ctx, int R_RequestType_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      R_RequestType_ID - id
      trxName - transaction
    • MRequestType

      public MRequestType(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - transaction
    • MRequestType

      public MRequestType(MRequestType copy)
      Copy constructor
      Parameters:
      copy -
    • MRequestType

      public MRequestType(Properties ctx, MRequestType copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MRequestType

      public MRequestType(Properties ctx, MRequestType copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • get

      public static MRequestType get(int R_RequestType_ID)
      Get Request Type (cached) (immutable)
      Parameters:
      R_RequestType_ID - id
      Returns:
      Request Type
    • get

      public static MRequestType get(Properties ctx, int R_RequestType_ID)
      Get Request Type (cached) (immutable)
      Parameters:
      ctx - context
      R_RequestType_ID - id
      Returns:
      Request Type
    • getCopy

      public static MRequestType getCopy(Properties ctx, int R_RequestType_ID, String trxName)
      Get updateable copy of MRequestType from cache
      Parameters:
      ctx -
      R_RequestType_ID -
      trxName -
      Returns:
      MRequestType
    • getDefault

      public static MRequestType getDefault(Properties ctx)
      Get Default Request Type
      Parameters:
      ctx - context
      Returns:
      Request Type
    • getTotalNo

      public int getTotalNo()
      Get total No of requests of type
      Returns:
      total No of requests
    • getOpenNo

      public int getOpenNo()
      Get no of open requests of type
      Returns:
      no of open requests
    • getClosed30No

      public int getClosed30No()
      Get closed in last 30 days of type
      Returns:
      no of request closed in last 30 days
    • getNew30No

      public int getNew30No()
      Get new request in last 30 days of type
      Returns:
      no of new request in last 30 days
    • getRequests

      public MRequest[] getRequests(boolean selfService, int C_BPartner_ID)
      Get Requests of Type
      Parameters:
      selfService - self service
      C_BPartner_ID - id or 0 for public
      Returns:
      array of requests
    • getRequests

      public MRequest[] getRequests()
      Get public requests of Type
      Returns:
      array of requests
    • getDefaultR_Status_ID

      public int getDefaultR_Status_ID()
      Get Default R_Status_ID for Type
      Returns:
      R_Status_ID or 0
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_R_RequestType
      Returns:
      info
    • getSqlPI

      public String getSqlPI(MGoalRestriction[] restrictions, String MeasureScope, String MeasureDataType, Timestamp reportDate, MRole role)
      Get Sql to return single value for the Performance Indicator
      Parameters:
      restrictions - array of goal restrictions
      MeasureScope - scope of this value
      MeasureDataType - data type
      reportDate - optional report date
      role - role
      Returns:
      sql for performance indicator
    • getSqlBarChart

      public String getSqlBarChart(MGoalRestriction[] restrictions, String MeasureDisplay, String MeasureDataType, Timestamp startDate, MRole role)
      Get Sql to value for the bar chart
      Parameters:
      restrictions - array of goal restrictions
      MeasureDisplay - scope of this value
      MeasureDataType - data type
      startDate - optional report start date
      role - role
      Returns:
      sql for Bar Chart
    • getQuery

      public MQuery getQuery(MGoalRestriction[] restrictions, String MeasureDisplay, Timestamp date, int R_Status_ID, MRole role)
      Get Zoom Query
      Parameters:
      restrictions - array of restrictions
      MeasureDisplay - display
      date - date
      R_Status_ID - status
      role - role
      Returns:
      query
    • markImmutable

      public MRequestType markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO