Class MBPartnerLocation

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

public class MBPartnerLocation extends X_C_BPartner_Location
Partner Location Model
Version:
$Id: MBPartnerLocation.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, www.arhipac.ro
  • FR [ 2788465 ] MBPartnerLocation.getForBPartner method add trxName https://sourceforge.net/p/adempiere/feature-requests/715/
  • See Also:
    • Constructor Details

      • MBPartnerLocation

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

        public MBPartnerLocation(Properties ctx, int C_BPartner_Location_ID, String trxName)
        Default Constructor
        Parameters:
        ctx - context
        C_BPartner_Location_ID - id
        trxName - transaction
      • MBPartnerLocation

        public MBPartnerLocation(MBPartner bp)
        BP Parent Constructor
        Parameters:
        bp - partner
      • MBPartnerLocation

        public MBPartnerLocation(Properties ctx, ResultSet rs, String trxName)
        Constructor from ResultSet row
        Parameters:
        ctx - context
        rs - current row of result set to be loaded
        trxName - transaction
      • MBPartnerLocation

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

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

        public MBPartnerLocation(Properties ctx, MBPartnerLocation copy, String trxName)
        Copy constructor
        Parameters:
        ctx -
        copy -
        trxName -
      • MBPartnerLocation

        public MBPartnerLocation(Properties ctx, int C_BPartner_Location_ID, String trxName, String... virtualColumns)
        Parameters:
        ctx -
        C_BPartner_Location_ID -
        trxName -
        virtualColumns -
    • Method Details

      • getForBPartner

        @Deprecated(forRemoval=true, since="11") public static MBPartnerLocation[] getForBPartner(Properties ctx, int C_BPartner_ID)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Since 3.5.3a. Please use getForBPartner(Properties, int, String).
        Get Locations for BPartner
        Parameters:
        ctx - context
        C_BPartner_ID - bp
        Returns:
        array of locations
      • getForBPartner

        public static MBPartnerLocation[] getForBPartner(Properties ctx, int C_BPartner_ID, String trxName)
        Get Locations for BPartner
        Parameters:
        ctx - context
        C_BPartner_ID - bp
        trxName -
        Returns:
        array of locations
      • getLocation

        public MLocation getLocation(boolean requery)
        Get Location/Address
        Parameters:
        requery - get again the location from DB
        Returns:
        location
      • toString

        public String toString()
        String Representation
        Overrides:
        toString in class X_C_BPartner_Location
        Returns:
        info
      • 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
      • getBPLocName

        public String getBPLocName(MLocation address)
        Create unique BP location name
        Parameters:
        address -
        Returns:
        unique BP location name for address