/******************************************************************************
 * Product: Compiere ERP & CRM Smart Business Solution                        *
 * Copyright (C) 1999-2007 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., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA      *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
package compiere.model;

/** Generated Model - DO NOT CHANGE */
import org.compiere.model.*;
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for I_ImpFormat_Row
 *  @author Jorg Janke (generated) 
 *  @version Release 3.0.0 - $Id: GenerateModel.java,v 1.1 2008/01/16 07:34:32 jrmt Exp $ */
public class X_I_ImpFormat_Row extends PO
{
/** Standard Constructor
@param ctx context
@param I_ImpFormat_Row_ID id
@param trxName transaction
*/
public X_I_ImpFormat_Row (Ctx ctx, int I_ImpFormat_Row_ID, String trxName)
{
super (ctx, I_ImpFormat_Row_ID, trxName);
/** if (I_ImpFormat_Row_ID == 0)
{
setI_ImpFormat_Row_ID (0);
setI_IsImported (false);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_I_ImpFormat_Row (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27484242484789L;
/** Last Updated Timestamp 2008-02-04 18:26:08.0 */
public static final long updatedMS = 1202117168000L;
/** AD_Table_ID=1000007 */
public static final int Table_ID=1000007;

/** TableName=I_ImpFormat_Row */
public static final String Table_Name="I_ImpFormat_Row";

protected static KeyNamePair Model = new KeyNamePair(1000007,"I_ImpFormat_Row");

protected BigDecimal accessLevel = new BigDecimal(6);
/** AccessLevel
@return 6 - System - Client 
*/
protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data
@param ctx context
@return PO Info
*/
protected POInfo initPO (Ctx ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
return poi;
}
/** Info
@return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer ("X_I_ImpFormat_Row[").append(get_ID()).append("]");
return sb.toString();
}
/** Set Column.
@param AD_Column_ID Column in the table */
public void setAD_Column_ID (int AD_Column_ID)
{
if (AD_Column_ID <= 0) set_Value ("AD_Column_ID", null);
else
set_Value ("AD_Column_ID", new Integer(AD_Column_ID));
}
/** Get Column.
@return Column in the table */
public int getAD_Column_ID() 
{
Integer ii = (Integer)get_Value("AD_Column_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Import Format.
@param AD_ImpFormat_ID Import Format */
public void setAD_ImpFormat_ID (int AD_ImpFormat_ID)
{
if (AD_ImpFormat_ID <= 0) set_Value ("AD_ImpFormat_ID", null);
else
set_Value ("AD_ImpFormat_ID", new Integer(AD_ImpFormat_ID));
}
/** Get Import Format.
@return Import Format */
public int getAD_ImpFormat_ID() 
{
Integer ii = (Integer)get_Value("AD_ImpFormat_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Format Field.
@param AD_ImpFormat_Row_ID Format Field */
public void setAD_ImpFormat_Row_ID (int AD_ImpFormat_Row_ID)
{
if (AD_ImpFormat_Row_ID <= 0) set_Value ("AD_ImpFormat_Row_ID", null);
else
set_Value ("AD_ImpFormat_Row_ID", new Integer(AD_ImpFormat_Row_ID));
}
/** Get Format Field.
@return Format Field */
public int getAD_ImpFormat_Row_ID() 
{
Integer ii = (Integer)get_Value("AD_ImpFormat_Row_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Table.
@param AD_Table_ID Database Table information */
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID <= 0) set_Value ("AD_Table_ID", null);
else
set_Value ("AD_Table_ID", new Integer(AD_Table_ID));
}
/** Get Table.
@return Database Table information */
public int getAD_Table_ID() 
{
Integer ii = (Integer)get_Value("AD_Table_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Callout Code.
@param Callout External Callout Code - Fully qualified class names and method - separated by semicolons */
public void setCallout (String Callout)
{
if (Callout != null && Callout.length() > 120)
{
log.warning("Length > 120 - truncated");
Callout = Callout.substring(0,120);
}
set_Value ("Callout", Callout);
}
/** Get Callout Code.
@return External Callout Code - Fully qualified class names and method - separated by semicolons */
public String getCallout() 
{
return (String)get_Value("Callout");
}
/** Set DB Column Name.
@param ColumnName Name of the column in the database */
public void setColumnName (String ColumnName)
{
if (ColumnName != null && ColumnName.length() > 120)
{
log.warning("Length > 120 - truncated");
ColumnName = ColumnName.substring(0,120);
}
set_Value ("ColumnName", ColumnName);
}
/** Get DB Column Name.
@return Name of the column in the database */
public String getColumnName() 
{
return (String)get_Value("ColumnName");
}
/** Set Constant Value.
@param ConstantValue Constant value */
public void setConstantValue (String ConstantValue)
{
if (ConstantValue != null && ConstantValue.length() > 120)
{
log.warning("Length > 120 - truncated");
ConstantValue = ConstantValue.substring(0,120);
}
set_Value ("ConstantValue", ConstantValue);
}
/** Get Constant Value.
@return Constant value */
public String getConstantValue() 
{
return (String)get_Value("ConstantValue");
}
/** Set Data Format.
@param DataFormat Format String in Java Notation, e.g. ddMMyy */
public void setDataFormat (String DataFormat)
{
if (DataFormat != null && DataFormat.length() > 40)
{
log.warning("Length > 40 - truncated");
DataFormat = DataFormat.substring(0,40);
}
set_Value ("DataFormat", DataFormat);
}
/** Get Data Format.
@return Format String in Java Notation, e.g. ddMMyy */
public String getDataFormat() 
{
return (String)get_Value("DataFormat");
}

/** DataType AD_Reference_ID=210 */
public static final int DATATYPE_AD_Reference_ID=210;
/** Constant = C */
public static final String DATATYPE_Constant = "C";
/** Date = D */
public static final String DATATYPE_Date = "D";
/** Number = N */
public static final String DATATYPE_Number = "N";
/** String = S */
public static final String DATATYPE_String = "S";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public boolean isDataTypeValid (String test)
{
return test == null || test.equals("C") || test.equals("D") || test.equals("N") || test.equals("S");
}
/** Set Data Type.
@param DataType Type of data */
public void setDataType (String DataType)
{
if (!isDataTypeValid(DataType))
throw new IllegalArgumentException ("DataType Invalid value - " + DataType + " - Reference_ID=210 - C - D - N - S");
if (DataType != null && DataType.length() > 1)
{
log.warning("Length > 1 - truncated");
DataType = DataType.substring(0,1);
}
set_Value ("DataType", DataType);
}
/** Get Data Type.
@return Type of data */
public String getDataType() 
{
return (String)get_Value("DataType");
}
/** Set Decimal Point.
@param DecimalPoint Decimal Point in the data file - if any */
public void setDecimalPoint (String DecimalPoint)
{
if (DecimalPoint != null && DecimalPoint.length() > 1)
{
log.warning("Length > 1 - truncated");
DecimalPoint = DecimalPoint.substring(0,1);
}
set_Value ("DecimalPoint", DecimalPoint);
}
/** Get Decimal Point.
@return Decimal Point in the data file - if any */
public String getDecimalPoint() 
{
return (String)get_Value("DecimalPoint");
}
/** Set Description.
@param Description Optional short description of the record */
public void setDescription (String Description)
{
if (Description != null && Description.length() > 200)
{
log.warning("Length > 200 - truncated");
Description = Description.substring(0,200);
}
set_Value ("Description", Description);
}
/** Get Description.
@return Optional short description of the record */
public String getDescription() 
{
return (String)get_Value("Description");
}
/** Set Divide by 100.
@param DivideBy100 Divide number by 100 to get correct amount */
public void setDivideBy100 (boolean DivideBy100)
{
set_Value ("DivideBy100", new Boolean(DivideBy100));
}
/** Get Divide by 100.
@return Divide number by 100 to get correct amount */
public boolean isDivideBy100() 
{
Object oo = get_Value("DivideBy100");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set End No.
@param EndNo End No */
public void setEndNo (int EndNo)
{
set_Value ("EndNo", new Integer(EndNo));
}
/** Get End No.
@return End No */
public int getEndNo() 
{
Integer ii = (Integer)get_Value("EndNo");
if (ii == null) return 0;
return ii.intValue();
}

/** FormatType AD_Reference_ID=209 */
public static final int FORMATTYPE_AD_Reference_ID=209;
/** Comma Separated = C */
public static final String FORMATTYPE_CommaSeparated = "C";
/** Fixed Position = F */
public static final String FORMATTYPE_FixedPosition = "F";
/** Tab Separated = T */
public static final String FORMATTYPE_TabSeparated = "T";
/** XML = X */
public static final String FORMATTYPE_XML = "X";
/** Is test a valid value.
@param test testvalue
@returns true if valid **/
public boolean isFormatTypeValid (String test)
{
return test == null || test.equals("C") || test.equals("F") || test.equals("T") || test.equals("X");
}
/** Set Format.
@param FormatType Format of the data */
public void setFormatType (String FormatType)
{
if (!isFormatTypeValid(FormatType))
throw new IllegalArgumentException ("FormatType Invalid value - " + FormatType + " - Reference_ID=209 - C - F - T - X");
if (FormatType != null && FormatType.length() > 1)
{
log.warning("Length > 1 - truncated");
FormatType = FormatType.substring(0,1);
}
set_Value ("FormatType", FormatType);
}
/** Get Format.
@return Format of the data */
public String getFormatType() 
{
return (String)get_Value("FormatType");
}
/** Set Import Error Message.
@param I_ErrorMsg Messages generated from import process */
public void setI_ErrorMsg (String I_ErrorMsg)
{
if (I_ErrorMsg != null && I_ErrorMsg.length() > 200)
{
log.warning("Length > 200 - truncated");
I_ErrorMsg = I_ErrorMsg.substring(0,200);
}
set_Value ("I_ErrorMsg", I_ErrorMsg);
}
/** Get Import Error Message.
@return Messages generated from import process */
public String getI_ErrorMsg() 
{
return (String)get_Value("I_ErrorMsg");
}
/** Set I_ImpFormat_Row_ID.
@param I_ImpFormat_Row_ID I_ImpFormat_Row_ID */
public void setI_ImpFormat_Row_ID (int I_ImpFormat_Row_ID)
{
if (I_ImpFormat_Row_ID < 1) throw new IllegalArgumentException ("I_ImpFormat_Row_ID is mandatory.");
set_ValueNoCheck ("I_ImpFormat_Row_ID", new Integer(I_ImpFormat_Row_ID));
}
/** Get I_ImpFormat_Row_ID.
@return I_ImpFormat_Row_ID */
public int getI_ImpFormat_Row_ID() 
{
Integer ii = (Integer)get_Value("I_ImpFormat_Row_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Imported.
@param I_IsImported Has this import been processed */
public void setI_IsImported (boolean I_IsImported)
{
set_Value ("I_IsImported", new Boolean(I_IsImported));
}
/** Get Imported.
@return Has this import been processed */
public boolean isI_IsImported() 
{
Object oo = get_Value("I_IsImported");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set ImpFormatName.
@param ImpFormatName ImpFormatName */
public void setImpFormatName (String ImpFormatName)
{
if (ImpFormatName != null && ImpFormatName.length() > 120)
{
log.warning("Length > 120 - truncated");
ImpFormatName = ImpFormatName.substring(0,120);
}
set_Value ("ImpFormatName", ImpFormatName);
}
/** Get ImpFormatName.
@return ImpFormatName */
public String getImpFormatName() 
{
return (String)get_Value("ImpFormatName");
}
/** Set Processed.
@param Processed The document has been processed */
public void setProcessed (boolean Processed)
{
set_Value ("Processed", new Boolean(Processed));
}
/** Get Processed.
@return The document has been processed */
public boolean isProcessed() 
{
Object oo = get_Value("Processed");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value ("Processing", new Boolean(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing() 
{
Object oo = get_Value("Processing");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set RowName.
@param RowName RowName */
public void setRowName (String RowName)
{
if (RowName != null && RowName.length() > 120)
{
log.warning("Length > 120 - truncated");
RowName = RowName.substring(0,120);
}
set_Value ("RowName", RowName);
}
/** Get RowName.
@return RowName */
public String getRowName() 
{
return (String)get_Value("RowName");
}
/** Set Script.
@param Script Dynamic Java Language Script to calculate result */
public void setScript (String Script)
{
if (Script != null && Script.length() > 200)
{
log.warning("Length > 200 - truncated");
Script = Script.substring(0,200);
}
set_Value ("Script", Script);
}
/** Get Script.
@return Dynamic Java Language Script to calculate result */
public String getScript() 
{
return (String)get_Value("Script");
}
/** Set Sequence.
@param SeqNo Method of ordering elements;
 lowest number comes first */
public void setSeqNo (int SeqNo)
{
set_Value ("SeqNo", new Integer(SeqNo));
}
/** Get Sequence.
@return Method of ordering elements;
 lowest number comes first */
public int getSeqNo() 
{
Integer ii = (Integer)get_Value("SeqNo");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Start No.
@param StartNo Starting number/position */
public void setStartNo (int StartNo)
{
set_Value ("StartNo", new Integer(StartNo));
}
/** Get Start No.
@return Starting number/position */
public int getStartNo() 
{
Integer ii = (Integer)get_Value("StartNo");
if (ii == null) return 0;
return ii.intValue();
}
/** Set DB Table Name.
@param TableName Name of the table in the database */
public void setTableName (String TableName)
{
if (TableName != null && TableName.length() > 120)
{
log.warning("Length > 120 - truncated");
TableName = TableName.substring(0,120);
}
set_Value ("TableName", TableName);
}
/** Get DB Table Name.
@return Name of the table in the database */
public String getTableName() 
{
return (String)get_Value("TableName");
}
}
