/******************************************************************************
 * 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.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;

/** Generated Model for AD_Find
 *  @author iDempiere (generated)
 *  @version Release 11 - $Id$ */
@org.adempiere.base.Model(table="AD_Find")
public class X_AD_Find extends PO implements I_AD_Find, I_Persistent
{

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

    /** Standard Constructor */
    public X_AD_Find (Properties ctx, int AD_Find_ID, String trxName)
    {
      super (ctx, AD_Find_ID, trxName);
      /** if (AD_Find_ID == 0)
        {
			setAD_Column_ID (0);
			setAD_Find_ID (0);
			setAndOr (null);
// A
			setFind_ID (Env.ZERO);
			setOperation (null);
// ==
			setValue (null);
        } */
    }

    /** Standard Constructor */
    public X_AD_Find (Properties ctx, int AD_Find_ID, String trxName, String ... virtualColumns)
    {
      super (ctx, AD_Find_ID, trxName, virtualColumns);
      /** if (AD_Find_ID == 0)
        {
			setAD_Column_ID (0);
			setAD_Find_ID (0);
			setAndOr (null);
// A
			setFind_ID (Env.ZERO);
			setOperation (null);
// ==
			setValue (null);
        } */
    }

    /** Standard Constructor */
    public X_AD_Find (Properties ctx, String AD_Find_UU, String trxName)
    {
      super (ctx, AD_Find_UU, trxName);
      /** if (AD_Find_UU == null)
        {
			setAD_Column_ID (0);
			setAD_Find_ID (0);
			setAndOr (null);
// A
			setFind_ID (Env.ZERO);
			setOperation (null);
// ==
			setValue (null);
        } */
    }

    /** Standard Constructor */
    public X_AD_Find (Properties ctx, String AD_Find_UU, String trxName, String ... virtualColumns)
    {
      super (ctx, AD_Find_UU, trxName, virtualColumns);
      /** if (AD_Find_UU == null)
        {
			setAD_Column_ID (0);
			setAD_Find_ID (0);
			setAndOr (null);
// A
			setFind_ID (Env.ZERO);
			setOperation (null);
// ==
			setValue (null);
        } */
    }

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

    /** AccessLevel
      * @return 7 - System - 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_AD_Find[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_AD_Column getAD_Column() throws RuntimeException
	{
		return (org.compiere.model.I_AD_Column)MTable.get(getCtx(), org.compiere.model.I_AD_Column.Table_ID)
			.getPO(getAD_Column_ID(), get_TrxName());
	}

	/** Set Column.
		@param AD_Column_ID Column in the table
	*/
	public void setAD_Column_ID (int AD_Column_ID)
	{
		if (AD_Column_ID < 1)
			set_Value (COLUMNNAME_AD_Column_ID, null);
		else
			set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID));
	}

	/** Get Column.
		@return Column in the table
	  */
	public int getAD_Column_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Find.
		@param AD_Find_ID Find
	*/
	public void setAD_Find_ID (int AD_Find_ID)
	{
		if (AD_Find_ID < 1)
			set_ValueNoCheck (COLUMNNAME_AD_Find_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_AD_Find_ID, Integer.valueOf(AD_Find_ID));
	}

	/** Get Find.
		@return Find	  */
	public int getAD_Find_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_AD_Find_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

    /** Get Record ID/ColumnName
        @return ID/ColumnName pair
      */
    public KeyNamePair getKeyNamePair()
    {
        return new KeyNamePair(get_ID(), String.valueOf(getAD_Find_ID()));
    }

	/** Set AD_Find_UU.
		@param AD_Find_UU AD_Find_UU
	*/
	public void setAD_Find_UU (String AD_Find_UU)
	{
		set_Value (COLUMNNAME_AD_Find_UU, AD_Find_UU);
	}

	/** Get AD_Find_UU.
		@return AD_Find_UU	  */
	public String getAD_Find_UU()
	{
		return (String)get_Value(COLUMNNAME_AD_Find_UU);
	}

	/** AndOr AD_Reference_ID=204 */
	public static final int ANDOR_AD_Reference_ID=204;
	/** And = A */
	public static final String ANDOR_And = "A";
	/** Or = O */
	public static final String ANDOR_Or = "O";
	/** Set And/Or.
		@param AndOr Logical operation: AND or OR
	*/
	public void setAndOr (String AndOr)
	{

		set_Value (COLUMNNAME_AndOr, AndOr);
	}

	/** Get And/Or.
		@return Logical operation: AND or OR
	  */
	public String getAndOr()
	{
		return (String)get_Value(COLUMNNAME_AndOr);
	}

	/** Set Find.
		@param Find_ID Find
	*/
	public void setFind_ID (BigDecimal Find_ID)
	{
		set_Value (COLUMNNAME_Find_ID, Find_ID);
	}

	/** Get Find.
		@return Find	  */
	public BigDecimal getFind_ID()
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Find_ID);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Operation AD_Reference_ID=205 */
	public static final int OPERATION_AD_Reference_ID=205;
	/** != = != */
	public static final String OPERATION_NotEq = "!=";
	/** &lt; = &lt;&lt; */
	public static final String OPERATION_Le = "<<";
	/** &lt;= = &lt;= */
	public static final String OPERATION_LeEq = "<=";
	/**  = = == */
	public static final String OPERATION_Eq = "==";
	/** &gt;= = &gt;= */
	public static final String OPERATION_GtEq = ">=";
	/** &gt; = &gt;&gt; */
	public static final String OPERATION_Gt = ">>";
	/**  ~ = ~~ */
	public static final String OPERATION_Like = "~~";
	/** |&lt;x&gt;| = AB */
	public static final String OPERATION_X = "AB";
	/** sql = SQ */
	public static final String OPERATION_Sql = "SQ";
	/** Set Operation.
		@param Operation Compare Operation
	*/
	public void setOperation (String Operation)
	{

		set_Value (COLUMNNAME_Operation, Operation);
	}

	/** Get Operation.
		@return Compare Operation
	  */
	public String getOperation()
	{
		return (String)get_Value(COLUMNNAME_Operation);
	}

	/** Set Search Key.
		@param Value Search key for the record in the format required - must be unique
	*/
	public void setValue (String Value)
	{
		set_Value (COLUMNNAME_Value, Value);
	}

	/** Get Search Key.
		@return Search key for the record in the format required - must be unique
	  */
	public String getValue()
	{
		return (String)get_Value(COLUMNNAME_Value);
	}

	/** Set Value To.
		@param Value2 Value To
	*/
	public void setValue2 (String Value2)
	{
		set_Value (COLUMNNAME_Value2, Value2);
	}

	/** Get Value To.
		@return Value To
	  */
	public String getValue2()
	{
		return (String)get_Value(COLUMNNAME_Value2);
	}
}