Class MPackage

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

public class MPackage extends X_M_Package
Shipment Package Model
Version:
$Id: MPackage.java,v 1.3 2006/07/30 00:51:04 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MPackage

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

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

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

      public MPackage(MInOut shipment, MShipper shipper)
      Shipment Constructor
      Parameters:
      shipment - shipment
      shipper - shipper
  • Method Details

    • create

      public static MPackage create(MInOut shipment, MShipper shipper, Timestamp shipDate)
      Create Package with one MPackageMPS for Shipment
      Parameters:
      shipment - shipment
      shipper - shipper
      shipDate - null for today
      Returns:
      package
    • createPackage

      public static MPackage createPackage(MInOut shipment, MShipper shipper, Timestamp shipDate)
      Create shipment package
      Parameters:
      shipment -
      shipper -
      shipDate -
      Returns:
    • 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
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success
    • beforeDelete

      protected boolean beforeDelete()
      Description copied from class: PO
      Execute before Delete operations.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeDelete in class PO
      Returns:
      true if record can be deleted
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Parameters:
      errorMessage -
    • getErrorMessage

      public String getErrorMessage()
      Returns:
      error message
    • processOnline

      public boolean processOnline(String action, boolean isPriviledgedRate)
      Execute online processing of shipment package
      Parameters:
      action - MShippingTransaction.ACTION_*
      isPriviledgedRate -
      Returns:
      true if success
    • createShippingTransaction

      public MShippingTransaction createShippingTransaction(String action, boolean isPriviledgedRate, String trxName)
      Create online shipping transaction
      Parameters:
      action - MShippingTransaction.ACTION_*
      isPriviledgedRate -
      trxName -
      Returns:
      MShippingTransaction