Package org.compiere.model
Class MCountry
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_C_Country
org.compiere.model.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:
-
Field Summary
Fields inherited from class org.compiere.model.X_C_Country
AD_LANGUAGE_AD_Reference_IDFields inherited from class org.compiere.model.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, LOCAL_TRX_PREFIX, log, p_ctx, p_info, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_IDFields inherited from interface org.compiere.model.I_C_Country
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Language, COLUMNNAME_AD_Org_ID, COLUMNNAME_AllowCitiesOutOfList, COLUMNNAME_C_Country_ID, COLUMNNAME_C_Country_UU, COLUMNNAME_C_Currency_ID, COLUMNNAME_CaptureSequence, COLUMNNAME_CountryCode, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_DisplaySequence, COLUMNNAME_DisplaySequenceLocal, COLUMNNAME_ExpressionBankAccountNo, COLUMNNAME_ExpressionBankRoutingNo, COLUMNNAME_ExpressionPhone, COLUMNNAME_ExpressionPostal, COLUMNNAME_ExpressionPostal_Add, COLUMNNAME_HasPostal_Add, COLUMNNAME_HasRegion, COLUMNNAME_IsActive, COLUMNNAME_IsAddressLinesLocalReverse, COLUMNNAME_IsAddressLinesReverse, COLUMNNAME_ISOCountryCodeAlpha3, COLUMNNAME_IsPostcodeLookup, COLUMNNAME_LookupClassName, COLUMNNAME_LookupClientID, COLUMNNAME_LookupPassword, COLUMNNAME_LookupUrl, COLUMNNAME_M49Code, COLUMNNAME_MediaSize, COLUMNNAME_Name, COLUMNNAME_PlaceholderAddress1, COLUMNNAME_PlaceholderAddress2, COLUMNNAME_PlaceholderAddress3, COLUMNNAME_PlaceholderAddress4, COLUMNNAME_PlaceholderAddress5, COLUMNNAME_PlaceholderCity, COLUMNNAME_PlaceholderComments, COLUMNNAME_PlaceholderPostal, COLUMNNAME_PlaceholderPostal_Add, COLUMNNAME_RegionName, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name -
Constructor Summary
ConstructorsConstructorDescriptionMCountry(Properties ctx, int C_Country_ID, String trxName) MCountry(Properties ctx, String C_Country_UU, String trxName) UUID based ConstructorMCountry(Properties ctx, ResultSet rs, String trxName) Load Country from current row in ResultSetMCountry(Properties ctx, MCountry copy) Copy constructorMCountry(Properties ctx, MCountry copy, String trxName) Copy constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionintCompare based on Namestatic MCountryget(int C_Country_ID) Get Country (cached) (immutable)static MCountryget(Properties ctx, int C_Country_ID) Get Country (Immutable, cached)static MCountry[]Return Countries as Arraystatic MCountry[]getCountries(Properties ctx) Deprecated.static MCountryGet Default Country (immutable)static MCountrygetDefault(Properties ctx) Deprecated.Get Display Sequence for city (C), region (R), postal code (P) and additional postal code (A).Get Local Display Sequence for city (C), region (R), postal code (P) and additional postal code (A).Get Translated NamegetTrlName(String language) Get Translated NamebooleanisValidRegion(int C_Region_ID) Is the region valid in this countrymark PO as immutablestatic voidsetDisplayLanguage(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 methodtoString()Return Name - translated if DisplayLanguage is set.Methods inherited from class org.compiere.model.X_C_Country
get_AccessLevel, getAD_Language, getC_Country_ID, getC_Country_UU, getC_Currency, getC_Currency_ID, getCaptureSequence, getCountryCode, getDescription, getExpressionBankAccountNo, getExpressionBankRoutingNo, getExpressionPhone, getExpressionPostal, getExpressionPostal_Add, getISOCountryCodeAlpha3, getKeyNamePair, getLookupClassName, getLookupClientID, getLookupPassword, getLookupUrl, getM49Code, getMediaSize, getName, getPlaceholderAddress1, getPlaceholderAddress2, getPlaceholderAddress3, getPlaceholderAddress4, getPlaceholderAddress5, getPlaceholderCity, getPlaceholderComments, getPlaceholderPostal, getPlaceholderPostal_Add, getRegionName, initPO, isAddressLinesLocalReverse, isAddressLinesReverse, isAllowCitiesOutOfList, isHasPostal_Add, isHasRegion, isPostcodeLookup, setAD_Language, setAllowCitiesOutOfList, setC_Country_ID, setC_Country_UU, setC_Currency_ID, setCaptureSequence, setCountryCode, setDescription, setDisplaySequence, setDisplaySequenceLocal, setExpressionBankAccountNo, setExpressionBankRoutingNo, setExpressionPhone, setExpressionPostal, setExpressionPostal_Add, setHasPostal_Add, setHasRegion, setIsAddressLinesLocalReverse, setIsAddressLinesReverse, setISOCountryCodeAlpha3, setIsPostcodeLookup, setLookupClassName, setLookupClientID, setLookupPassword, setLookupUrl, setM49Code, setMediaSize, setName, setPlaceholderAddress1, setPlaceholderAddress2, setPlaceholderAddress3, setPlaceholderAddress4, setPlaceholderAddress5, setPlaceholderCity, setPlaceholderComments, setPlaceholderPostal, setPlaceholderPostal_Add, setRegionNameMethods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, beforeSave, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_OptimisticLockingColumns, get_Table_ID, get_TableAttribute, get_TableAttributeAsBoolean, get_TableAttributeAsInt, get_TableAttributes, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys, validForeignKeysExMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface org.compiere.model.I_C_Country
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActiveMethods inherited from interface org.compiere.model.I_Persistent
save
-
Constructor Details
-
MCountry
UUID based Constructor- Parameters:
ctx- ContextC_Country_UU- UUID keytrxName- Transaction
-
MCountry
- Parameters:
ctx- contextC_Country_ID- IDtrxName- transaction
-
MCountry
Load Country from current row in ResultSet- Parameters:
ctx- contextrs- ResultSettrxName- transaction
-
MCountry
Copy constructor- Parameters:
copy-
-
MCountry
Copy constructor- Parameters:
ctx-copy-
-
MCountry
Copy constructor- Parameters:
ctx-copy-trxName-
-
-
Method Details
-
get
Get Country (cached) (immutable)- Parameters:
C_Country_ID- ID- Returns:
- Country
-
get
Get Country (Immutable, cached)- Parameters:
ctx- contextC_Country_ID- ID- Returns:
- Country
-
getDefault
Deprecated.Get Default Country- Parameters:
ctx- ignore- Returns:
- Country
-
getDefault
Get Default Country (immutable)- Returns:
- Country
-
getCountries
Deprecated.Return Countries as Array- Parameters:
ctx- ignore- Returns:
- MCountry Array
-
getCountries
Return Countries as Array- Returns:
- MCountry Array
-
setDisplayLanguage
Deprecated, for removal: This API element is subject to removal in a future version.- not used at all, you can delete references to this methodSet the Language for Display (toString)- Parameters:
AD_Language- language or null
-
toString
Return Name - translated if DisplayLanguage is set.- Overrides:
toStringin classX_C_Country- Returns:
- Name
-
getTrlName
Get Translated Name- Returns:
- name
-
getTrlName
Get Translated Name- Parameters:
language-- Returns:
- name
-
getDisplaySequence
Get Display Sequence for city (C), region (R), postal code (P) and additional postal code (A).- Specified by:
getDisplaySequencein interfaceI_C_Country- Overrides:
getDisplaySequencein classX_C_Country- Returns:
- display sequence
-
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:
getDisplaySequenceLocalin interfaceI_C_Country- Overrides:
getDisplaySequenceLocalin classX_C_Country- Returns:
- display sequence
-
compare
Compare based on Name- Specified by:
comparein interfaceComparator<Object>- Overrides:
comparein classPO- Parameters:
o1- object 1o2- 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
Description copied from interface:ImmutablePOSupportmark PO as immutable- Specified by:
markImmutablein interfaceImmutablePOSupport- Returns:
- PO
-