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

/** Generated Model - DO NOT CHANGE */
import java.sql.*;
import java.math.*;
import org.compiere.framework.*;
import org.compiere.util.*;
/** Generated Model for AD_UserPreference
 *  @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_AD_UserPreference extends PO
{
/** Standard Constructor
@param ctx context
@param AD_UserPreference_ID id
@param trxName transaction
*/
public X_AD_UserPreference (Ctx ctx, int AD_UserPreference_ID, String trxName)
{
super (ctx, AD_UserPreference_ID, trxName);
/** if (AD_UserPreference_ID == 0)
{
setAD_UserPreference_ID (0);
setAD_User_ID (0);
}
 */
}
/** Load Constructor 
@param ctx context
@param rs result set 
@param trxName transaction
*/
public X_AD_UserPreference (Ctx ctx, ResultSet rs, String trxName)
{
super (ctx, rs, trxName);
}
/** Serial Version No */
static final long serialVersionUID = 27472864645789L;
/** Last Updated Timestamp 2007-09-26 01:55:29.0 */
public static final long updatedMS = 1190739329000L;
/** AD_Table_ID=989 */
public static final int Table_ID=989;

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

protected static KeyNamePair Model = new KeyNamePair(989,"AD_UserPreference");

protected BigDecimal accessLevel = new BigDecimal(7);
/** AccessLevel
@return 7 - System - Client - Org 
*/
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_AD_UserPreference[").append(get_ID()).append("]");
return sb.toString();
}
/** Set User Preference.
@param AD_UserPreference_ID Application User Preferences */
public void setAD_UserPreference_ID (int AD_UserPreference_ID)
{
if (AD_UserPreference_ID < 1) throw new IllegalArgumentException ("AD_UserPreference_ID is mandatory.");
set_ValueNoCheck ("AD_UserPreference_ID", new Integer(AD_UserPreference_ID));
}
/** Get User Preference.
@return Application User Preferences */
public int getAD_UserPreference_ID() 
{
Integer ii = (Integer)get_Value("AD_UserPreference_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set User/Contact.
@param AD_User_ID User within the system - Internal or Business Partner Contact */
public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 1) throw new IllegalArgumentException ("AD_User_ID is mandatory.");
set_ValueNoCheck ("AD_User_ID", new Integer(AD_User_ID));
}
/** Get User/Contact.
@return User within the system - Internal or Business Partner Contact */
public int getAD_User_ID() 
{
Integer ii = (Integer)get_Value("AD_User_ID");
if (ii == null) return 0;
return ii.intValue();
}
/** Set Auto Commit.
@param IsAutoCommit Automatically save changes */
public void setIsAutoCommit (boolean IsAutoCommit)
{
set_Value ("IsAutoCommit", new Boolean(IsAutoCommit));
}
/** Get Auto Commit.
@return Automatically save changes */
public boolean isAutoCommit() 
{
Object oo = get_Value("IsAutoCommit");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Show Accounting.
@param IsShowAcct Users with this role can see accounting information */
public void setIsShowAcct (boolean IsShowAcct)
{
set_Value ("IsShowAcct", new Boolean(IsShowAcct));
}
/** Get Show Accounting.
@return Users with this role can see accounting information */
public boolean isShowAcct() 
{
Object oo = get_Value("IsShowAcct");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Show Advanced.
@param IsShowAdvanced Show Advanced Tabs */
public void setIsShowAdvanced (boolean IsShowAdvanced)
{
set_Value ("IsShowAdvanced", new Boolean(IsShowAdvanced));
}
/** Get Show Advanced.
@return Show Advanced Tabs */
public boolean isShowAdvanced() 
{
Object oo = get_Value("IsShowAdvanced");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Show Translation.
@param IsShowTrl Show Translation Tabs */
public void setIsShowTrl (boolean IsShowTrl)
{
set_Value ("IsShowTrl", new Boolean(IsShowTrl));
}
/** Get Show Translation.
@return Show Translation Tabs */
public boolean isShowTrl() 
{
Object oo = get_Value("IsShowTrl");
if (oo != null) 
{
 if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
 return "Y".equals(oo);
}
return false;
}
/** Set Printer Name.
@param PrinterName Name of the Printer */
public void setPrinterName (String PrinterName)
{
if (PrinterName != null && PrinterName.length() > 60)
{
log.warning("Length > 60 - truncated");
PrinterName = PrinterName.substring(0,60);
}
set_Value ("PrinterName", PrinterName);
}
/** Get Printer Name.
@return Name of the Printer */
public String getPrinterName() 
{
return (String)get_Value("PrinterName");
}
/** Set UI Theme.
@param UITheme User Interface Theme */
public void setUITheme (String UITheme)
{
if (UITheme != null && UITheme.length() > 60)
{
log.warning("Length > 60 - truncated");
UITheme = UITheme.substring(0,60);
}
set_Value ("UITheme", UITheme);
}
/** Get UI Theme.
@return User Interface Theme */
public String getUITheme() 
{
return (String)get_Value("UITheme");
}
}
