Class MUOM

    • Constructor Detail

      • MUOM

        public MUOM​(Properties ctx,
                    int C_UOM_ID,
                    String trxName)
        Constructor.
        Parameters:
        ctx - context
        C_UOM_ID - UOM ID
        trxName - transaction
      • MUOM

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

        public MUOM​(MUOM copy)
        Parameters:
        copy -
      • MUOM

        public MUOM​(Properties ctx,
                    MUOM copy)
        Parameters:
        ctx -
        copy -
      • MUOM

        public MUOM​(Properties ctx,
                    MUOM copy,
                    String trxName)
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Detail

      • getMinute_UOM_ID

        public static int getMinute_UOM_ID​(Properties ctx)
        Get Minute C_UOM_ID
        Parameters:
        ctx - context
        Returns:
        C_UOM_ID for Minute
      • getDefault_UOM_ID

        public static int getDefault_UOM_ID​(Properties ctx)
        Get Default C_UOM_ID
        Parameters:
        ctx - context for AD_Client
        Returns:
        C_UOM_ID
      • get

        public static MUOM get​(int C_UOM_ID)
        Get UOM from Cache (immutable)
        Parameters:
        C_UOM_ID - ID
        Returns:
        UOM
      • get

        public static MUOM get​(Properties ctx,
                               int C_UOM_ID)
        Get UOM from Cache (immutable)
        Parameters:
        ctx - context
        C_UOM_ID - ID
        Returns:
        UOM
      • get

        public static MUOM get​(Properties ctx,
                               String name,
                               String trxName)
        Get UOM by name
        Parameters:
        ctx -
        name -
        trxName -
        Returns:
        MUOM if found, null if not found
      • getPrecision

        public static int getPrecision​(Properties ctx,
                                       int C_UOM_ID)
        Get Precision
        Parameters:
        ctx - context
        C_UOM_ID - ID
        Returns:
        Precision
      • loadUOMs

        protected static void loadUOMs​(Properties ctx)
        Load All UOMs
        Parameters:
        ctx - context
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_UOM
        Returns:
        info
      • round

        public BigDecimal round​(BigDecimal qty,
                                boolean stdPrecision)
        Round qty
        Parameters:
        qty - quantity
        stdPrecision - true if std precisison
        Returns:
        rounded quantity
      • isSecond

        public boolean isSecond()
        Second
        Returns:
        true if UOM is second
      • isMinute

        public boolean isMinute()
        Minute
        Returns:
        true if UOM is minute
      • isHour

        public boolean isHour()
        Hour
        Returns:
        true if UOM is hour
      • isDay

        public boolean isDay()
        Day
        Returns:
        true if UOM is Day
      • isWorkDay

        public boolean isWorkDay()
        WorkDay
        Returns:
        true if UOM is work day
      • isWeek

        public boolean isWeek()
        Week
        Returns:
        true if UOM is Week
      • isMonth

        public boolean isMonth()
        Month
        Returns:
        true if UOM is Month
      • isWorkMonth

        public boolean isWorkMonth()
        WorkMonth
        Returns:
        true if UOM is Work Month
      • isYear

        public boolean isYear()
        Year
        Returns:
        true if UOM is year