/******************************************************************************
 * 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 compiere.model;

/** Generated Model - DO NOT CHANGE */
import org.compiere.model.*;
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for X_Postal
 *  @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_X_Postal extends PO
{
/** Standard Constructor
@param ctx context
@param X_Postal_ID id
@param trxName transaction
*/
public X_X_Postal (Ctx ctx, int X_Postal_ID, String trxName)
{
super (ctx, X_Postal_ID, trxName);
/** if (X_Postal_ID == 0)
{
setIs_Duplicate (false);
setIs_Include_Addrno (false);
setIs_Multi_Zip (false);
setIs_Recursive (false);
setIs_Updated (false);
setOldzip (null);
setPostal (null);
setPostalLookup (false);
setUpdate_Reason (false);
setX_Postal_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_X_Postal (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27482787604789L;
/** Last Updated Timestamp 2008-01-18 22:18:08.0 */
public static final long updatedMS = 1200662288000L;
/** AD_Table_ID=1000006 */
public static final int Table_ID=1000006;

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

protected static KeyNamePair Model = new KeyNamePair(1000006,"X_Postal");

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_X_Postal[").append(get_ID()).append("]");
return sb.toString();
}
/** Set Area Code.
@param AreaCode Phone Area Code */
public void setAreaCode (String AreaCode)
{
if (AreaCode != null && AreaCode.length() > 10)
{
log.warning("Length > 10 - truncated");
AreaCode = AreaCode.substring(0,10);
}
set_Value ("AreaCode", AreaCode);
}
/** Get Area Code.
@return Phone Area Code */
public String getAreaCode() 
{
return (String)get_Value("AreaCode");
}
/** Set Country.
@param C_Country_ID Country  */
public void setC_Country_ID (int C_Country_ID)
{
if (C_Country_ID <= 0) set_Value ("C_Country_ID", null);
else
set_Value ("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 Region.
@param C_Region_ID Identifies a geographical Region */
public void setC_Region_ID (int C_Region_ID)
{
if (C_Region_ID <= 0) set_Value ("C_Region_ID", null);
else
set_Value ("C_Region_ID", new Integer(C_Region_ID));
}
/** Get Region.
@return Identifies a geographical Region */
public int getC_Region_ID() 
{
Integer ii = (Integer)get_Value("C_Region_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Is_Duplicate.
@param Is_Duplicate Is_Duplicate */
public void setIs_Duplicate (boolean Is_Duplicate)
{
set_Value ("Is_Duplicate", new Boolean(Is_Duplicate));
}
/** Get Is_Duplicate.
@return Is_Duplicate */
public boolean is_Duplicate() 
{
Object oo = get_Value("Is_Duplicate");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Is_Include_Addrno.
@param Is_Include_Addrno Is_Include_Addrno */
public void setIs_Include_Addrno (boolean Is_Include_Addrno)
{
set_Value ("Is_Include_Addrno", new Boolean(Is_Include_Addrno));
}
/** Get Is_Include_Addrno.
@return Is_Include_Addrno */
public boolean is_Include_Addrno() 
{
Object oo = get_Value("Is_Include_Addrno");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Is_Multi_Zip.
@param Is_Multi_Zip Is_Multi_Zip */
public void setIs_Multi_Zip (boolean Is_Multi_Zip)
{
set_Value ("Is_Multi_Zip", new Boolean(Is_Multi_Zip));
}
/** Get Is_Multi_Zip.
@return Is_Multi_Zip */
public boolean is_Multi_Zip() 
{
Object oo = get_Value("Is_Multi_Zip");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Is_Recursive.
@param Is_Recursive Is_Recursive */
public void setIs_Recursive (boolean Is_Recursive)
{
set_Value ("Is_Recursive", new Boolean(Is_Recursive));
}
/** Get Is_Recursive.
@return Is_Recursive */
public boolean is_Recursive() 
{
Object oo = get_Value("Is_Recursive");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Is_Updated.
@param Is_Updated Is_Updated */
public void setIs_Updated (boolean Is_Updated)
{
set_Value ("Is_Updated", new Boolean(Is_Updated));
}
/** Get Is_Updated.
@return Is_Updated */
public boolean is_Updated() 
{
Object oo = get_Value("Is_Updated");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Oldzip.
@param Oldzip Oldzip */
public void setOldzip (String Oldzip)
{
if (Oldzip == null) throw new IllegalArgumentException ("Oldzip is mandatory.");
if (Oldzip.length() > 10)
{
log.warning("Length > 10 - truncated");
Oldzip = Oldzip.substring(0,10);
}
set_Value ("Oldzip", Oldzip);
}
/** Get Oldzip.
@return Oldzip */
public String getOldzip() 
{
return (String)get_Value("Oldzip");
}
/** Set ZIP.
@param Postal Postal code */
public void setPostal (String Postal)
{
if (Postal == null) throw new IllegalArgumentException ("Postal is mandatory.");
if (Postal.length() > 10)
{
log.warning("Length > 10 - truncated");
Postal = Postal.substring(0,10);
}
set_Value ("Postal", Postal);
}
/** Get ZIP.
@return Postal code */
public String getPostal() 
{
return (String)get_Value("Postal");
}
/** Set PostalLookup.
@param PostalLookup PostalLookup */
public void setPostalLookup (boolean PostalLookup)
{
set_Value ("PostalLookup", new Boolean(PostalLookup));
}
/** Get PostalLookup.
@return PostalLookup */
public boolean isPostalLookup() 
{
Object oo = get_Value("PostalLookup");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Update_Reason.
@param Update_Reason Update_Reason */
public void setUpdate_Reason (boolean Update_Reason)
{
set_Value ("Update_Reason", new Boolean(Update_Reason));
}
/** Get Update_Reason.
@return Update_Reason */
public boolean isUpdate_Reason() 
{
Object oo = get_Value("Update_Reason");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set X_Address.
@param X_Address X_Address */
public void setX_Address (String X_Address)
{
if (X_Address != null && X_Address.length() > 255)
{
log.warning("Length > 255 - truncated");
X_Address = X_Address.substring(0,255);
}
set_Value ("X_Address", X_Address);
}
/** Get X_Address.
@return X_Address */
public String getX_Address() 
{
return (String)get_Value("X_Address");
}
/** Set X_Address_Kana.
@param X_Address_Kana X_Address_Kana */
public void setX_Address_Kana (String X_Address_Kana)
{
if (X_Address_Kana != null && X_Address_Kana.length() > 255)
{
log.warning("Length > 255 - truncated");
X_Address_Kana = X_Address_Kana.substring(0,255);
}
set_Value ("X_Address_Kana", X_Address_Kana);
}
/** Get X_Address_Kana.
@return X_Address_Kana */
public String getX_Address_Kana() 
{
return (String)get_Value("X_Address_Kana");
}
/** Set X_City_Name.
@param X_City_Name X_City_Name */
public void setX_City_Name (String X_City_Name)
{
if (X_City_Name != null && X_City_Name.length() > 255)
{
log.warning("Length > 255 - truncated");
X_City_Name = X_City_Name.substring(0,255);
}
set_Value ("X_City_Name", X_City_Name);
}
/** Get X_City_Name.
@return X_City_Name */
public String getX_City_Name() 
{
return (String)get_Value("X_City_Name");
}
/** Set X_City_Name_Kana.
@param X_City_Name_Kana X_City_Name_Kana */
public void setX_City_Name_Kana (String X_City_Name_Kana)
{
if (X_City_Name_Kana != null && X_City_Name_Kana.length() > 255)
{
log.warning("Length > 255 - truncated");
X_City_Name_Kana = X_City_Name_Kana.substring(0,255);
}
set_Value ("X_City_Name_Kana", X_City_Name_Kana);
}
/** Get X_City_Name_Kana.
@return X_City_Name_Kana */
public String getX_City_Name_Kana() 
{
return (String)get_Value("X_City_Name_Kana");
}
/** Set X_Postal_ID.
@param X_Postal_ID X_Postal_ID */
public void setX_Postal_ID (int X_Postal_ID)
{
if (X_Postal_ID < 1) throw new IllegalArgumentException ("X_Postal_ID is mandatory.");
set_ValueNoCheck ("X_Postal_ID", new Integer(X_Postal_ID));
}
/** Get X_Postal_ID.
@return X_Postal_ID */
public int getX_Postal_ID() 
{
Integer ii = (Integer)get_Value("X_Postal_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set X_Region_Name.
@param X_Region_Name X_Region_Name */
public void setX_Region_Name (String X_Region_Name)
{
if (X_Region_Name != null && X_Region_Name.length() > 60)
{
log.warning("Length > 60 - truncated");
X_Region_Name = X_Region_Name.substring(0,60);
}
set_Value ("X_Region_Name", X_Region_Name);
}
/** Get X_Region_Name.
@return X_Region_Name */
public String getX_Region_Name() 
{
return (String)get_Value("X_Region_Name");
}
/** Set X_Region_Name_Kana.
@param X_Region_Name_Kana X_Region_Name_Kana */
public void setX_Region_Name_Kana (String X_Region_Name_Kana)
{
if (X_Region_Name_Kana != null && X_Region_Name_Kana.length() > 60)
{
log.warning("Length > 60 - truncated");
X_Region_Name_Kana = X_Region_Name_Kana.substring(0,60);
}
set_Value ("X_Region_Name_Kana", X_Region_Name_Kana);
}
/** Get X_Region_Name_Kana.
@return X_Region_Name_Kana */
public String getX_Region_Name_Kana() 
{
return (String)get_Value("X_Region_Name_Kana");
}
}
