⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mbpartner_location.java

📁 Java写的ERP系统
💻 JAVA
字号:
/******************************************************************************
 * The contents of this file are subject to the   Compiere License  Version 1.1
 * ("License"); You may not use this file except in compliance with the License
 * You may obtain a copy of the License at http://www.compiere.org/license.html
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * The Original Code is             Compiere  ERP & CRM Smart Business Solution
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
 * Portions created by Jorg Janke are Copyright (C) 1999-2003 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
 * Contributor(s): ______________________________________.
 *****************************************************************************/
package org.compiere.model;

import java.util.*;
import java.sql.*;
import java.math.*;
import java.io.Serializable;
import org.compiere.util.*;


/**
 *	Partner Location Model
 *
 *  @author Jorg Janke
 *  @version $Id: MBPartner_Location.java,v 1.5 2003/04/04 05:03:44 jjanke Exp $
 */
public class MBPartner_Location
  extends PO
{
	/**
	 * 	Default Constructor
	 *	@param ctx context
	 *	@param C_BPartner_Location_ID id
	 */
	public MBPartner_Location (Properties ctx, int C_BPartner_Location_ID)
	{
		this (ctx, C_BPartner_Location_ID, 0);
	}	//	MBPartner_Location


	public MBPartner_Location (Properties ctx, int C_BPartner_Location_ID, int C_BPartner_ID)
	{
		super (ctx, C_BPartner_Location_ID);
		if (C_BPartner_Location_ID == 0)
		{
			if (C_BPartner_ID != 0)
				setC_BPartner_ID (C_BPartner_ID);

			setName (".");
			setC_Location_ID (0);
			//
			setIsShipTo (true);
			setIsRemitTo (true);
			setIsPayFrom (true);
			setIsBillTo (true);
		}
	}	//	MBPartner_Location

	/**
	 * 	Constructor from ResultSet row
	 *	@param ctx context
	 * 	@param rs current row of result set to be loaded
	 */
	public MBPartner_Location (Properties ctx, ResultSet rs)
	{
		super (ctx, rs);
	}	//	MBPartner_Location



	protected POInfo initPO (Properties ctx)
	{
		int AD_Table_ID = 293;
		POInfo poi = POInfo.getPOInfo (ctx, AD_Table_ID);
		return poi;
	}

	public boolean save ()
	{
		Log.trace (Log.l4_Data, "MBPartner_Location.save");
		return super.save ();
	}

	public String toString ()
	{
		StringBuffer sb = new StringBuffer ("MBPartner_Location[ID=")
			.append(getID())
			.append(",C_Location_ID=").append(getC_Location_ID())
			.append(",Name=").append(getName())
			.append ("]");
		return sb.toString ();
	}

	public void setPhone (String Phone)
	{
		setValue ("Phone", Phone);
	}

	public String getPhone ()
	{
		return (String)getValue ("Phone");
	}

	public void setPhone2 (String Phone2)
	{
		setValue ("Phone2", Phone2);
	}

	public String getPhone2 ()
	{
		return (String)getValue ("Phone2");
	}

	public void setIsShipTo (boolean IsShipTo)
	{
		setValue ("IsShipTo", new Boolean(IsShipTo));
	}

	public boolean isShipTo ()
	{
		Boolean bb = (Boolean)getValue ("IsShipTo");
		if (bb != null)
			return bb.booleanValue ();
		return false;
	}

	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		setValueNoCheck ("C_BPartner_ID", new Integer (C_BPartner_ID));
	}

	public int getC_BPartner_ID ()
	{
		Integer ii = (Integer)getValue ("C_BPartner_ID");
		if (ii == null)
			return 0;
		return ii.intValue ();
	}

	public void setC_Location_ID (int C_Location_ID)
	{
		setValue ("C_Location_ID", new Integer (C_Location_ID));
	}

	public int getC_Location_ID ()
	{
		Integer ii = (Integer)getValue ("C_Location_ID");
		if (ii == null)
			return 0;
		return ii.intValue ();
	}

	public void setIsRemitTo (boolean IsRemitTo)
	{
		setValue ("IsRemitTo", new Boolean(IsRemitTo));
	}

	public boolean isRemitTo ()
	{
		Boolean bb = (Boolean)getValue ("IsRemitTo");
		if (bb != null)
			return bb.booleanValue ();
		return false;
	}

	public int getC_BPartner_Location_ID ()
	{
		return getID();
	}

	public void setIsPayFrom (boolean IsPayFrom)
	{
		setValue ("IsPayFrom", new Boolean(IsPayFrom));
	}

	public boolean isPayFrom ()
	{
		Boolean bb = (Boolean)getValue ("IsPayFrom");
		if (bb != null)
			return bb.booleanValue ();
		return false;
	}

	public void setName (String Name)
	{
		if (Name == null)
			throw new IllegalArgumentException ("Name is mandatory");
		setValue ("Name", Name);
	}

	public String getName ()
	{
		return (String)getValue ("Name");
	}

	public void setIsBillTo (boolean IsBillTo)
	{
		setValue ("IsBillTo", new Boolean(IsBillTo));
	}

	public boolean isBillTo ()
	{
		Boolean bb = (Boolean)getValue ("IsBillTo");
		if (bb != null)
			return bb.booleanValue ();
		return false;
	}

	public void setFax (String Fax)
	{
		setValue ("Fax", Fax);
	}

	public String getFax ()
	{
		return (String)getValue ("Fax");
	}

	public void setISDN (String ISDN)
	{
		setValue ("ISDN", ISDN);
	}

	public String getISDN ()
	{
		return (String)getValue ("ISDN");
	}

	public void setC_SalesRegion_ID (int C_SalesRegion_ID)
	{
		setValue ("C_SalesRegion_ID", new Integer (C_SalesRegion_ID));
	}

	public int getC_SalesRegion_ID ()
	{
		Integer ii = (Integer)getValue ("C_SalesRegion_ID");
		if (ii == null)
			return 0;
		return ii.intValue ();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -