/******************************************************************************
 * Product: Compiere ERP & CRM Smart Business Solution                        *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA      *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
package org.compiere.model;

/** Generated Model - DO NOT CHANGE */
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for C_Country
 *  @author Jorg Janke (generated) 
 *  @version Release 3.0.0 - $Id: GenerateModel.java,v 1.1 2008/01/16 07:34:32 jrmt Exp $ */
public class X_C_Country extends PO
{
/** Standard Constructor
@param ctx context
@param C_Country_ID id
@param trxName transaction
*/
public X_C_Country (Ctx ctx, int C_Country_ID, String trxName)
{
super (ctx, C_Country_ID, trxName);
/** if (C_Country_ID == 0)
{
setC_Country_ID (0);
setCountryCode (null);
setIsSummary (false);	// N
setName (null);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_C_Country (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27463298661789L;
/** Last Updated Timestamp 2007-06-07 08:42:25.0 */
public static final long updatedMS = 1181173345000L;
/** AD_Table_ID=170 */
public static final int Table_ID=170;

/** TableName=C_Country */
public static final String Table_Name="C_Country";

protected static KeyNamePair Model = new KeyNamePair(170,"C_Country");

protected BigDecimal accessLevel = new BigDecimal(6);
/** AccessLevel
@return 6 - System - Client 
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Ctx ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_Country[").append(get_ID()).append("]");
return sb.toString();
}

/** AD_Language AD_Reference_ID=106 */
public static final int AD_LANGUAGE_AD_Reference_ID=106;
/** Set Language.
@param AD_Language Language for this entity */
public void setAD_Language (String AD_Language)
{
if (AD_Language != null && AD_Language.length() > 5)
{
log.warning("Length > 5 - truncated");
AD_Language = AD_Language.substring(0,5);
}
set_Value ("AD_Language", AD_Language);
}
/** Get Language.
@return Language for this entity */
public String getAD_Language() 
{
return (String)get_Value("AD_Language");
}
/** Set Country.
@param C_Country_ID Country  */
public void setC_Country_ID (int C_Country_ID)
{
if (C_Country_ID < 1) throw new IllegalArgumentException ("C_Country_ID is mandatory.");
set_ValueNoCheck ("C_Country_ID", new Integer(C_Country_ID));
}
/** Get Country.
@return Country  */
public int getC_Country_ID() 
{
Integer ii = (Integer)get_Value("C_Country_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Currency.
@param C_Currency_ID The Currency for this record */
public void setC_Currency_ID (int C_Currency_ID)
{
if (C_Currency_ID <= 0) set_Value ("C_Currency_ID", null);
else
set_Value ("C_Currency_ID", new Integer(C_Currency_ID));
}
/** Get Currency.
@return The Currency for this record */
public int getC_Currency_ID() 
{
Integer ii = (Integer)get_Value("C_Currency_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set ISO Country Code.
@param CountryCode Upper-case two-letter alphabetic ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html */
public void setCountryCode (String CountryCode)
{
if (CountryCode == null) throw new IllegalArgumentException ("CountryCode is mandatory.");
if (CountryCode.length() > 2)
{
log.warning("Length > 2 - truncated");
CountryCode = CountryCode.substring(0,2);
}
set_Value ("CountryCode", CountryCode);
}
/** Get ISO Country Code.
@return Upper-case two-letter alphabetic ISO Country code according to ISO 3166-1 - http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html */
public String getCountryCode() 
{
return (String)get_Value("CountryCode");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description != null && Description.length() > 255)
{
log.warning("Length > 255 - truncated");
Description = Description.substring(0,255);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription() 
{
return (String)get_Value("Description");
}
/** Set Address Print Format.
@param DisplaySequence Format for printing this Address */
public void setDisplaySequence (String DisplaySequence)
{
if (DisplaySequence != null && DisplaySequence.length() > 20)
{
log.warning("Length > 20 - truncated");
DisplaySequence = DisplaySequence.substring(0,20);
}
set_Value ("DisplaySequence", DisplaySequence);
}
/** Get Address Print Format.
@return Format for printing this Address */
public String getDisplaySequence() 
{
return (String)get_Value("DisplaySequence");
}
/** Set Local Address Format.
@param DisplaySequenceLocal Format for printing this Address locally */
public void setDisplaySequenceLocal (String DisplaySequenceLocal)
{
if (DisplaySequenceLocal != null && DisplaySequenceLocal.length() > 20)
{
log.warning("Length > 20 - truncated");
DisplaySequenceLocal = DisplaySequenceLocal.substring(0,20);
}
set_Value ("DisplaySequenceLocal", DisplaySequenceLocal);
}
/** Get Local Address Format.
@return Format for printing this Address locally */
public String getDisplaySequenceLocal() 
{
return (String)get_Value("DisplaySequenceLocal");
}
/** Set Bank Account No Format.
@param ExpressionBankAccountNo Format of the Bank Account */
public void setExpressionBankAccountNo (String ExpressionBankAccountNo)
{
if (ExpressionBankAccountNo != null && ExpressionBankAccountNo.length() > 20)
{
log.warning("Length > 20 - truncated");
ExpressionBankAccountNo = ExpressionBankAccountNo.substring(0,20);
}
set_Value ("ExpressionBankAccountNo", ExpressionBankAccountNo);
}
/** Get Bank Account No Format.
@return Format of the Bank Account */
public String getExpressionBankAccountNo() 
{
return (String)get_Value("ExpressionBankAccountNo");
}
/** Set Bank Routing No Format.
@param ExpressionBankRoutingNo Format of the Bank Routing Number */
public void setExpressionBankRoutingNo (String ExpressionBankRoutingNo)
{
if (ExpressionBankRoutingNo != null && ExpressionBankRoutingNo.length() > 20)
{
log.warning("Length > 20 - truncated");
ExpressionBankRoutingNo = ExpressionBankRoutingNo.substring(0,20);
}
set_Value ("ExpressionBankRoutingNo", ExpressionBankRoutingNo);
}
/** Get Bank Routing No Format.
@return Format of the Bank Routing Number */
public String getExpressionBankRoutingNo() 
{
return (String)get_Value("ExpressionBankRoutingNo");
}
/** Set Phone Format.
@param ExpressionPhone Format of the phone;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public void setExpressionPhone (String ExpressionPhone)
{
if (ExpressionPhone != null && ExpressionPhone.length() > 20)
{
log.warning("Length > 20 - truncated");
ExpressionPhone = ExpressionPhone.substring(0,20);
}
set_Value ("ExpressionPhone", ExpressionPhone);
}
/** Get Phone Format.
@return Format of the phone;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public String getExpressionPhone() 
{
return (String)get_Value("ExpressionPhone");
}
/** Set Postal Code Format.
@param ExpressionPostal Format of the postal code;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public void setExpressionPostal (String ExpressionPostal)
{
if (ExpressionPostal != null && ExpressionPostal.length() > 20)
{
log.warning("Length > 20 - truncated");
ExpressionPostal = ExpressionPostal.substring(0,20);
}
set_Value ("ExpressionPostal", ExpressionPostal);
}
/** Get Postal Code Format.
@return Format of the postal code;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public String getExpressionPostal() 
{
return (String)get_Value("ExpressionPostal");
}
/** Set Additional Postal Format.
@param ExpressionPostal_Add Format of the value;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public void setExpressionPostal_Add (String ExpressionPostal_Add)
{
if (ExpressionPostal_Add != null && ExpressionPostal_Add.length() > 20)
{
log.warning("Length > 20 - truncated");
ExpressionPostal_Add = ExpressionPostal_Add.substring(0,20);
}
set_Value ("ExpressionPostal_Add", ExpressionPostal_Add);
}
/** Get Additional Postal Format.
@return Format of the value;
 Can contain fixed format elements, Variables: "_lLoOaAcCa09" */
public String getExpressionPostal_Add() 
{
return (String)get_Value("ExpressionPostal_Add");
}
/** Set Additional Postal code.
@param HasPostal_Add Has Additional Postal Code */
public void setHasPostal_Add (boolean HasPostal_Add)
{
set_Value ("HasPostal_Add", new Boolean(HasPostal_Add));
}
/** Get Additional Postal code.
@return Has Additional Postal Code */
public boolean isHasPostal_Add() 
{
Object oo = get_Value("HasPostal_Add");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Country has Region.
@param HasRegion Country contains Regions */
public void setHasRegion (boolean HasRegion)
{
set_Value ("HasRegion", new Boolean(HasRegion));
}
/** Get Country has Region.
@return Country contains Regions */
public boolean isHasRegion() 
{
Object oo = get_Value("HasRegion");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Reverse Local Address Lines.
@param IsAddressLinesLocalReverse Print Local Address in reverse Order */
public void setIsAddressLinesLocalReverse (boolean IsAddressLinesLocalReverse)
{
set_ValueNoCheck ("IsAddressLinesLocalReverse", new Boolean(IsAddressLinesLocalReverse));
}
/** Get Reverse Local Address Lines.
@return Print Local Address in reverse Order */
public boolean isAddressLinesLocalReverse() 
{
Object oo = get_Value("IsAddressLinesLocalReverse");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Reverse Address Lines.
@param IsAddressLinesReverse Print Address in reverse Order */
public void setIsAddressLinesReverse (boolean IsAddressLinesReverse)
{
set_Value ("IsAddressLinesReverse", new Boolean(IsAddressLinesReverse));
}
/** Get Reverse Address Lines.
@return Print Address in reverse Order */
public boolean isAddressLinesReverse() 
{
Object oo = get_Value("IsAddressLinesReverse");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Summary Level.
@param IsSummary This is a summary entity */
public void setIsSummary (boolean IsSummary)
{
set_Value ("IsSummary", new Boolean(IsSummary));
}
/** Get Summary Level.
@return This is a summary entity */
public boolean isSummary() 
{
Object oo = get_Value("IsSummary");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Media Size.
@param MediaSize Java Media Size */
public void setMediaSize (String MediaSize)
{
if (MediaSize != null && MediaSize.length() > 40)
{
log.warning("Length > 40 - truncated");
MediaSize = MediaSize.substring(0,40);
}
set_Value ("MediaSize", MediaSize);
}
/** Get Media Size.
@return Java Media Size */
public String getMediaSize() 
{
return (String)get_Value("MediaSize");
}
/** Set Name.
@param Name Alphanumeric identifier of the entity */
public void setName (String Name)
{
if (Name == null) throw new IllegalArgumentException ("Name is mandatory.");
if (Name.length() > 60)
{
log.warning("Length > 60 - truncated");
Name = Name.substring(0,60);
}
set_Value ("Name", Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity */
public String getName() 
{
return (String)get_Value("Name");
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair */
public KeyNamePair getKeyNamePair() 
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Region.
@param RegionName Name of the Region */
public void setRegionName (String RegionName)
{
if (RegionName != null && RegionName.length() > 60)
{
log.warning("Length > 60 - truncated");
RegionName = RegionName.substring(0,60);
}
set_Value ("RegionName", RegionName);
}
/** Get Region.
@return Name of the Region */
public String getRegionName() 
{
return (String)get_Value("RegionName");
}
}
