Class MFreight

    • Constructor Detail

      • MFreight

        public MFreight​(Properties ctx,
                        int M_Freight_ID,
                        String trxName)
        Default constructor
        Parameters:
        ctx - Context
        M_Freight_ID - If set to 0 a new category is created.
        trxName - Name of database transaction
      • MFreight

        public MFreight​(Properties ctx,
                        ResultSet rs,
                        String trxName)
        Constructor using a resultset.
        Parameters:
        ctx - Context
        rs - ResultSet
        trxName - Name of database transaction
    • Method Detail

      • get

        public static MFreight get​(Properties ctx,
                                   int shipperId,
                                   int freightCategoryId,
                                   Timestamp dateOrdered,
                                   BigDecimal weight,
                                   BigDecimal maxProductDimension,
                                   int countryFrom,
                                   int countryTo,
                                   int regionFrom,
                                   int regionTo,
                                   String trxName)
        Get a freight record based on the parameters Shipper, Freight Category are used as filters DateOrdered is used to get the most recent record that is valid for that date MaxDimension is used to get records that are valid for such dimensions Country/Region From/To are used to get the records, first valid is the more detailed defined
        Parameters:
        ctx - Context
        shipperId - Shipper
        freightCategoryId - Freight Category
        dateOrdered - Date from the Order
        weight - Weight of the order
        maxProductDimension - Max Product Dimension from all products in the order
        countryFrom - Country of origin
        countryTo - Destination country
        regionFrom - Region of origin
        regionTo - Destination region
        trxName - Transaction Name
        Returns:
        a freight record or null if not found