Class MRfQResponseLineQty

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

public class MRfQResponseLineQty extends X_C_RfQResponseLineQty implements Comparator<Object>
RfQ Response Line Qty
Version:
$Id: MRfQResponseLineQty.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MRfQResponseLineQty

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

      public MRfQResponseLineQty(Properties ctx, int C_RfQResponseLineQty_ID, String trxName)
      Parameters:
      ctx - context
      C_RfQResponseLineQty_ID - id
      trxName - transaction
    • MRfQResponseLineQty

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

      public MRfQResponseLineQty(MRfQResponseLine line, MRfQLineQty qty)
      Parent Constructor
      Parameters:
      line - line
      qty - qty
  • Method Details

    • getRfQLineQty

      public MRfQLineQty getRfQLineQty()
      Get RfQ Line Qty
      Returns:
      RfQ Line Qty
    • isValidAmt

      public boolean isValidAmt()
      Is the Amount Valid.
      - Price > 0
      - Discount <= 100
      - Net Amount > 0
      Returns:
      true if valid
    • getNetAmt

      public BigDecimal getNetAmt()
      Get Net Amt (price minus discount in %)
      Returns:
      net amount or null
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_C_RfQResponseLineQty
      Returns:
      info
    • compare

      public int compare(Object o1, Object o2)
      Compare based on net amount
      Specified by:
      compare in interface Comparator<Object>
      Overrides:
      compare in class PO
      Parameters:
      o1 - the first object to be compared.
      o2 - the second object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
      Throws:
      ClassCastException - if the arguments' types prevent them from being compared by this Comparator.
    • equals

      public boolean equals(Object obj)
      Is Net Amount equal ?
      Specified by:
      equals in interface Comparator<Object>
      Overrides:
      equals in class PO
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if Net Amount equal
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class PO
    • 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