/******************************************************************************
 * 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_LoyaltyPlan;
import java.math.BigDecimal;
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.util.Env;

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

	private static final long serialVersionUID = 20240523L;

	/**
	 * Standard Constructor
	 */
	public X_iNO_LoyaltyValuation (Properties ctx, int iNO_LoyaltyValuation_ID, String trxName) {
		super (ctx, iNO_LoyaltyValuation_ID, trxName);
		/** if (iNO_LoyaltyValuation_ID == 0)
		{
			setAmount (Env.ZERO);
// 0
			setiEXT_LoyaltyPoint (Env.ZERO);
// 0
			setiNO_LoyaltyPlan_ID (0);
			setiNO_LoyaltyValuation_ID (0);
		} */
    }

	/**
	 * Load Constructor
	 */
	public X_iNO_LoyaltyValuation (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_LoyaltyValuation[")
			.append(get_ID()).append("]");
		return sb.toString();
	}

	/**
	 * Set Amount.
	 * @param Amount 
	 * Amount in a defined currency
	 */
	public void setAmount (BigDecimal amount) {
		set_Value (COLUMNNAME_Amount, amount);
	}

	/**
	 * Get Amount.
	 * @return Amount in a defined currency
	 */
	public BigDecimal getAmount () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amount);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/**
	 * Set Description.
	 * @param Description 
	 * Optional short description of the record
	 */
	public void setDescription (String description) {
		set_Value (COLUMNNAME_Description, description);
	}

	/**
	 * Get Description.
	 * @return Optional short description of the record
	 */
	public String getDescription () {
		return (String)get_Value(COLUMNNAME_Description);
	}

	/**
	 * Set Loyalty Point.
	 * @param iEXT_LoyaltyPoint Loyalty Point
	 */
	public void setiEXT_LoyaltyPoint (BigDecimal loyaltyPoint) {
		set_Value (COLUMNNAME_iEXT_LoyaltyPoint, loyaltyPoint);
	}

	/**
	 * Get Loyalty Point.
	 * @return Loyalty Point
	 */
	public BigDecimal getiEXT_LoyaltyPoint () {
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_iEXT_LoyaltyPoint);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public X_iNO_LoyaltyPlan getiNO_LoyaltyPlan() throws RuntimeException {
		return (X_iNO_LoyaltyPlan)MTable.get(getCtx(), X_iNO_LoyaltyPlan.Table_Name)
				.getPO(getiNO_LoyaltyPlan_ID(), get_TrxName());
	}

	/**
	 * Set Loyalty Plan.
	 * @param iNO_LoyaltyPlan_ID Loyalty Plan
	 */
	public void setiNO_LoyaltyPlan_ID (int loyaltyPlanID) {
		if (loyaltyPlanID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_LoyaltyPlan_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_LoyaltyPlan_ID, Integer.valueOf(loyaltyPlanID));
	}

	/**
	 * Get Loyalty Plan.
	 * @return Loyalty Plan
	 */
	public int getiNO_LoyaltyPlan_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_LoyaltyPlan_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set Loyalty Valuation.
	 * @param iNO_LoyaltyValuation_ID Loyalty Valuation
	 */
	public void setiNO_LoyaltyValuation_ID (int loyaltyValuationID) {
		if (loyaltyValuationID < 1) 
			set_ValueNoCheck (COLUMNNAME_iNO_LoyaltyValuation_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_iNO_LoyaltyValuation_ID, Integer.valueOf(loyaltyValuationID));
	}

	/**
	 * Get Loyalty Valuation.
	 * @return Loyalty Valuation
	 */
	public int getiNO_LoyaltyValuation_ID () {
		Integer ii = (Integer)get_Value(COLUMNNAME_iNO_LoyaltyValuation_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/**
	 * Set iNO_LoyaltyValuation_UU.
	 * @param iNO_LoyaltyValuation_UU iNO_LoyaltyValuation_UU
	 */
	public void setiNO_LoyaltyValuation_UU (String loyaltyValuationUU) {
		set_Value (COLUMNNAME_iNO_LoyaltyValuation_UU, loyaltyValuationUU);
	}

	/**
	 * Get iNO_LoyaltyValuation_UU.
	 * @return iNO_LoyaltyValuation_UU
	 */
	public String getiNO_LoyaltyValuation_UU () {
		return (String)get_Value(COLUMNNAME_iNO_LoyaltyValuation_UU);
	}
}