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

import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;

/** Generated Model for C_Recurring_Run
 *  @author iDempiere (generated)
 *  @version Release 12 - $Id$ */
@org.adempiere.base.Model(table="C_Recurring_Run")
public class X_C_Recurring_Run extends PO implements I_C_Recurring_Run, I_Persistent
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20241222L;

    /** Standard Constructor */
    public X_C_Recurring_Run (Properties ctx, int C_Recurring_Run_ID, String trxName)
    {
      super (ctx, C_Recurring_Run_ID, trxName);
      /** if (C_Recurring_Run_ID == 0)
        {
			setC_Recurring_ID (0);
			setC_Recurring_Run_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_C_Recurring_Run (Properties ctx, int C_Recurring_Run_ID, String trxName, String ... virtualColumns)
    {
      super (ctx, C_Recurring_Run_ID, trxName, virtualColumns);
      /** if (C_Recurring_Run_ID == 0)
        {
			setC_Recurring_ID (0);
			setC_Recurring_Run_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_C_Recurring_Run (Properties ctx, String C_Recurring_Run_UU, String trxName)
    {
      super (ctx, C_Recurring_Run_UU, trxName);
      /** if (C_Recurring_Run_UU == null)
        {
			setC_Recurring_ID (0);
			setC_Recurring_Run_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_C_Recurring_Run (Properties ctx, String C_Recurring_Run_UU, String trxName, String ... virtualColumns)
    {
      super (ctx, C_Recurring_Run_UU, trxName, virtualColumns);
      /** if (C_Recurring_Run_UU == null)
        {
			setC_Recurring_ID (0);
			setC_Recurring_Run_ID (0);
        } */
    }

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

	public org.compiere.model.I_C_Invoice getC_Invoice() throws RuntimeException
	{
		return (org.compiere.model.I_C_Invoice)MTable.get(getCtx(), org.compiere.model.I_C_Invoice.Table_ID)
			.getPO(getC_Invoice_ID(), get_TrxName());
	}

	/** Set Invoice.
		@param C_Invoice_ID Invoice Identifier
	*/
	public void setC_Invoice_ID (int C_Invoice_ID)
	{
		if (C_Invoice_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
	}

	/** Get Invoice.
		@return Invoice Identifier
	  */
	public int getC_Invoice_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Order getC_Order() throws RuntimeException
	{
		return (org.compiere.model.I_C_Order)MTable.get(getCtx(), org.compiere.model.I_C_Order.Table_ID)
			.getPO(getC_Order_ID(), get_TrxName());
	}

	/** Set Order.
		@param C_Order_ID Order
	*/
	public void setC_Order_ID (int C_Order_ID)
	{
		if (C_Order_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Order_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
	}

	/** Get Order.
		@return Order
	  */
	public int getC_Order_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Payment getC_Payment() throws RuntimeException
	{
		return (org.compiere.model.I_C_Payment)MTable.get(getCtx(), org.compiere.model.I_C_Payment.Table_ID)
			.getPO(getC_Payment_ID(), get_TrxName());
	}

	/** Set Payment.
		@param C_Payment_ID Payment identifier
	*/
	public void setC_Payment_ID (int C_Payment_ID)
	{
		if (C_Payment_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Payment_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
	}

	/** Get Payment.
		@return Payment identifier
	  */
	public int getC_Payment_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Project getC_Project() throws RuntimeException
	{
		return (org.compiere.model.I_C_Project)MTable.get(getCtx(), org.compiere.model.I_C_Project.Table_ID)
			.getPO(getC_Project_ID(), get_TrxName());
	}

	/** Set Project.
		@param C_Project_ID Financial Project
	*/
	public void setC_Project_ID (int C_Project_ID)
	{
		if (C_Project_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Project_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
	}

	/** Get Project.
		@return Financial Project
	  */
	public int getC_Project_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Recurring getC_Recurring() throws RuntimeException
	{
		return (org.compiere.model.I_C_Recurring)MTable.get(getCtx(), org.compiere.model.I_C_Recurring.Table_ID)
			.getPO(getC_Recurring_ID(), get_TrxName());
	}

	/** Set Recurring.
		@param C_Recurring_ID Recurring Document
	*/
	public void setC_Recurring_ID (int C_Recurring_ID)
	{
		if (C_Recurring_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Recurring_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Recurring_ID, Integer.valueOf(C_Recurring_ID));
	}

	/** Get Recurring.
		@return Recurring Document
	  */
	public int getC_Recurring_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Recurring_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Recurring Run.
		@param C_Recurring_Run_ID Recurring Document Run
	*/
	public void setC_Recurring_Run_ID (int C_Recurring_Run_ID)
	{
		if (C_Recurring_Run_ID < 1)
			set_ValueNoCheck (COLUMNNAME_C_Recurring_Run_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_C_Recurring_Run_ID, Integer.valueOf(C_Recurring_Run_ID));
	}

	/** Get Recurring Run.
		@return Recurring Document Run
	  */
	public int getC_Recurring_Run_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Recurring_Run_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set C_Recurring_Run_UU.
		@param C_Recurring_Run_UU C_Recurring_Run_UU
	*/
	public void setC_Recurring_Run_UU (String C_Recurring_Run_UU)
	{
		set_Value (COLUMNNAME_C_Recurring_Run_UU, C_Recurring_Run_UU);
	}

	/** Get C_Recurring_Run_UU.
		@return C_Recurring_Run_UU	  */
	public String getC_Recurring_Run_UU()
	{
		return (String)get_Value(COLUMNNAME_C_Recurring_Run_UU);
	}

	/** Set Document Date.
		@param DateDoc Date of the Document
	*/
	public void setDateDoc (Timestamp DateDoc)
	{
		set_Value (COLUMNNAME_DateDoc, DateDoc);
	}

	/** Get Document Date.
		@return Date of the Document
	  */
	public Timestamp getDateDoc()
	{
		return (Timestamp)get_Value(COLUMNNAME_DateDoc);
	}

	public org.compiere.model.I_GL_JournalBatch getGL_JournalBatch() throws RuntimeException
	{
		return (org.compiere.model.I_GL_JournalBatch)MTable.get(getCtx(), org.compiere.model.I_GL_JournalBatch.Table_ID)
			.getPO(getGL_JournalBatch_ID(), get_TrxName());
	}

	/** Set Journal Batch.
		@param GL_JournalBatch_ID General Ledger Journal Batch
	*/
	public void setGL_JournalBatch_ID (int GL_JournalBatch_ID)
	{
		if (GL_JournalBatch_ID < 1)
			set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, Integer.valueOf(GL_JournalBatch_ID));
	}

	/** Get Journal Batch.
		@return General Ledger Journal Batch
	  */
	public int getGL_JournalBatch_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_GL_JournalBatch_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}