Class MRequestType

    • Constructor Detail

      • 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)
        Parameters:
        copy -
    • Method Detail

      • 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:
        no
      • getOpenNo

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

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

        public int getNew30No()
        Get New in the last 30 days of type
        Returns:
        no
      • 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:
        status or 0
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • 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