Class MCountry

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

public class MCountry extends X_C_Country implements Comparator<Object>, Serializable, ImmutablePOSupport
Location Country Model
Version:
$Id: MCountry.java,v 1.3 2006/07/30 00:58:18 jjanke Exp $ * @author Michael Judd (Akuna Ltd)
  • BF [ 2695078 ] Country is not translated on invoice
  • Author:
    Jorg Janke
    See Also:
    • Constructor Details

      • MCountry

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

        public MCountry(Properties ctx, int C_Country_ID, String trxName)
        Parameters:
        ctx - context
        C_Country_ID - ID
        trxName - transaction
      • MCountry

        public MCountry(Properties ctx, ResultSet rs, String trxName)
        Load Country from current row in ResultSet
        Parameters:
        ctx - context
        rs - ResultSet
        trxName - transaction
      • MCountry

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

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

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

      • get

        public static MCountry get(int C_Country_ID)
        Get Country (cached) (immutable)
        Parameters:
        C_Country_ID - ID
        Returns:
        Country
      • get

        public static MCountry get(Properties ctx, int C_Country_ID)
        Get Country (Immutable, cached)
        Parameters:
        ctx - context
        C_Country_ID - ID
        Returns:
        Country
      • getDefault

        @Deprecated public static MCountry getDefault(Properties ctx)
        Deprecated.
        Get Default Country
        Parameters:
        ctx - ignore
        Returns:
        Country
      • getDefault

        public static MCountry getDefault()
        Get Default Country (immutable)
        Returns:
        Country
      • getCountries

        @Deprecated public static MCountry[] getCountries(Properties ctx)
        Deprecated.
        Return Countries as Array
        Parameters:
        ctx - ignore
        Returns:
        MCountry Array
      • getCountries

        public static MCountry[] getCountries()
        Return Countries as Array
        Returns:
        MCountry Array
      • setDisplayLanguage

        @Deprecated(forRemoval=true, since="11") public static void setDisplayLanguage(String AD_Language)
        Deprecated, for removal: This API element is subject to removal in a future version.
        - not used at all, you can delete references to this method
        Set the Language for Display (toString)
        Parameters:
        AD_Language - language or null
      • toString

        public String toString()
        Return Name - translated if DisplayLanguage is set.
        Overrides:
        toString in class X_C_Country
        Returns:
        Name
      • getTrlName

        public String getTrlName()
        Get Translated Name
        Returns:
        name
      • getTrlName

        public String getTrlName(String language)
        Get Translated Name
        Parameters:
        language -
        Returns:
        name
      • getDisplaySequence

        public String getDisplaySequence()
        Get Display Sequence for city (C), region (R), postal code (P) and additional postal code (A).
        Specified by:
        getDisplaySequence in interface I_C_Country
        Overrides:
        getDisplaySequence in class X_C_Country
        Returns:
        display sequence
      • getDisplaySequenceLocal

        public String getDisplaySequenceLocal()
        Get Local Display Sequence for city (C), region (R), postal code (P) and additional postal code (A). If not defined get Display Sequence.
        Specified by:
        getDisplaySequenceLocal in interface I_C_Country
        Overrides:
        getDisplaySequenceLocal in class X_C_Country
        Returns:
        display sequence
      • compare

        public int compare(Object o1, Object o2)
        Compare based on Name
        Specified by:
        compare in interface Comparator<Object>
        Overrides:
        compare in class PO
        Parameters:
        o1 - object 1
        o2 - object 2
        Returns:
        -1,0, 1
      • isValidRegion

        public boolean isValidRegion(int C_Region_ID)
        Is the region valid in this country
        Parameters:
        C_Region_ID - region
        Returns:
        true if valid
      • markImmutable

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