Class MDocType

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

public class MDocType extends X_C_DocType implements ImmutablePOSupport
Document Type Model
Version:
$Id: MDocType.java,v 1.3 2006/07/30 00:54:54 jjanke Exp $
Author:
Jorg Janke, Karsten Thiemann FR [ 1782412 ], Teo Sarca, www.arhipac.ro
  • BF [ 2476824 ] MDocType.getOfDocBaseType should return ONLY active records
  • BF [ - ] MDocType.getOfClient should return ONLY active records. See https://sourceforge.net/forum/message.php?msg_id=6499893
  • See Also:
    • Constructor Details

      • MDocType

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

        public MDocType(Properties ctx, int C_DocType_ID, String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        C_DocType_ID - id
        trxName - transaction
      • MDocType

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

        public MDocType(Properties ctx, String DocBaseType, String Name, String trxName)
        New MDocType Constructor
        Parameters:
        ctx - context
        DocBaseType - document base type
        Name - name
        trxName - transaction
      • MDocType

        public MDocType(MDocType copy)
        Copy constructor
        Parameters:
        copy -
      • MDocType

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

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

      • getDocType

        public static int getDocType(String DocBaseType)
        Return the first Doc Type for this BaseType
        Parameters:
        DocBaseType -
        Returns:
        C_DocType_ID
      • getOfDocBaseType

        public static MDocType[] getOfDocBaseType(Properties ctx, String DocBaseType)
        Get Client Document Type with DocBaseType
        Parameters:
        ctx - context
        DocBaseType - base document type
        Returns:
        array of doc types
      • getOfClient

        public static MDocType[] getOfClient(Properties ctx)
        Get Client Document Types
        Parameters:
        ctx - context
        Returns:
        array of doc types
      • get

        public static MDocType get(int C_DocType_ID)
        Get Document Type (cached) (immutable)
        Parameters:
        C_DocType_ID - id
        Returns:
        document type
      • get

        public static MDocType get(Properties ctx, int C_DocType_ID)
        Get Document Type (cached) (immutable)
        Parameters:
        ctx - context
        C_DocType_ID - id
        Returns:
        document type
      • setGL_Category_ID

        public void setGL_Category_ID()
        Set Default GL Category
      • setIsSOTrx

        public void setIsSOTrx()
        Set IsSOTrx based on document base type
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_DocType
        Returns:
        info
      • isQuotation

        public boolean isQuotation()
        Is this a Quotation (Binding)
        Returns:
        true if Quotation
      • isProposal

        public boolean isProposal()
        Is this a Proposal (Not binding)
        Returns:
        true if proposal
      • isOffer

        public boolean isOffer()
        Is this a Proposal or Quotation
        Returns:
        true if proposal or quotation
      • getPrintName

        public String getPrintName(String AD_Language)
        Get Print Name
        Parameters:
        AD_Language - language
        Returns:
        print name if available translated
      • 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
      • getShipmentReceiptDocType

        public static int getShipmentReceiptDocType(int docTypeId)
        Get shipment/receipt document type based on document type (docTypeId) provided
        Parameters:
        docTypeId - order/rma/vendor return/return material
        Returns:
        shipment/receipt doctype id
      • getNameTrl

        public String getNameTrl()
        Get translated doctype name
        Returns:
        Name if available translated
      • markImmutable

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