Class MUOM

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

public class MUOM extends X_C_UOM implements ImmutablePOSupport
Unit Of Measure Model
Version:
$Id: MUOM.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Field Details

  • Constructor Details

    • MUOM

      public MUOM(Properties ctx, String C_UOM_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      C_UOM_UU - UUID key
      trxName - Transaction
    • 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)
      Copy constructor
      Parameters:
      copy -
    • MUOM

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

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

    • 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 to use std precision for rounding
      Returns:
      rounded quantity
    • isSecond

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

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

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

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

      public boolean isWorkDay()
      Is Working Day
      Returns:
      true if UOM is work day
    • isWeek

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

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

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

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

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