IDEMPIERE-364 Improve Grid Layout

This commit is contained in:
Carlos Ruiz 2012-08-13 12:30:27 -05:00
parent 1c1dff7b70
commit 3d8114fd41
10 changed files with 255 additions and 220 deletions

View File

@ -372,7 +372,7 @@ Update ad_field set seqNoGrid = seqNo;
UPDATE AD_System UPDATE AD_System
SET LastMigrationScriptApplied='872_IDEMPIERE-364_Customizable_Grid_oracle.sql' SET LastMigrationScriptApplied='872_IDEMPIERE-364_Customizable_Grid.sql'
WHERE LastMigrationScriptApplied<'872_IDEMPIERE-364_Customizable_Grid_oracle.sql' WHERE LastMigrationScriptApplied<'872_IDEMPIERE-364_Customizable_Grid.sql'
OR LastMigrationScriptApplied IS NULL OR LastMigrationScriptApplied IS NULL
; ;

View File

@ -69,7 +69,7 @@ CREATE OR REPLACE VIEW AD_FIELD_VT AS
UPDATE AD_System UPDATE AD_System
SET LastMigrationScriptApplied='873_IDEMPIERE-364_AD_Field_oracle.sql' SET LastMigrationScriptApplied='873_IDEMPIERE-364_AD_Field.sql'
WHERE LastMigrationScriptApplied<'873_IDEMPIERE-364_AD_Field_oracle.sql' WHERE LastMigrationScriptApplied<'873_IDEMPIERE-364_AD_Field.sql'
OR LastMigrationScriptApplied IS NULL OR LastMigrationScriptApplied IS NULL
; ;

View File

@ -371,7 +371,9 @@ Update ad_field set isDisplayedGrid = isDisplayed;
Update ad_field set seqNoGrid = seqNo; Update ad_field set seqNoGrid = seqNo;
UPDATE AD_System UPDATE AD_System
SET LastMigrationScriptApplied='872_IDEMPIERE-364_Customizable_Grid_postgresql.sql' SET LastMigrationScriptApplied='872_IDEMPIERE-364_Customizable_Grid.sql'
WHERE LastMigrationScriptApplied<'872_IDEMPIERE-364_Customizable_Grid_postgresql.sql' WHERE LastMigrationScriptApplied<'872_IDEMPIERE-364_Customizable_Grid.sql'
OR LastMigrationScriptApplied IS NULL; OR LastMigrationScriptApplied IS NULL
;

View File

@ -26,8 +26,8 @@ CREATE OR REPLACE VIEW ad_field_vt AS
UPDATE AD_System UPDATE AD_System
SET LastMigrationScriptApplied='873_IDEMPIERE-364_AD_Field_postgresql.sql' SET LastMigrationScriptApplied='873_IDEMPIERE-364_AD_Field.sql'
WHERE LastMigrationScriptApplied<'873_IDEMPIERE-364_AD_Field_postgresql.sql' WHERE LastMigrationScriptApplied<'873_IDEMPIERE-364_AD_Field.sql'
OR LastMigrationScriptApplied IS NULL; OR LastMigrationScriptApplied IS NULL
; ;

View File

@ -21,7 +21,7 @@
<stringAttribute key="pde.version" value="3.3"/> <stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.adempiere.server.server_product"/> <stringAttribute key="product" value="org.adempiere.server.server_product"/>
<stringAttribute key="selected_target_plugins" value="com.springsource.javax.activation@default:default,com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/> <stringAttribute key="selected_target_plugins" value="com.springsource.javax.activation@default:default,com.springsource.javax.ejb@default:default,com.springsource.javax.jms@default:default,com.springsource.javax.mail@default:default,com.springsource.javax.management.j2ee@default:default,com.springsource.javax.transaction@default:default,com.springsource.javax.xml.rpc@default:default,com.springsource.javax.xml.soap@default:default,com.springsource.net.sf.cglib@default:default,com.springsource.org.aopalliance@default:default,com.springsource.org.apache.activemq@default:default,com.springsource.org.apache.commons.logging@default:default,com.springsource.org.apache.kahadb@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.ant@default:default,org.apache.commons.codec@default:default,org.apache.commons.collections@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.poi@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.junit@default:default,org.restlet@default:default,org.springframework.aop@default:default,org.springframework.beans@default:default,org.springframework.context@default:default,org.springframework.core@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.zkoss.zk.library@default:default"/> <stringAttribute key="selected_workspace_plugins" value="event.test@default:default,org.adempiere.base@default:default,org.adempiere.eclipse.equinox.http.servlet@default:default,org.adempiere.eclipse.equinox.http.servletbridge@default:default,org.adempiere.eclipse.equinox.servletbridge@default:default,org.adempiere.extend@default:false,org.adempiere.install@default:default,org.adempiere.pipo.legacy@default:default,org.adempiere.report.jasper.font.demo@default:false,org.adempiere.report.jasper.library@default:default,org.adempiere.report.jasper@default:default,org.adempiere.ui.swing.pluginlist@default:default,org.apache.ecs@default:default,org.compiere.db.oracle.provider@default:default,org.compiere.db.postgresql.provider@default:default,org.zkoss.zk.library@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/> <booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/> <stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/> <booleanAttribute key="tracing" value="false"/>

View File

@ -1,103 +0,0 @@
/**********************************************************************
* This file is part of Adempiere ERP Bazaar *
* http://www.adempiere.org *
* *
* Copyright (C) Trifon Trifonov. *
* Copyright (C) Contributors *
* *
* This program is free software, you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation, either version 2 *
* of the License, or (at your option) any later version. *
* *
* 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., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
* *
* Sponsors: *
* - Company (http://www.site.com) *
**********************************************************************/
package org.adempiere.model;
import java.math.BigDecimal;
import org.compiere.model.*;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_Tab_Customization
* @author Adempiere (generated)
* @version Release 3.5.2a
*/
public interface I_AD_Tab_Customization
{
/** TableName=AD_Tab_Customization */
public static final String Table_Name = "AD_Tab_Customization";
/** AD_Table_ID=2000077 */
public static final int Table_ID = MTable.getTable_ID(Table_Name);
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 3 - Client - Org
*/
BigDecimal accessLevel = BigDecimal.valueOf(3);
/** Load Meta Data */
/** Column name AD_Tab_ID */
public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID";
/** Set Tab.
* Tab within a Window
*/
public void setAD_Tab_ID (int AD_Tab_ID);
/** Get Tab.
* Tab within a Window
*/
public int getAD_Tab_ID();
public I_AD_Tab getAD_Tab() throws Exception;
/** Column name AD_Tab_Customization_ID */
public static final String COLUMNNAME_AD_Tab_Customization_ID = "AD_Tab_Customization_ID";
/** Set AD_Tab_Customization_ID */
public void setAD_Tab_Customization_ID (int AD_Tab_Customization_ID);
/** Get AD_Tab_Customization_ID */
public int getAD_Tab_Customization_ID();
/** Column name AD_User_ID */
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
/** Set User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public void setAD_User_ID (int AD_User_ID);
/** Get User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID();
public I_AD_User getAD_User() throws Exception;
/** Column name Custom */
public static final String COLUMNNAME_Custom = "Custom";
/** Set Custom */
public void setCustom (String Custom);
/** Get Custom */
public String getCustom();
}

View File

@ -4,13 +4,14 @@ import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import org.compiere.model.Query; import org.compiere.model.Query;
import org.compiere.model.X_AD_Tab_Customization;
public class MTabCustomization extends X_AD_Tab_Customization { public class MTabCustomization extends X_AD_Tab_Customization {
/** /**
* *
*/ */
private static final long serialVersionUID = 6001121773007479059L; private static final long serialVersionUID = 3977886674683054829L;
public MTabCustomization(Properties ctx, int AD_Tab_Customization_ID, String trxName) { public MTabCustomization(Properties ctx, int AD_Tab_Customization_ID, String trxName) {
super(ctx, AD_Tab_Customization_ID, trxName); super(ctx, AD_Tab_Customization_ID, trxName);
if (AD_Tab_Customization_ID == 0) if (AD_Tab_Customization_ID == 0)

View File

@ -20,6 +20,7 @@ import java.awt.Insets;
import java.awt.Panel; import java.awt.Panel;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.File;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JCheckBox; import javax.swing.JCheckBox;
@ -29,6 +30,8 @@ import javax.swing.JLabel;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.JTextField; import javax.swing.JTextField;
import org.compiere.Adempiere;
/** /**
* *
* @author hengsin * @author hengsin
@ -63,7 +66,8 @@ public class ModelGeneratorDialog extends JDialog implements ActionListener {
Panel filePanel = new Panel(); Panel filePanel = new Panel();
filePanel.setLayout(new BorderLayout()); filePanel.setLayout(new BorderLayout());
fFolderName = new JTextField(); String defaultPath = Adempiere.getAdempiereHome() + File.separator + "org.adempiere.base" + File.separator + "src";
fFolderName = new JTextField(defaultPath);
filePanel.add(fFolderName, BorderLayout.CENTER); filePanel.add(fFolderName, BorderLayout.CENTER);
bFolder = new JButton("..."); bFolder = new JButton("...");
bFolder.setMargin(new Insets(0, 0, 0, 0)); bFolder.setMargin(new Insets(0, 0, 0, 0));
@ -73,22 +77,22 @@ public class ModelGeneratorDialog extends JDialog implements ActionListener {
bFolder.addActionListener(this); bFolder.addActionListener(this);
mainPanel.add(new JLabel("Package Name")); mainPanel.add(new JLabel("Package Name"));
fPackageName = new JTextField("org.adempiere.model"); fPackageName = new JTextField("org.compiere.model");
mainPanel.add(fPackageName); mainPanel.add(fPackageName);
mainPanel.add(new JLabel("Table Name")); mainPanel.add(new JLabel("Table Name"));
fTableName = new JTextField("%"); fTableName = new JTextField("AD_ReplaceThis%");
mainPanel.add(fTableName); mainPanel.add(fTableName);
mainPanel.add(new JLabel("Entity Type")); mainPanel.add(new JLabel("Entity Type"));
fEntityType = new JTextField("U,A"); fEntityType = new JTextField("D");
mainPanel.add(fEntityType); mainPanel.add(fEntityType);
fGenerateInterface = new JCheckBox("Generate Interface"); fGenerateInterface = new JCheckBox("Generate Interface");
fGenerateInterface.setSelected(true); fGenerateInterface.setSelected(true);
mainPanel.add(fGenerateInterface); mainPanel.add(fGenerateInterface);
fGenerateClass = new JCheckBox("Generate Class"); fGenerateClass = new JCheckBox("Generate Class");
fGenerateClass.setSelected(false); fGenerateClass.setSelected(true);
mainPanel.add(fGenerateClass); mainPanel.add(fGenerateClass);
bGenerate = new JButton("Generate Source"); bGenerate = new JButton("Generate Source");

View File

@ -0,0 +1,157 @@
/******************************************************************************
* Product: Adempiere 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., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_Tab_Customization
* @author Adempiere (generated)
* @version Release 3.6.0LTS
*/
public interface I_AD_Tab_Customization
{
/** TableName=AD_Tab_Customization */
public static final String Table_Name = "AD_Tab_Customization";
/** AD_Table_ID=200008 */
public static final int Table_ID = 200008;
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
/** AccessLevel = 4 - System
*/
BigDecimal accessLevel = BigDecimal.valueOf(4);
/** Load Meta Data */
/** Column name AD_Client_ID */
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
/** Get Client.
* Client/Tenant for this installation.
*/
public int getAD_Client_ID();
/** Column name AD_Org_ID */
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
/** Set Organization.
* Organizational entity within client
*/
public void setAD_Org_ID (int AD_Org_ID);
/** Get Organization.
* Organizational entity within client
*/
public int getAD_Org_ID();
/** Column name AD_Tab_Customization_ID */
public static final String COLUMNNAME_AD_Tab_Customization_ID = "AD_Tab_Customization_ID";
/** Set Tab Customization */
public void setAD_Tab_Customization_ID (int AD_Tab_Customization_ID);
/** Get Tab Customization */
public int getAD_Tab_Customization_ID();
/** Column name AD_Tab_ID */
public static final String COLUMNNAME_AD_Tab_ID = "AD_Tab_ID";
/** Set Tab.
* Tab within a Window
*/
public void setAD_Tab_ID (int AD_Tab_ID);
/** Get Tab.
* Tab within a Window
*/
public int getAD_Tab_ID();
public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException;
/** Column name AD_User_ID */
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
/** Set User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public void setAD_User_ID (int AD_User_ID);
/** Get User/Contact.
* User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID();
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
/** Column name Created */
public static final String COLUMNNAME_Created = "Created";
/** Get Created.
* Date this record was created
*/
public Timestamp getCreated();
/** Column name CreatedBy */
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
/** Get Created By.
* User who created this records
*/
public int getCreatedBy();
/** Column name Custom */
public static final String COLUMNNAME_Custom = "Custom";
/** Set Custom */
public void setCustom (String Custom);
/** Get Custom */
public String getCustom();
/** Column name IsActive */
public static final String COLUMNNAME_IsActive = "IsActive";
/** Set Active.
* The record is active in the system
*/
public void setIsActive (boolean IsActive);
/** Get Active.
* The record is active in the system
*/
public boolean isActive();
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";
/** Get Updated.
* Date this record was updated
*/
public Timestamp getUpdated();
/** Column name UpdatedBy */
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
/** Get Updated By.
* User who updated this records
*/
public int getUpdatedBy();
}

View File

@ -1,38 +1,35 @@
/****************************************************************************** /******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution * * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it * * 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 * * 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 * * 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 * * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. * * See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along * * 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., * * with this program, if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us * * 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 * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/ *****************************************************************************/
/** Generated Model - DO NOT CHANGE */ /** Generated Model - DO NOT CHANGE */
package org.adempiere.model; package org.compiere.model;
import java.lang.reflect.Constructor;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level;
import org.compiere.model.*;
/** Generated Model for AD_Tab_Customization /** Generated Model for AD_Tab_Customization
* @author Adempiere (generated) * @author Adempiere (generated)
* @version Release 3.5.2a - $Id$ */ * @version Release 3.6.0LTS - $Id$ */
public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization, I_Persistent public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization, I_Persistent
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 20120813L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_Tab_Customization (Properties ctx, int AD_Tab_Customization_ID, String trxName) public X_AD_Tab_Customization (Properties ctx, int AD_Tab_Customization_ID, String trxName)
@ -52,7 +49,7 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
} }
/** AccessLevel /** AccessLevel
* @return 3 - Client - Org * @return 4 - System
*/ */
protected int get_AccessLevel() protected int get_AccessLevel()
{ {
@ -73,22 +70,31 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
return sb.toString(); return sb.toString();
} }
public I_AD_Tab getAD_Tab() throws Exception /** Set Tab Customization.
@param AD_Tab_Customization_ID Tab Customization */
public void setAD_Tab_Customization_ID (int AD_Tab_Customization_ID)
{ {
Class<?> clazz = MTable.getClass(I_AD_Tab.Table_Name); if (AD_Tab_Customization_ID < 1)
I_AD_Tab result = null; set_ValueNoCheck (COLUMNNAME_AD_Tab_Customization_ID, null);
try { else
Constructor<?> constructor = null; set_ValueNoCheck (COLUMNNAME_AD_Tab_Customization_ID, Integer.valueOf(AD_Tab_Customization_ID));
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_AD_Tab)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Tab_ID()), get_TrxName()});
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
throw e;
} }
return result;
/** Get Tab Customization.
@return Tab Customization */
public int getAD_Tab_Customization_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tab_Customization_ID);
if (ii == null)
return 0;
return ii.intValue();
} }
public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException
{
return (org.compiere.model.I_AD_Tab)MTable.get(getCtx(), org.compiere.model.I_AD_Tab.Table_Name)
.getPO(getAD_Tab_ID(), get_TrxName()); }
/** Set Tab. /** Set Tab.
@param AD_Tab_ID @param AD_Tab_ID
Tab within a Window Tab within a Window
@ -112,41 +118,10 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
return ii.intValue(); return ii.intValue();
} }
/** Set AD_Tab_Customization_ID. public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
@param AD_Tab_Customization_ID AD_Tab_Customization_ID */
public void setAD_Tab_Customization_ID (int AD_Tab_Customization_ID)
{ {
if (AD_Tab_Customization_ID < 1) return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
set_ValueNoCheck (COLUMNNAME_AD_Tab_Customization_ID, null); .getPO(getAD_User_ID(), get_TrxName()); }
else
set_ValueNoCheck (COLUMNNAME_AD_Tab_Customization_ID, Integer.valueOf(AD_Tab_Customization_ID));
}
/** Get AD_Tab_Customization_ID.
@return AD_Tab_Customization_ID */
public int getAD_Tab_Customization_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tab_Customization_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_AD_User getAD_User() throws Exception
{
Class<?> clazz = MTable.getClass(I_AD_User.Table_Name);
I_AD_User result = null;
try {
Constructor<?> constructor = null;
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
result = (I_AD_User)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_User_ID()), get_TrxName()});
} catch (Exception e) {
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
throw e;
}
return result;
}
/** Set User/Contact. /** Set User/Contact.
@param AD_User_ID @param AD_User_ID
@ -155,7 +130,8 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
public void setAD_User_ID (int AD_User_ID) public void setAD_User_ID (int AD_User_ID)
{ {
if (AD_User_ID < 1) if (AD_User_ID < 1)
throw new IllegalArgumentException ("AD_User_ID is mandatory."); set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
} }
@ -174,8 +150,6 @@ public class X_AD_Tab_Customization extends PO implements I_AD_Tab_Customization
@param Custom Custom */ @param Custom Custom */
public void setCustom (String Custom) public void setCustom (String Custom)
{ {
if (Custom == null)
throw new IllegalArgumentException ("Custom is mandatory.");
set_Value (COLUMNNAME_Custom, Custom); set_Value (COLUMNNAME_Custom, Custom);
} }