/******************************************************************************
 * Product: iDempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2012 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., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.isnov.plugin.model;

import X_iNO_MobileConfig;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.model.X_C_BPartner;
import org.compiere.model.X_C_DocType;

/**
 * Generated Model for table iNO_MobileStockMovement
 * @author iDempiere (generated)
 * @version Release 7.1 - $Id$
 */
public class X_iNO_MobileStockMovement extends PO implements I_iNO_MobileStockMovement, I_Persistent {

	private static final long serialVersionUID = 20230427L;

	/**
	 * Standard Constructor
	 */
	public X_iNO_MobileStockMovement (Properties ctx, int iNO_MobileStockMovement_ID, String trxName) {
		super (ctx, iNO_MobileStockMovement_ID, trxName);
		/** if (iNO_MobileStockMovement_ID == 0)
		{
			setC_BPartner_ID (0);
			setC_DocType_ID (0);
			setIEXT_ProductTransformationType (null);
			setiNO_MobileConfig_ID (0);
			setiNO_MobileStockMovement_ID (0);
		} */
    }

	/**
	 * Load Constructor
	 */
	public X_iNO_MobileStockMovement (Properties ctx, ResultSet rs, String trxName) {
		super (ctx, rs, trxName);
	}

	/**
	 * AccessLevel
	 * @return 3 - Client - Org 
	 */
	protected int get_AccessLevel() {
		return accessLevel.intValue();
	}

	/**
	 * Load Meta Data
	 */
	protected POInfo initPO (Properties ctx) {
		POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
		return poi;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder ("X_iNO_MobileStockMovement[")
			.append(get_ID()).append("]");
		return sb.toString();
	}

	public X_C_BPartner getC_BPartner() throws RuntimeException {
		return (X_C_BPartner)MTable.get(getCtx(), X_C_BPartner.Table_Name)
				.getPO(getC_BPartner_ID(), get_TrxName());
	}

	/**
	 * Set Business Partner .
	 * @param C_BPartner_ID 
	 * Identifies a Business Partner
	 */
	public void setC_BPartner_ID (int bPartnerID) {
		if (bPartnerID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(bPartnerID));
	}

	/**
	 * Get Business Partner .
	 * @return Identifies a Business Partner
	 */
	public int getC_BPartner_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public X_C_DocType getC_DocType() throws RuntimeException {
		return (X_C_DocType)MTable.get(getCtx(), X_C_DocType.Table_Name)
				.getPO(getC_DocType_ID(), get_TrxName());
	}

	/**
	 * Set Document Type.
	 * @param C_DocType_ID 
	 * Document type or rules
	 */
	public void setC_DocType_ID (int docTypeID) {
		if (docTypeID < 0) 
			set_Value (COLUMNNAME_C_DocType_ID, null);
		else 
			set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(docTypeID));
	}

	/**
	 * Get Document Type.
	 * @return Document type or rules
	 */
	public int getC_DocType_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** ENTRANT = IN */
	public static final String IEXT_PRODUCTTRANSFORMATIONTYPE_ENTRANT = "IN";
	/** SORTANT = OUT */
	public static final String IEXT_PRODUCTTRANSFORMATIONTYPE_SORTANT = "OUT";
	/**
	 * Set Product Transformation Type.
	 * @param IEXT_ProductTransformationType Product Transformation Type
	 */
	public void setIEXT_ProductTransformationType (String productTransformationType) {

		set_Value (COLUMNNAME_IEXT_ProductTransformationType, productTransformationType);
	}

	/**
	 * Get Product Transformation Type.
	 * @return Product Transformation Type
	 */
	public String getIEXT_ProductTransformationType () {
		return (String)get_Value(COLUMNNAME_IEXT_ProductTransformationType);
	}

	public X_iNO_MobileConfig getiNO_MobileConfig() throws RuntimeException {
		return (X_iNO_MobileConfig)MTable.get(getCtx(), X_iNO_MobileConfig.Table_Name)
				.getPO(getiNO_MobileConfig_ID(), get_TrxName());
	}

	/**
	 * Set Mobile Configuration.
	 * @param iNO_MobileConfig_ID Mobile Configuration
	 */
	public void setiNO_MobileConfig_ID (int mobileConfigID) {
		if (mobileConfigID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_MobileConfig_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_MobileConfig_ID, Integer.valueOf(mobileConfigID));
	}

	/**
	 * Get Mobile Configuration.
	 * @return Mobile Configuration
	 */
	public int getiNO_MobileConfig_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_MobileConfig_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Mobile Stock Movement.
	 * @param iNO_MobileStockMovement_ID Mobile Stock Movement
	 */
	public void setiNO_MobileStockMovement_ID (int mobileStockMovementID) {
		if (mobileStockMovementID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_MobileStockMovement_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_MobileStockMovement_ID, Integer.valueOf(mobileStockMovementID));
	}

	/**
	 * Get Mobile Stock Movement.
	 * @return Mobile Stock Movement
	 */
	public int getiNO_MobileStockMovement_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_MobileStockMovement_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set iNO_MobileStockMovement_UU.
	 * @param iNO_MobileStockMovement_UU iNO_MobileStockMovement_UU
	 */
	public void setiNO_MobileStockMovement_UU (String mobileStockMovementUU) {
		set_Value (COLUMNNAME_iNO_MobileStockMovement_UU, mobileStockMovementUU);
	}

	/**
	 * Get iNO_MobileStockMovement_UU.
	 * @return iNO_MobileStockMovement_UU
	 */
	public String getiNO_MobileStockMovement_UU () {
		return (String)get_Value(COLUMNNAME_iNO_MobileStockMovement_UU);
	}
}