Class MCountry

    • Constructor Detail

      • MCountry

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

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

        public MCountry​(MCountry copy)
        Parameters:
        copy -
    • Method Detail

      • 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

        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

        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

        public static void setDisplayLanguage​(String AD_Language)
        Deprecated.
        - 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
      • 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 the country
        Parameters:
        C_Region_ID - region
        Returns:
        true if valid