IDEMPIERE-5050 Service startup freeze (#996)

* IDEMPIERE-5050 Service startup freeze

Switched all annotation-based factories to asynchronous class scan.

* Deferred MIssue record creation

Log errors on the database after all model factories are initialized.

* Moved webservice model classes over to its own package

Model factories WS_ModelFactory and AnnotationBasedModelFactory were
overlapping on the org.compiere.model package. This produced class
loading problems since the base bundle has no visibility over the
webservices bundle (e.g.: MWebservice).

* Minor changes
This commit is contained in:
Saulo José Gil 2021-11-24 02:57:35 -03:00 committed by GitHub
parent d37993a992
commit 9e2922c7c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 355 additions and 137 deletions

View File

@ -42,7 +42,10 @@ public abstract class AbstractModelFactory implements IModelFactory {
*/
@Override
public PO getPO(String tableName, int Record_ID, String trxName) {
Class<?> clazz = getClass(tableName);
return getPO(getClass(tableName), tableName, Record_ID, trxName);
}
public static PO getPO(Class<?> clazz, String tableName, int Record_ID, String trxName) {
if (clazz == null)
{
return null;
@ -97,7 +100,10 @@ public abstract class AbstractModelFactory implements IModelFactory {
*/
@Override
public PO getPO(String tableName, ResultSet rs, String trxName) {
Class<?> clazz = getClass(tableName);
return getPO(getClass(tableName), tableName, rs, trxName);
}
public static PO getPO(Class<?> clazz, String tableName, ResultSet rs, String trxName) {
if (clazz == null)
{
return null;

View File

@ -43,15 +43,15 @@ import org.osgi.service.component.annotations.Activate;
import io.github.classgraph.AnnotationInfo;
import io.github.classgraph.AnnotationInfoList;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
*
* @author hengsin
*
*/
public abstract class AnnotationBasedColumnCalloutFactory implements IColumnCalloutFactory {
public abstract class AnnotationBasedColumnCalloutFactory extends AnnotationBasedFactory implements IColumnCalloutFactory {
private final static CLogger s_log = CLogger.getCLogger(AnnotationBasedColumnCalloutFactory.class);
@ -67,6 +67,7 @@ public abstract class AnnotationBasedColumnCalloutFactory implements IColumnCall
@Override
public IColumnCallout[] getColumnCallouts(String tableName, String columnName) {
blockWhileScanning();
List<IColumnCallout> callouts = new ArrayList<IColumnCallout>();
ClassLoader classLoader = bundleContext.getBundle().adapt(BundleWiring.class).getClassLoader();
Map<String, List<String>> columnNameMap = tableNameMap.get(tableName);
@ -148,7 +149,7 @@ public abstract class AnnotationBasedColumnCalloutFactory implements IColumnCall
.disableModuleScanning()
.acceptPackagesNonRecursive(getPackages());
try (ScanResult scanResult = graph.scan()) {
ScanResultProcessor scanResultProcessor = scanResult -> {
List<String> processed = new ArrayList<String>();
for (ClassInfo classInfo : scanResult.getClassesWithAnnotation(Callouts.class)) {
if (classInfo.isAbstract())
@ -169,11 +170,13 @@ public abstract class AnnotationBasedColumnCalloutFactory implements IColumnCall
AnnotationInfo annotationInfo = classInfo.getAnnotationInfo(Callout.class);
processAnnotation(className, annotationInfo);
}
}
signalScanCompletion(true);
long end = System.currentTimeMillis();
if (s_log.isLoggable(Level.INFO))
s_log.info(this.getClass().getSimpleName() + " loaded "+tableNameMap.size() +" classes in "
+((end-start)/1000f) + "s");
s_log.info(() -> this.getClass().getSimpleName() + " loaded "+tableNameMap.size() +" classes in "
+ ((end-start)/1000f) + "s");
};
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
private void processAnnotation(String className, AnnotationInfo annotationInfo) {

View File

@ -61,15 +61,15 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer;
import io.github.classgraph.AnnotationClassRef;
import io.github.classgraph.AnnotationInfo;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
* Scan, discover and register classes with {@link EventTopicDelegate} annotation
* @author hengsin
*
*/
public abstract class AnnotationBasedEventManager {
public abstract class AnnotationBasedEventManager extends AnnotationBasedFactory {
private static final CLogger s_log = CLogger.getCLogger(AnnotationBasedEventManager.class);
@ -150,7 +150,7 @@ public abstract class AnnotationBasedEventManager {
.disableModuleScanning()
.acceptPackagesNonRecursive(getPackages());
try (ScanResult scanResult = graph.scan())
ScanResultProcessor scanResultProcessor = scanResult ->
{
for (ClassInfo classInfo : scanResult.getClassesWithAnnotation(EventTopicDelegate.class)) {
if (classInfo.isAbstract())
@ -171,12 +171,13 @@ public abstract class AnnotationBasedEventManager {
simpleEventDelegate(classLoader, className, filter);
}
}
}
long end = System.currentTimeMillis();
if (s_log.isLoggable(Level.INFO))
s_log.info(this.getClass().getSimpleName() + " loaded "+handlers.size() +" classes in "
+((end-start)/1000f) + "s");
s_log.info(() -> this.getClass().getSimpleName() + " loaded " + handlers.size() + " classes in "
+ ((end-start)/1000f) + "s");
signalScanCompletion(true);
};
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
private void simpleEventDelegate(ClassLoader classLoader, String className, String filter) {

View File

@ -0,0 +1,116 @@
/******************************************************************************
* Product: iDempiere ERP & CRM Smart Business Solution *
* 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. *
*****************************************************************************/
package org.adempiere.base;
import java.time.Duration;
import java.time.Instant;
import java.util.Properties;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicBoolean;
import org.compiere.Adempiere;
import org.compiere.util.CLogger;
import org.compiere.util.Ini;
import io.github.classgraph.ClassGraph.FailureHandler;
/**
* Base class for factories that discover their classes by means of annotation scanning.
* @author Saulo Gil
*/
public abstract class AnnotationBasedFactory {
private boolean scanSuccessful;
private final AtomicBoolean scanCompleted = new AtomicBoolean(false);
/**
* Bogus {@link Future} used only to block the calling thread.
* @see #blockWhileScanning()
*/
private CompletableFuture<Void> threadBlockerFuture = new CompletableFuture<>();
/**
* {@link Executor} to be used for asynchronous class scanning. It never gets shut down
* since there's no way to tell when it wouldn't be needed anymore. However, footprint
* should be minimal when unused.
*/
private static final ExecutorService executorService = Executors.newCachedThreadPool();
private final static CLogger s_log = CLogger.getCLogger(AnnotationBasedFactory.class);
private final FailureHandler defaultScanFailureHandler = throwable -> {
s_log.severe(throwable.getMessage());
signalScanCompletion(false);
};
protected void signalScanCompletion(boolean succeeded) {
scanSuccessful = succeeded;
scanCompleted.set(true);
try {
threadBlockerFuture.complete(null);
} catch (Exception e) { }
}
protected void blockWhileScanning() {
String className = this.getClass().getSimpleName();
if(!scanCompleted.get())
try {
Instant start = Instant.now();
threadBlockerFuture.get();
s_log.fine(() -> String.format("%s waited %d(ms) for class scanning to end"
, className, Duration.between(start, Instant.now()).toMillis()));
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
if(!scanSuccessful)
throw new RuntimeException(className + " - annotation scan unsuccessful");
}
protected ExecutorService getExecutorService() {
return executorService;
}
/**
* Suggests a maximum amount of threads to be allocated to annotation scanning
* for each individual factory.
* @return suggested maximum amount of threads
* @see #executorService
* @see Adempiere#getThreadPoolExecutor()
*/
protected int getMaxThreads() {
int max = Runtime.getRuntime().availableProcessors() * 5;
int defaultMax = max;
Properties properties = Ini.getProperties();
String maxSize = properties.getProperty("MaxThreadPoolSize");
if (maxSize != null) {
try {
max = Integer.parseInt(maxSize) / 5;
} catch (Exception e) {}
}
if (max <= 0)
max = defaultMax;
return max;
}
protected FailureHandler getScanFailureHandler() {
return defaultScanFailureHandler;
}
}

View File

@ -12,10 +12,11 @@
*****************************************************************************/
package org.adempiere.base;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.function.BiConsumer;
import org.compiere.model.PO;
import org.compiere.util.CLogger;
import org.osgi.framework.wiring.BundleWiring;
import org.osgi.service.component.ComponentContext;
@ -24,6 +25,7 @@ import org.osgi.service.component.annotations.Component;
import io.github.classgraph.AnnotationInfo;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
import io.github.classgraph.ClassInfoList;
import io.github.classgraph.ScanResult;
@ -37,7 +39,7 @@ import io.github.classgraph.ScanResult;
* @author Heng Sin
*/
@Component(immediate = true, service = IModelFactory.class, property = {"service.ranking:Integer=0"})
public class AnnotationBasedModelFactory extends AbstractModelFactory implements IModelFactory
public class AnnotationBasedModelFactory extends AnnotationBasedFactory implements IModelFactory
{
/**
* Table name to class cache
@ -106,11 +108,30 @@ public class AnnotationBasedModelFactory extends AbstractModelFactory implements
graph.acceptClasses(acceptClasses);
}
try (ScanResult scanResult = graph.scan())
{
ScanResultProcessor scanResultProcessor = scanResult -> {
try {
processResults(classLoader, scanResult);
} catch (Exception e) {
s_log.severe("exception found while scanning classes" + e.getMessage());
signalScanCompletion(false);
return;
}
long end = System.currentTimeMillis();
s_log.info(() -> this.getClass().getSimpleName() + " loaded " + classCache.size() + " classes in "
+ ((end-start)/1000f) + "s");
signalScanCompletion(true);
};
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
private void processResults(ClassLoader classLoader, ScanResult scanResult ) {
BiConsumer<String,ClassNotFoundException> exceptionHandler = (className, exception) ->
s_log.severe(String.format("exception while loading class %s - %s", className, exception.getMessage()));
for (ClassInfo classInfo : scanResult.getClassesWithAnnotation(Model.class)) {
String className = classInfo.getName();
AnnotationInfo annotationInfo = classInfo.getAnnotationInfo(Model.class);
String tableName = (String) annotationInfo.getParameterValues().getValue("table");
@ -125,24 +146,37 @@ public class AnnotationBasedModelFactory extends AbstractModelFactory implements
}
}
if(existing==null) {
try {
classCache.put(tableName, classLoader.loadClass(className));
} catch (ClassNotFoundException e) {
exceptionHandler.accept(className, e);
}
} else if (className.substring(className.lastIndexOf(".")).startsWith(".M")) {
if(existing.getSimpleName().startsWith("X_")) {
try {
classCache.put(tableName, classLoader.loadClass(className));
} catch (ClassNotFoundException e) {
exceptionHandler.accept(className, e);
}
} else {
Class<?> found = classLoader.loadClass(className);
Class<?> found = null;
try {
found = classLoader.loadClass(className);
} catch (ClassNotFoundException e) {
exceptionHandler.accept(className, e);
}
// replace existing entries only if found class has a lower hierarchy
if(existing.isAssignableFrom(found))
if(found != null && existing.isAssignableFrom(found))
try {
classCache.put(tableName, classLoader.loadClass(className));
} catch (ClassNotFoundException e) {
exceptionHandler.accept(className, e);
}
}
}
}
long end = System.currentTimeMillis();
if (s_log.isLoggable(Level.INFO))
s_log.info(this.getClass().getSimpleName() + " loaded "+classCache.size() +" classes in "
+((end-start)/1000f) + "s");
}
/**
@ -150,6 +184,7 @@ public class AnnotationBasedModelFactory extends AbstractModelFactory implements
*/
@Override
public Class<?> getClass(String tableName) {
blockWhileScanning();
return classCache.get(tableName);
}
@ -161,4 +196,20 @@ public class AnnotationBasedModelFactory extends AbstractModelFactory implements
return getClass().equals(AnnotationBasedModelFactory.class);
}
/**
* {@inheritDoc}
*/
@Override
public PO getPO(String tableName, int Record_ID, String trxName) {
return AbstractModelFactory.getPO(getClass(tableName), tableName, Record_ID, trxName);
}
/**
* {@inheritDoc}
*/
@Override
public PO getPO(String tableName, ResultSet rs, String trxName) {
return AbstractModelFactory.getPO(getClass(tableName), tableName, rs, trxName);
}
}

View File

@ -40,8 +40,8 @@ import org.osgi.service.component.annotations.Activate;
import io.github.classgraph.AnnotationInfo;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
* Scan, discover and register process classes.
@ -51,7 +51,7 @@ import io.github.classgraph.ScanResult;
* @author hengsin
*
*/
public abstract class AnnotationBasedProcessFactory implements IProcessFactory
public abstract class AnnotationBasedProcessFactory extends AnnotationBasedFactory implements IProcessFactory
{
/**
* Name to class cache
@ -88,8 +88,7 @@ public abstract class AnnotationBasedProcessFactory implements IProcessFactory
String[] packages = getPackages();
graph.acceptPackagesNonRecursive(packages);
try (ScanResult scanResult = graph.scan()) {
ScanResultProcessor scanResultProcessor = scanResult -> {
for (ClassInfo classInfo : scanResult.getClassesWithAnnotation(Process.class)) {
if (classInfo.isAbstract())
continue;
@ -103,16 +102,19 @@ public abstract class AnnotationBasedProcessFactory implements IProcessFactory
if (alternateName != null)
classCache.put(alternateName, className);
}
}
long end = System.currentTimeMillis();
if (s_log.isLoggable(Level.INFO))
s_log.info(this.getClass().getSimpleName() + " loaded "+classCache.size() +" classes in "
+((end-start)/1000f) + "s");
s_log.info(() -> this.getClass().getSimpleName() + " loaded " + classCache.size() + " classes in "
+ ((end-start)/1000f) + "s");
signalScanCompletion(true);
};
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
@SuppressWarnings("unchecked")
@Override
public ProcessCall newProcessInstance(String className) {
blockWhileScanning();
ProcessCall pc = null;
String realClassName = classCache.get(className);
if (realClassName != null) {

View File

@ -15,7 +15,6 @@ package org.adempiere.base.annotation;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

View File

@ -225,16 +225,17 @@ public class CLogErrorBuffer extends Handler
&& loggerName.indexOf("CConnection") == -1
)
{
try
{
// create issue on a separate thread in order to eventually
// wait until all model factories are initialized
new Thread(() -> {
try {
MIssue.create(record);
}
catch (Throwable e)
{
//failed to save exception to db, print to console
} catch (Throwable e) {
// failed to save exception to db, print to console
System.err.println(getFormatter().format(record));
setIssueError(false);
}
}).start();
}
else
{

View File

@ -30,6 +30,7 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import org.adempiere.base.AnnotationBasedFactory;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.IFormController;
import org.compiere.util.CLogger;
@ -42,15 +43,15 @@ import org.osgi.service.component.annotations.Activate;
import io.github.classgraph.AnnotationInfo;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ClassGraph.ScanResultProcessor;
import io.github.classgraph.ClassInfo;
import io.github.classgraph.ScanResult;
/**
* Scan, discover and regiser classes with {@link Form} annotation.
* @author hengsin
*
*/
public abstract class AnnotationBasedFormFactory implements IFormFactory {
public abstract class AnnotationBasedFormFactory extends AnnotationBasedFactory implements IFormFactory {
private final Map<String, String> classCache = new HashMap<>();
@ -65,6 +66,7 @@ public abstract class AnnotationBasedFormFactory implements IFormFactory {
@Override
public ADForm newFormInstance(String formName) {
blockWhileScanning();
ADForm form = null;
String realClassName = classCache.get(formName);
if (realClassName != null) {
@ -139,9 +141,7 @@ public abstract class AnnotationBasedFormFactory implements IFormFactory {
.disableModuleScanning()
.acceptPackagesNonRecursive(getPackages());
try (ScanResult scanResult = graph.scan())
{
ScanResultProcessor scanResultProcessor = scanResult -> {
for (ClassInfo classInfo : scanResult.getClassesWithAnnotation(Form.class)) {
if (classInfo.isAbstract())
continue;
@ -153,10 +153,13 @@ public abstract class AnnotationBasedFormFactory implements IFormFactory {
if (!Util.isEmpty(alternateName, true))
classCache.put(alternateName, className);
}
}
long end = System.currentTimeMillis();
if (s_log.isLoggable(Level.INFO))
s_log.info(this.getClass().getSimpleName() + " loaded "+classCache.size() +" classes in "
+((end-start)/1000f) + "s");
s_log.info(() -> this.getClass().getSimpleName() + " loaded " + classCache.size() + " classes in "
+ ((end-start)/1000f) + "s");
signalScanCompletion(true);
};
graph.scanAsync(getExecutorService(), getMaxThreads(), scanResultProcessor, getScanFailureHandler());
}
}

View File

@ -110,7 +110,7 @@ Require-Bundle: org.adempiere.base;bundle-version="0.0.0",
org.codehaus.jettison.jettison;bundle-version="1.4.1"
Bundle-ClassPath: .,
lib/idempiere-xmlbeans.jar
Export-Package: org.compiere.model,
Export-Package: org.idempiere.webservices.model,
org.idempiere.adInterface.x10,
org.idempiere.adInterface.x10.impl,
org.idempiere.adinterface,

View File

@ -4,5 +4,5 @@
<service>
<provide interface="org.adempiere.base.IModelFactory"/>
</service>
<implementation class="org.compiere.model.WS_ModelFactory"/>
<implementation class="org.idempiere.webservices.model.WS_ModelFactory"/>
</scr:component>

View File

@ -55,11 +55,10 @@ import org.compiere.model.MRefTable;
import org.compiere.model.MReference;
import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.MWebServiceType;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.model.X_WS_WebServiceFieldInput;
import org.compiere.model.X_WS_WebService_Para;
import org.idempiere.webservices.model.X_WS_WebServiceFieldInput;
import org.idempiere.webservices.model.X_WS_WebService_Para;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.DisplayType;
@ -93,6 +92,7 @@ import org.idempiere.adInterface.x10.WindowTabDataDocument;
import org.idempiere.webservices.AbstractService;
import org.idempiere.webservices.IWSValidator;
import org.idempiere.webservices.fault.IdempiereServiceFault;
import org.idempiere.webservices.model.MWebServiceType;
/*
* ADEMPIERE/COMPIERE

View File

@ -34,13 +34,11 @@ import org.adempiere.exceptions.AdempiereException;
import org.apache.commons.codec.binary.Base64;
import org.compiere.model.Lookup;
import org.compiere.model.MUser;
import org.compiere.model.MWebService;
import org.compiere.model.MWebServiceType;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.model.Query;
import org.compiere.model.X_WS_WebServiceMethod;
import org.compiere.model.X_WS_WebServiceTypeAccess;
import org.idempiere.webservices.model.X_WS_WebServiceMethod;
import org.idempiere.webservices.model.X_WS_WebServiceTypeAccess;
import org.compiere.util.CCache;
import org.compiere.util.DB;
import org.compiere.util.Env;
@ -57,6 +55,8 @@ import org.idempiere.adInterface.x10.StandardResponseDocument;
import org.idempiere.adinterface.CompiereService;
import org.idempiere.cache.ImmutablePOCache;
import org.idempiere.webservices.fault.IdempiereServiceFault;
import org.idempiere.webservices.model.MWebService;
import org.idempiere.webservices.model.MWebServiceType;

View File

@ -16,10 +16,9 @@ package org.idempiere.webservices;
import java.util.Map;
import java.util.Properties;
import org.compiere.model.MWebServiceType;
import org.compiere.model.PO;
import org.idempiere.webservices.fault.IdempiereServiceFault;
import org.idempiere.webservices.model.MWebServiceType;
import org.idempiere.adInterface.x10.ADLoginRequest;
import org.idempiere.adInterface.x10.DataField;

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -227,5 +227,5 @@ public interface I_WS_WebServiceFieldInput
/** Get Web Service Type */
public int getWS_WebServiceType_ID();
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
}

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -149,5 +149,5 @@ public interface I_WS_WebServiceFieldOutput
/** Get Web Service Type */
public int getWS_WebServiceType_ID();
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
}

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -168,7 +168,7 @@ public interface I_WS_WebServiceMethod
/** Get Web Service */
public int getWS_WebService_ID();
public org.compiere.model.I_WS_WebService getWS_WebService() throws RuntimeException;
public I_WS_WebService getWS_WebService() throws RuntimeException;
/** Column name WS_WebServiceMethod_ID */
public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID";

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -192,7 +192,7 @@ public interface I_WS_WebServiceType
/** Get Web Service */
public int getWS_WebService_ID();
public org.compiere.model.I_WS_WebService getWS_WebService() throws RuntimeException;
public I_WS_WebService getWS_WebService() throws RuntimeException;
/** Column name WS_WebServiceMethod_ID */
public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID";
@ -203,7 +203,7 @@ public interface I_WS_WebServiceType
/** Get Web Service Method */
public int getWS_WebServiceMethod_ID();
public org.compiere.model.I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException;
public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException;
/** Column name WS_WebServiceType_ID */
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -153,5 +153,5 @@ public interface I_WS_WebServiceTypeAccess
/** Get Web Service Type */
public int getWS_WebServiceType_ID();
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
}

View File

@ -14,7 +14,7 @@
* 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;
package org.idempiere.webservices.model;
import java.math.BigDecimal;
import java.sql.Timestamp;
@ -165,5 +165,5 @@ public interface I_WS_WebService_Para
/** Get Web Service Type */
public int getWS_WebServiceType_ID();
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
}

View File

@ -27,7 +27,7 @@
* - GlobalQSS (http://www.globalqss.com) *
***********************************************************************/
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

View File

@ -23,7 +23,7 @@
* - Trek Global Corporation *
* - Heng Sin Low *
**********************************************************************/
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;

View File

@ -27,7 +27,7 @@
* - GlobalQSS (http://www.globalqss.com) *
***********************************************************************/
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;

View File

@ -27,7 +27,7 @@
* - GlobalQSS (http://www.globalqss.com) *
***********************************************************************/
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.ArrayList;
@ -37,6 +37,9 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.compiere.model.MColumn;
import org.compiere.model.MTable;
import org.compiere.model.Query;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;

View File

@ -23,7 +23,7 @@
* - Carlos Ruiz - globalqss *
**********************************************************************/
package org.compiere.model;
package org.idempiere.webservices.model;
import org.adempiere.base.AnnotationBasedModelFactory;
import org.adempiere.base.IModelFactory;

View File

@ -15,10 +15,14 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.util.KeyNamePair;
/** Generated Model for WS_WebService

View File

@ -15,10 +15,15 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.util.KeyNamePair;
/** Generated Model for WS_WebServiceFieldInput
@ -280,9 +285,9 @@ public class X_WS_WebServiceFieldInput extends PO implements I_WS_WebServiceFiel
return (String)get_Value(COLUMNNAME_WS_WebServiceFieldInput_UU);
}
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
{
return (org.compiere.model.I_WS_WebServiceType)MTable.get(getCtx(), org.compiere.model.I_WS_WebServiceType.Table_ID)
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_ID)
.getPO(getWS_WebServiceType_ID(), get_TrxName());
}

View File

@ -15,10 +15,15 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.util.KeyNamePair;
/** Generated Model for WS_WebServiceFieldOutput
@ -143,9 +148,9 @@ public class X_WS_WebServiceFieldOutput extends PO implements I_WS_WebServiceFie
return (String)get_Value(COLUMNNAME_WS_WebServiceFieldOutput_UU);
}
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
{
return (org.compiere.model.I_WS_WebServiceType)MTable.get(getCtx(), org.compiere.model.I_WS_WebServiceType.Table_ID)
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_ID)
.getPO(getWS_WebServiceType_ID(), get_TrxName());
}

View File

@ -15,10 +15,15 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.util.KeyNamePair;
/** Generated Model for WS_WebServiceMethod
@ -141,9 +146,9 @@ public class X_WS_WebServiceMethod extends PO implements I_WS_WebServiceMethod,
return (String)get_Value(COLUMNNAME_Value);
}
public org.compiere.model.I_WS_WebService getWS_WebService() throws RuntimeException
public I_WS_WebService getWS_WebService() throws RuntimeException
{
return (org.compiere.model.I_WS_WebService)MTable.get(getCtx(), org.compiere.model.I_WS_WebService.Table_ID)
return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_ID)
.getPO(getWS_WebService_ID(), get_TrxName());
}

View File

@ -15,10 +15,15 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.util.KeyNamePair;
/** Generated Model for WS_WebServiceType
@ -194,9 +199,9 @@ public class X_WS_WebServiceType extends PO implements I_WS_WebServiceType, I_Pe
return (String)get_Value(COLUMNNAME_Value);
}
public org.compiere.model.I_WS_WebService getWS_WebService() throws RuntimeException
public I_WS_WebService getWS_WebService() throws RuntimeException
{
return (org.compiere.model.I_WS_WebService)MTable.get(getCtx(), org.compiere.model.I_WS_WebService.Table_ID)
return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_ID)
.getPO(getWS_WebService_ID(), get_TrxName());
}
@ -220,9 +225,9 @@ public class X_WS_WebServiceType extends PO implements I_WS_WebServiceType, I_Pe
return ii.intValue();
}
public org.compiere.model.I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException
public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException
{
return (org.compiere.model.I_WS_WebServiceMethod)MTable.get(getCtx(), org.compiere.model.I_WS_WebServiceMethod.Table_ID)
return (I_WS_WebServiceMethod)MTable.get(getCtx(), I_WS_WebServiceMethod.Table_ID)
.getPO(getWS_WebServiceMethod_ID(), get_TrxName());
}

View File

@ -15,11 +15,16 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
/** Generated Model for WS_WebServiceTypeAccess
* @author iDempiere (generated)
* @version Development 9.0 - $Id$ */
@ -140,9 +145,9 @@ public class X_WS_WebServiceTypeAccess extends PO implements I_WS_WebServiceType
return (String)get_Value(COLUMNNAME_WS_WebServiceTypeAccess_UU);
}
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
{
return (org.compiere.model.I_WS_WebServiceType)MTable.get(getCtx(), org.compiere.model.I_WS_WebServiceType.Table_ID)
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_ID)
.getPO(getWS_WebServiceType_ID(), get_TrxName());
}

View File

@ -15,11 +15,16 @@
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;
package org.idempiere.webservices.model;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.model.I_Persistent;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
/** Generated Model for WS_WebService_Para
* @author iDempiere (generated)
* @version Development 9.0 - $Id$ */
@ -158,9 +163,9 @@ public class X_WS_WebService_Para extends PO implements I_WS_WebService_Para, I_
return (String)get_Value(COLUMNNAME_WS_WebService_Para_UU);
}
public org.compiere.model.I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
{
return (org.compiere.model.I_WS_WebServiceType)MTable.get(getCtx(), org.compiere.model.I_WS_WebServiceType.Table_ID)
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_ID)
.getPO(getWS_WebServiceType_ID(), get_TrxName());
}

View File

@ -25,8 +25,8 @@
package org.idempiere.webservices.process;
import org.compiere.model.MWebServiceType;
import org.compiere.process.SvrProcess;
import org.idempiere.webservices.model.MWebServiceType;
/**
* @author Nicolas Micoud - TGI