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

import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair;

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

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

    /** Standard Constructor */
    public X_WS_WebServiceFieldInput (Properties ctx, int WS_WebServiceFieldInput_ID, String trxName)
    {
      super (ctx, WS_WebServiceFieldInput_ID, trxName);
      /** if (WS_WebServiceFieldInput_ID == 0)
        {
			setWS_WebServiceFieldInput_ID (0);
			setWS_WebServiceType_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_WS_WebServiceFieldInput (Properties ctx, int WS_WebServiceFieldInput_ID, String trxName, String ... virtualColumns)
    {
      super (ctx, WS_WebServiceFieldInput_ID, trxName, virtualColumns);
      /** if (WS_WebServiceFieldInput_ID == 0)
        {
			setWS_WebServiceFieldInput_ID (0);
			setWS_WebServiceType_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_WS_WebServiceFieldInput (Properties ctx, String WS_WebServiceFieldInput_UU, String trxName)
    {
      super (ctx, WS_WebServiceFieldInput_UU, trxName);
      /** if (WS_WebServiceFieldInput_UU == null)
        {
			setWS_WebServiceFieldInput_ID (0);
			setWS_WebServiceType_ID (0);
        } */
    }

    /** Standard Constructor */
    public X_WS_WebServiceFieldInput (Properties ctx, String WS_WebServiceFieldInput_UU, String trxName, String ... virtualColumns)
    {
      super (ctx, WS_WebServiceFieldInput_UU, trxName, virtualColumns);
      /** if (WS_WebServiceFieldInput_UU == null)
        {
			setWS_WebServiceFieldInput_ID (0);
			setWS_WebServiceType_ID (0);
        } */
    }

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

    /** AccessLevel
      * @return 6 - System - Client
      */
    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_WS_WebServiceFieldInput[")
        .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();
	}

	public org.compiere.model.I_AD_Reference getAD_Reference() throws RuntimeException
	{
		return (org.compiere.model.I_AD_Reference)MTable.get(getCtx(), org.compiere.model.I_AD_Reference.Table_ID)
			.getPO(getAD_Reference_ID(), get_TrxName());
	}

	/** Set Reference.
		@param AD_Reference_ID System Reference and Validation
	*/
	public void setAD_Reference_ID (int AD_Reference_ID)
	{
		if (AD_Reference_ID < 1)
			set_Value (COLUMNNAME_AD_Reference_ID, null);
		else
			set_Value (COLUMNNAME_AD_Reference_ID, Integer.valueOf(AD_Reference_ID));
	}

	/** Get Reference.
		@return System Reference and Validation
	  */
	public int getAD_Reference_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_AD_Reference getAD_Reference_Value() throws RuntimeException
	{
		return (org.compiere.model.I_AD_Reference)MTable.get(getCtx(), org.compiere.model.I_AD_Reference.Table_ID)
			.getPO(getAD_Reference_Value_ID(), get_TrxName());
	}

	/** Set Reference Key.
		@param AD_Reference_Value_ID Required to specify, if data type is Table or List
	*/
	public void setAD_Reference_Value_ID (int AD_Reference_Value_ID)
	{
		if (AD_Reference_Value_ID < 1)
			set_Value (COLUMNNAME_AD_Reference_Value_ID, null);
		else
			set_Value (COLUMNNAME_AD_Reference_Value_ID, Integer.valueOf(AD_Reference_Value_ID));
	}

	/** Get Reference Key.
		@return Required to specify, if data type is Table or List
	  */
	public int getAD_Reference_Value_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_AD_Reference_Value_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set DB Column Name.
		@param ColumnName Name of the column in the database
	*/
	public void setColumnName (String ColumnName)
	{
		set_Value (COLUMNNAME_ColumnName, ColumnName);
	}

	/** Get DB Column Name.
		@return Name of the column in the database
	  */
	public String getColumnName()
	{
		return (String)get_Value(COLUMNNAME_ColumnName);
	}

	/** Set Identifier Logic.
		@param IdentifierLogic Identifier Logic
	*/
	public void setIdentifierLogic (String IdentifierLogic)
	{
		set_Value (COLUMNNAME_IdentifierLogic, IdentifierLogic);
	}

	/** Get Identifier Logic.
		@return Identifier Logic	  */
	public String getIdentifierLogic()
	{
		return (String)get_Value(COLUMNNAME_IdentifierLogic);
	}

	/** Set Identifier.
		@param IsIdentifier This column is part of the record identifier
	*/
	public void setIsIdentifier (boolean IsIdentifier)
	{
		set_Value (COLUMNNAME_IsIdentifier, Boolean.valueOf(IsIdentifier));
	}

	/** Get Identifier.
		@return This column is part of the record identifier
	  */
	public boolean isIdentifier()
	{
		Object oo = get_Value(COLUMNNAME_IsIdentifier);
		if (oo != null)
		{
			 if (oo instanceof Boolean)
				 return ((Boolean)oo).booleanValue();
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Allow Null Value.
		@param IsNullIdentifier Should allow null value for identifier field
	*/
	public void setIsNullIdentifier (boolean IsNullIdentifier)
	{
		set_Value (COLUMNNAME_IsNullIdentifier, Boolean.valueOf(IsNullIdentifier));
	}

	/** Get Allow Null Value.
		@return Should allow null value for identifier field
	  */
	public boolean isNullIdentifier()
	{
		Object oo = get_Value(COLUMNNAME_IsNullIdentifier);
		if (oo != null)
		{
			 if (oo instanceof Boolean)
				 return ((Boolean)oo).booleanValue();
			return "Y".equals(oo);
		}
		return false;
	}

	/** Set Web Service Field Input.
		@param WS_WebServiceFieldInput_ID Web Service Field Input
	*/
	public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID)
	{
		if (WS_WebServiceFieldInput_ID < 1)
			set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, null);
		else
			set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, Integer.valueOf(WS_WebServiceFieldInput_ID));
	}

	/** Get Web Service Field Input.
		@return Web Service Field Input	  */
	public int getWS_WebServiceFieldInput_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldInput_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(getWS_WebServiceFieldInput_ID()));
    }

	/** Set WS_WebServiceFieldInput_UU.
		@param WS_WebServiceFieldInput_UU WS_WebServiceFieldInput_UU
	*/
	public void setWS_WebServiceFieldInput_UU (String WS_WebServiceFieldInput_UU)
	{
		set_Value (COLUMNNAME_WS_WebServiceFieldInput_UU, WS_WebServiceFieldInput_UU);
	}

	/** Get WS_WebServiceFieldInput_UU.
		@return WS_WebServiceFieldInput_UU	  */
	public String getWS_WebServiceFieldInput_UU()
	{
		return (String)get_Value(COLUMNNAME_WS_WebServiceFieldInput_UU);
	}

	public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
	{
		return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_ID)
			.getPO(getWS_WebServiceType_ID(), get_TrxName());
	}

	/** Set Web Service Type.
		@param WS_WebServiceType_ID Web Service Type
	*/
	public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
	{
		if (WS_WebServiceType_ID < 1)
			set_Value (COLUMNNAME_WS_WebServiceType_ID, null);
		else
			set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
	}

	/** Get Web Service Type.
		@return Web Service Type	  */
	public int getWS_WebServiceType_ID()
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}