IDEMPIERE-4963 Performance: avoid loop in X_ class interface getters (#880)

This commit is contained in:
Carlos Ruiz 2021-09-14 15:17:45 +02:00 committed by GitHub
parent ab12354cb4
commit a95983730f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 10 deletions

View File

@ -30,7 +30,9 @@
<stringAttribute key="product" value="org.adempiere.server.server_product"/> <stringAttribute key="product" value="org.adempiere.server.server_product"/>
<stringAttribute key="productFile" value="/org.adempiere.server-feature/server.product"/> <stringAttribute key="productFile" value="/org.adempiere.server-feature/server.product"/>
<setAttribute key="selected_target_bundles"> <setAttribute key="selected_target_bundles">
<setEntry value="bcpkix@default:default"/>
<setEntry value="bcprov@default:default"/> <setEntry value="bcprov@default:default"/>
<setEntry value="bcutil@default:default"/>
<setEntry value="com.github.librepdf.openpdf-fonts-extra@default:default"/> <setEntry value="com.github.librepdf.openpdf-fonts-extra@default:default"/>
<setEntry value="com.github.librepdf.openpdf@default:default"/> <setEntry value="com.github.librepdf.openpdf@default:default"/>
<setEntry value="com.google.gson@default:default"/> <setEntry value="com.google.gson@default:default"/>
@ -61,6 +63,7 @@
<setEntry value="org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default"/> <setEntry value="org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default"/>
<setEntry value="org.apache.httpcomponents.httpclient@default:default"/> <setEntry value="org.apache.httpcomponents.httpclient@default:default"/>
<setEntry value="org.apache.httpcomponents.httpcore@default:default"/> <setEntry value="org.apache.httpcomponents.httpcore@default:default"/>
<setEntry value="org.apache.poi.ooxml-schemas@default:default"/>
<setEntry value="org.apache.servicemix.bundles.cglib.source"/> <setEntry value="org.apache.servicemix.bundles.cglib.source"/>
<setEntry value="org.cryptacular@default:default"/> <setEntry value="org.cryptacular@default:default"/>
<setEntry value="org.eclipse.ant.core@default:default"/> <setEntry value="org.eclipse.ant.core@default:default"/>
@ -74,6 +77,7 @@
<setEntry value="org.eclipse.equinox.preferences@default:default"/> <setEntry value="org.eclipse.equinox.preferences@default:default"/>
<setEntry value="org.eclipse.equinox.registry@default:default"/> <setEntry value="org.eclipse.equinox.registry@default:default"/>
<setEntry value="org.eclipse.jetty.servlet-api@default:default"/> <setEntry value="org.eclipse.jetty.servlet-api@default:default"/>
<setEntry value="org.eclipse.jetty.util@default:default"/>
<setEntry value="org.eclipse.osgi.compatibility.state@default:false"/> <setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
<setEntry value="org.eclipse.osgi.services@default:default"/> <setEntry value="org.eclipse.osgi.services@default:default"/>
<setEntry value="org.eclipse.osgi.util@default:default"/> <setEntry value="org.eclipse.osgi.util@default:default"/>
@ -91,7 +95,6 @@
<setEntry value="wrapped.io.opencensus.opencensus-api@default:default"/> <setEntry value="wrapped.io.opencensus.opencensus-api@default:default"/>
<setEntry value="wrapped.io.opencensus.opencensus-contrib-http-util@default:default"/> <setEntry value="wrapped.io.opencensus.opencensus-contrib-http-util@default:default"/>
<setEntry value="wrapped.org.apache.activemq.activemq-kahadb-store@default:default"/> <setEntry value="wrapped.org.apache.activemq.activemq-kahadb-store@default:default"/>
<setEntry value="org.apache.poi.ooxml-schemas@default:default"/>
<setEntry value="wrapped.org.apache.poi.poi-ooxml@default:default"/> <setEntry value="wrapped.org.apache.poi.poi-ooxml@default:default"/>
<setEntry value="wrapped.org.apache.poi.poi@default:default"/> <setEntry value="wrapped.org.apache.poi.poi@default:default"/>
<setEntry value="wrapped.org.apache.xmlbeans.xmlbeans@default:default"/> <setEntry value="wrapped.org.apache.xmlbeans.xmlbeans@default:default"/>
@ -101,6 +104,7 @@
</setAttribute> </setAttribute>
<setAttribute key="selected_workspace_bundles"> <setAttribute key="selected_workspace_bundles">
<setEntry value="org.adempiere.base@default:default"/> <setEntry value="org.adempiere.base@default:default"/>
<setEntry value="org.adempiere.install@default:default"/>
<setEntry value="org.apache.ecs@default:default"/> <setEntry value="org.apache.ecs@default:default"/>
<setEntry value="org.compiere.db.oracle.provider@default:default"/> <setEntry value="org.compiere.db.oracle.provider@default:default"/>
<setEntry value="org.compiere.db.postgresql.provider@default:default"/> <setEntry value="org.compiere.db.postgresql.provider@default:default"/>

View File

@ -411,9 +411,9 @@ public class ModelClassGenerator
{ {
sb.append(NL) sb.append(NL)
.append("\tpublic ").append(referenceClassName).append(" get").append(fieldName).append("() throws RuntimeException").append(NL) .append("\tpublic ").append(referenceClassName).append(" get").append(fieldName).append("() throws RuntimeException").append(NL)
.append(" {").append(NL) .append("\t{").append(NL)
.append("\t\treturn (").append(referenceClassName).append(")MTable.get(getCtx(), ").append(referenceClassName).append(".Table_Name)").append(NL) .append("\t\treturn (").append(referenceClassName).append(")MTable.get(getCtx(), ").append(referenceClassName).append(".Table_ID)").append(NL)
.append("\t\t\t.getPO(get").append(columnName).append("(), get_TrxName());") .append("\t\t\t.getPO(get").append(columnName).append("(), get_TrxName());").append(NL)
/**/ /**/
.append("\t}").append(NL) .append("\t}").append(NL)
; ;

View File

@ -22,7 +22,7 @@ import org.compiere.util.KeyNamePair;
/** Generated Interface for AD_PInstance_Para /** Generated Interface for AD_PInstance_Para
* @author iDempiere (generated) * @author iDempiere (generated)
* @version Release 8.2 * @version Development 9.0
*/ */
public interface I_AD_PInstance_Para public interface I_AD_PInstance_Para
{ {

View File

@ -26,14 +26,14 @@ import org.compiere.util.KeyNamePair;
/** Generated Model for AD_PInstance_Para /** Generated Model for AD_PInstance_Para
* @author iDempiere (generated) * @author iDempiere (generated)
* @version Release 8.2 - $Id$ */ * @version Development 9.0 - $Id$ */
public class X_AD_PInstance_Para extends PO implements I_AD_PInstance_Para, I_Persistent public class X_AD_PInstance_Para extends PO implements I_AD_PInstance_Para, I_Persistent
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = 20201220L; private static final long serialVersionUID = 20210914L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_PInstance_Para (Properties ctx, int AD_PInstance_Para_ID, String trxName) public X_AD_PInstance_Para (Properties ctx, int AD_PInstance_Para_ID, String trxName)
@ -76,8 +76,9 @@ public class X_AD_PInstance_Para extends PO implements I_AD_PInstance_Para, I_Pe
public org.compiere.model.I_AD_PInstance getAD_PInstance() throws RuntimeException public org.compiere.model.I_AD_PInstance getAD_PInstance() throws RuntimeException
{ {
return (org.compiere.model.I_AD_PInstance)MTable.get(getCtx(), org.compiere.model.I_AD_PInstance.Table_Name) return (org.compiere.model.I_AD_PInstance)MTable.get(getCtx(), org.compiere.model.I_AD_PInstance.Table_ID)
.getPO(getAD_PInstance_ID(), get_TrxName()); } .getPO(getAD_PInstance_ID(), get_TrxName());
}
/** Set Process Instance. /** Set Process Instance.
@param AD_PInstance_ID @param AD_PInstance_ID