hg merge fb4181fa99c2

This commit is contained in:
Carlos Ruiz 2012-11-21 10:04:09 -05:00
commit 3e0fb3b5a2
167 changed files with 1474 additions and 302 deletions

36
lib/artifacts.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<repository name='file:/home/hengsin/workspace/idempiere-trekglobal/lib/ - artifacts' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
<properties size='2'>
<property name='p2.timestamp' value='1353402021279'/>
<property name='p2.compressed' value='false'/>
</properties>
<mappings size='3'>
<rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
<rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
<rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
</mappings>
<artifacts size='3'>
<artifact classifier='osgi.bundle' id='org.apache.poi' version='3.7.0'>
<properties size='3'>
<property name='artifact.size' value='1651480'/>
<property name='download.size' value='1651480'/>
<property name='download.md5' value='982062b95e5299e63d25de5144f5b136'/>
</properties>
</artifact>
<artifact classifier='osgi.bundle' id='com.springsource.javax.mail' version='1.4.5'>
<properties size='3'>
<property name='artifact.size' value='570498'/>
<property name='download.size' value='570498'/>
<property name='download.md5' value='a867863806ddab9b8cecd115fe56159c'/>
</properties>
</artifact>
<artifact classifier='osgi.bundle' id='com.springsource.javax.activation' version='1.1.1'>
<properties size='3'>
<property name='artifact.size' value='12359'/>
<property name='download.size' value='12359'/>
<property name='download.md5' value='4ffafe635551f1f1096dffc01a7e0c50'/>
</properties>
</artifact>
</artifacts>
</repository>

167
lib/content.xml Normal file
View File

@ -0,0 +1,167 @@
<?xml version='1.0' encoding='UTF-8'?>
<?metadataRepository version='1.1.0'?>
<repository name='file:/home/hengsin/workspace/idempiere-trekglobal/lib/ - metadata' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
<properties size='2'>
<property name='p2.timestamp' value='1353402021281'/>
<property name='p2.compressed' value='false'/>
</properties>
<units size='3'>
<unit id='com.springsource.javax.mail' version='1.4.5' singleton='false'>
<update id='com.springsource.javax.mail' range='[0.0.0,1.4.5)' severity='0'/>
<properties size='4'>
<property name='org.eclipse.equinox.p2.name' value='Java Mail'/>
<property name='org.eclipse.equinox.p2.description' value='JavaMail API (compat)'/>
<property name='org.eclipse.equinox.p2.provider' value='SpringSource'/>
<property name='org.eclipse.equinox.p2.doc.url' value='http://www.oracle.com'/>
</properties>
<provides size='18'>
<provided namespace='org.eclipse.equinox.p2.iu' name='com.springsource.javax.mail' version='1.4.5'/>
<provided namespace='osgi.bundle' name='com.springsource.javax.mail' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.auth' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.handlers' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.iap' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.imap' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.imap.protocol' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.pop3' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.smtp' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.util' version='1.4.5'/>
<provided namespace='java.package' name='com.sun.mail.util.logging' version='1.4.5'/>
<provided namespace='java.package' name='javax.mail' version='1.4.5'/>
<provided namespace='java.package' name='javax.mail.event' version='1.4.5'/>
<provided namespace='java.package' name='javax.mail.internet' version='1.4.5'/>
<provided namespace='java.package' name='javax.mail.search' version='1.4.5'/>
<provided namespace='java.package' name='javax.mail.util' version='1.4.5'/>
<provided namespace='java.package' name='javax.activation' version='1.1.1'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
</provides>
<requires size='9'>
<required namespace='java.package' name='javax.crypto' range='0.0.0'/>
<required namespace='java.package' name='javax.crypto.spec' range='0.0.0'/>
<required namespace='java.package' name='javax.net' range='0.0.0'/>
<required namespace='java.package' name='javax.net.ssl' range='0.0.0'/>
<required namespace='java.package' name='javax.security.auth.callback' range='0.0.0'/>
<required namespace='java.package' name='javax.security.auth.x500' range='0.0.0'/>
<required namespace='java.package' name='javax.security.sasl' range='0.0.0'/>
<required namespace='java.package' name='javax.xml.transform' range='0.0.0'/>
<required namespace='java.package' name='javax.xml.transform.stream' range='0.0.0'/>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='com.springsource.javax.mail' version='1.4.5'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: com.springsource.javax.mail&#xA;Bundle-Version: 1.4.5&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
<unit id='com.springsource.javax.activation' version='1.1.1' singleton='false'>
<update id='com.springsource.javax.activation' range='[0.0.0,1.1.1)' severity='0'/>
<properties size='2'>
<property name='org.eclipse.equinox.p2.name' value='Java Activation API'/>
<property name='org.eclipse.equinox.p2.provider' value='SpringSource'/>
</properties>
<provides size='3'>
<provided namespace='org.eclipse.equinox.p2.iu' name='com.springsource.javax.activation' version='1.1.1'/>
<provided namespace='osgi.bundle' name='com.springsource.javax.activation' version='1.1.1'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
</provides>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='com.springsource.javax.activation' version='1.1.1'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: com.springsource.javax.activation&#xA;Bundle-Version: 1.1.1&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
<unit id='org.apache.poi' version='3.7.0' singleton='false'>
<update id='org.apache.poi' range='[0.0.0,3.7.0)' severity='0'/>
<properties size='2'>
<property name='org.eclipse.equinox.p2.name' value='Apache POI'/>
<property name='org.eclipse.equinox.p2.provider' value='Apache'/>
</properties>
<provides size='50'>
<provided namespace='org.eclipse.equinox.p2.iu' name='org.apache.poi' version='3.7.0'/>
<provided namespace='osgi.bundle' name='org.apache.poi' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.common.usermodel' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ddf' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.dev' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hpsf' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hpsf.extractor' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hpsf.wellknown' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.dev' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.eventmodel' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.eventusermodel' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.eventusermodel.dummyrecord' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.extractor' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.model' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.aggregates' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.cf' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.chart' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.common' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.constant' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.cont' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.crypto' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula.atp' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula.eval' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula.function' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula.functions' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.formula.udf' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.record.pivottable' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.usermodel' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.hssf.util' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.common' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.crypt' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.dev' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.eventfilesystem' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.filesystem' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.property' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.poifs.storage' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.extractor' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.format' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.formula' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.formula.eval' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.formula.eval.forked' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.usermodel' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.ss.util' version='3.7.0'/>
<provided namespace='java.package' name='org.apache.poi.util' version='3.7.0'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
</provides>
<requires size='11'>
<required namespace='java.package' name='javax.imageio' range='0.0.0'/>
<required namespace='java.package' name='javax.xml.transform' range='0.0.0'/>
<required namespace='java.package' name='javax.crypto.spec' range='0.0.0'/>
<required namespace='java.package' name='javax.crypto' range='0.0.0'/>
<required namespace='java.package' name='org.apache.commons.logging' range='0.0.0'/>
<required namespace='java.package' name='javax.imageio.metadata' range='0.0.0'/>
<required namespace='java.package' name='javax.imageio.stream' range='0.0.0'/>
<required namespace='java.package' name='javax.swing' range='0.0.0'/>
<required namespace='java.package' name='javax.xml.parsers' range='0.0.0'/>
<required namespace='java.package' name='javax.xml.transform.stream' range='0.0.0'/>
<required namespace='java.package' name='org.w3c.dom' range='1.3.4'/>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='org.apache.poi' version='3.7.0'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: org.apache.poi&#xA;Bundle-Version: 3.7.0&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
</units>
</repository>

2
lib/generatep2.txt Normal file
View File

@ -0,0 +1,2 @@
eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/<workspace root>/lib -artifactRepository file:/<workspace root>/lib -source lib -publishArtifact

View File

@ -16,6 +16,7 @@
*****************************************************************************/
package org.compiere.process;
import org.compiere.util.CacheMgt;
import org.compiere.util.Env;
/**
@ -43,6 +44,7 @@ public class CacheReset extends SvrProcess implements ClientProcess
{
log.info("");
Env.reset(false); // not final
CacheMgt.get().reset();
return "Cache Reset";
} // doIt

View File

@ -23,6 +23,7 @@ import org.compiere.model.MSysConfig;
import org.compiere.model.MTable;
import org.compiere.model.MUser;
import org.compiere.model.SystemIDs;
import org.compiere.util.CacheMgt;
/**
* Hash existing passwords
@ -54,7 +55,7 @@ public class HashPasswords extends SvrProcess
MSysConfig conf = new MSysConfig(getCtx(), SystemIDs.SYSCONFIG_USER_HASH_PASSWORD, null);
conf.setValue("Y");
conf.saveEx();
MSysConfig.resetCache();
CacheMgt.get().reset(MSysConfig.Table_Name);
int count = 0;
try {

View File

@ -184,6 +184,7 @@ Export-Package: bsh,
org.compiere.util,
org.compiere.wf,
org.eevolution.model,
org.idempiere.distributed,
org.jfree,
org.jfree.base,
org.jfree.base.config,

View File

@ -81,6 +81,15 @@ public class Core {
* @return ProcessCall instance or null if serviceId not found
*/
public static ProcessCall getProcess(String serviceId) {
ProcessCall process = null;
List<IProcessFactory> factories = Service.locator().list(IProcessFactory.class).getServices();
if (factories != null && !factories.isEmpty()) {
for(IProcessFactory factory : factories) {
process = factory.newProcessInstance(serviceId);
if (process != null)
return process;
}
}
return Service.locator().locate(ProcessCall.class, "org.adempiere.base.Process", serviceId, null).getService();
}

View File

@ -37,7 +37,7 @@ import org.compiere.util.Util;
*/
public class DefaultModelFactory implements IModelFactory {
private static CCache<String,Class<?>> s_classCache = new CCache<String,Class<?>>("PO_Class", 20);
private static CCache<String,Class<?>> s_classCache = new CCache<String,Class<?>>(null, "PO_Class", 20, false);
private final static CLogger s_log = CLogger.getCLogger(DefaultModelFactory.class);
/** Packages for Model Classes */

View File

@ -0,0 +1,32 @@
/******************************************************************************
* Copyright (C) 2012 Heng Sin Low *
* Copyright (C) 2012 Trek Global *
* 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 org.compiere.process.ProcessCall;
/**
*
* @author hengsin
*
*/
public interface IProcessFactory {
/**
* Create new process instance
* @param className
* @return new process instance
*/
public ProcessCall newProcessInstance(String className);
}

View File

@ -686,7 +686,7 @@ public final class Adempiere
m_listenerList.add(ServerStateChangeListener.class, l);
}
private static void fireServerStateChanged(ServerStateChangeEvent e)
private static synchronized void fireServerStateChanged(ServerStateChangeEvent e)
{
ServerStateChangeListener[] listeners = m_listenerList.getListeners(ServerStateChangeListener.class);
for (int i = 0; i < listeners.length; i++)

View File

@ -136,9 +136,9 @@ public class MAcctSchema extends X_C_AcctSchema
} // getClientAcctSchema
/** Cache of Client AcctSchema Arrays **/
private static CCache<Integer,MAcctSchema[]> s_schema = new CCache<Integer,MAcctSchema[]>("AD_ClientInfo", 3); // 3 clients
private static CCache<Integer,MAcctSchema[]> s_schema = new CCache<Integer,MAcctSchema[]>(I_AD_ClientInfo.Table_Name, 3); // 3 clients
/** Cache of AcctSchemas **/
private static CCache<Integer,MAcctSchema> s_cache = new CCache<Integer,MAcctSchema>("C_AcctSchema", 3); // 3 accounting schemas
private static CCache<Integer,MAcctSchema> s_cache = new CCache<Integer,MAcctSchema>(Table_Name, 3); // 3 accounting schemas
/**************************************************************************

View File

@ -172,7 +172,7 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element
private static CLogger s_log = CLogger.getCLogger (MAcctSchemaElement.class);
/** Cache */
private static CCache<Integer,MAcctSchemaElement[]> s_cache = new CCache<Integer,MAcctSchemaElement[]>("C_AcctSchema_Element", 10);
private static CCache<Integer,MAcctSchemaElement[]> s_cache = new CCache<Integer,MAcctSchemaElement[]>(Table_Name, 10);
/*************************************************************************

View File

@ -82,7 +82,7 @@ public class MAlertProcessor extends X_AD_AlertProcessor
} // MAlertProcessor
/** Cache: AD_AlertProcessor -> Alerts array */
private static CCache<Integer, MAlert[]> s_cacheAlerts = new CCache<Integer, MAlert[]>("AD_Alert_ForProcessor", 10);
private static CCache<Integer, MAlert[]> s_cacheAlerts = new CCache<Integer, MAlert[]>(I_AD_Alert.Table_Name, "AD_Alert_ForProcessor", 10, false);
/**
* Get Server ID

View File

@ -43,7 +43,7 @@ public class MAssetAcct extends X_A_Asset_Acct
/** Static Cache: A_Asset_Acct_ID -> MAssetAcct */
private static CCache<Integer,MAssetAcct> s_cache = new CCache<Integer,MAssetAcct>(Table_Name, 5);
/** Static Cache: Asset,PostingType,DateAcct -> MAssetAcct */
private static CCache<MultiKey,MAssetAcct> s_cacheAsset = new CCache<MultiKey,MAssetAcct>(Table_Name+"_Asset", 5);
private static CCache<MultiKey,MAssetAcct> s_cacheAsset = new CCache<MultiKey,MAssetAcct>(Table_Name, Table_Name+"_Asset", 5, false);
/**
* Get Asset Accounting (from cache)

View File

@ -37,7 +37,7 @@ public class MAssetClass extends X_A_Asset_Class
} // MAssetClass
/** */
private static CCache<Integer, MAssetClass> s_cache = new CCache<Integer, MAssetClass>("A_Asset_Class", 20);
private static CCache<Integer, MAssetClass> s_cache = new CCache<Integer, MAssetClass>(Table_Name, 20);
/** Get Asset Class from cache
* @param ctx context

View File

@ -64,7 +64,7 @@ public class MAttributeSet extends X_M_AttributeSet
/** Cache */
private static CCache<Integer,MAttributeSet> s_cache
= new CCache<Integer,MAttributeSet> ("M_AttributeSet", 20);
= new CCache<Integer,MAttributeSet> (Table_Name, 20);
/**

View File

@ -81,7 +81,7 @@ public class MBOM extends X_M_BOM
/** Cache */
private static CCache<Integer,MBOM> s_cache
= new CCache<Integer,MBOM>("M_BOM", 20);
= new CCache<Integer,MBOM>(Table_Name, 20);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MBOM.class);

View File

@ -158,10 +158,10 @@ public class MBPGroup extends X_C_BP_Group
/** Cache */
private static CCache<Integer,MBPGroup> s_cache
= new CCache<Integer,MBPGroup>("BP_Group", 10);
= new CCache<Integer,MBPGroup>(Table_Name, 10);
/** Default Cache */
private static CCache<Integer,MBPGroup> s_cacheDefault
= new CCache<Integer,MBPGroup>("BP_Group", 5);
= new CCache<Integer,MBPGroup>(Table_Name, MBPGroup.class.getName()+".Default", 5);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MBPGroup.class);

View File

@ -55,7 +55,7 @@ public class MBank extends X_C_Bank
/** Cache */
private static CCache<Integer,MBank> s_cache =
new CCache<Integer,MBank> ("C_Bank", 3);
new CCache<Integer,MBank> (Table_Name, 3);
/**************************************************************************

View File

@ -56,7 +56,7 @@ public class MBankAccount extends X_C_BankAccount
/** Cache */
private static CCache<Integer,MBankAccount> s_cache
= new CCache<Integer,MBankAccount>("C_BankAccount", 5);
= new CCache<Integer,MBankAccount>(Table_Name, 5);
/**
* Bank Account Model

View File

@ -80,7 +80,7 @@ public class MCalendar extends X_C_Calendar
/** Cache */
private static CCache<Integer,MCalendar> s_cache
= new CCache<Integer,MCalendar>("C_Calendar", 20);
= new CCache<Integer,MCalendar>(Table_Name, 20);
/*************************************************************************

View File

@ -102,7 +102,7 @@ public class MCashBook extends X_C_CashBook
/** Cache */
private static CCache<Integer,MCashBook> s_cache
= new CCache<Integer,MCashBook>("", 20);
= new CCache<Integer,MCashBook>(Table_Name, 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MCashBook.class);

View File

@ -99,7 +99,7 @@ public class MCharge extends X_C_Charge
/** Cache */
private static CCache<Integer, MCharge> s_cache
= new CCache<Integer, MCharge> ("C_Charge", 10);
= new CCache<Integer, MCharge> (Table_Name, 10);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MCharge.class);

View File

@ -54,7 +54,7 @@ public class MChatType extends X_CM_ChatType
/** Cache */
private static CCache<Integer, MChatType> s_cache
= new CCache<Integer, MChatType> ("CM_ChatType", 20);
= new CCache<Integer, MChatType> (Table_Name, 20);
/**
* Standard Constructor

View File

@ -59,7 +59,7 @@ public final class MCity extends X_C_City
} // get
/** City Cache */
private static CCache<Integer,MCity> s_Cities = new CCache<Integer,MCity>("C_City", 20);;
private static CCache<Integer,MCity> s_Cities = new CCache<Integer,MCity>(Table_Name, 20);;
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MCity.class);

View File

@ -107,7 +107,7 @@ public class MClient extends X_AD_Client
@SuppressWarnings("unused")
private static CLogger s_log = CLogger.getCLogger (MClient.class);
/** Cache */
private static CCache<Integer,MClient> s_cache = new CCache<Integer,MClient>("AD_Client", 3);
private static CCache<Integer,MClient> s_cache = new CCache<Integer,MClient>(Table_Name, 3);
/**************************************************************************
@ -633,7 +633,8 @@ public class MClient extends X_AD_Client
}
catch (Exception ex)
{
log.severe(getName() + " - " + ex.getLocalizedMessage());
ex.printStackTrace();
log.log(Level.SEVERE, getName() + " - " + ex.getLocalizedMessage(), ex);
return false;
}
} // sendEMail

View File

@ -111,7 +111,7 @@ public class MClientInfo extends X_AD_ClientInfo
} // get
/** Cache */
private static CCache<Integer,MClientInfo> s_cache = new CCache<Integer,MClientInfo>("AD_ClientInfo", 2);
private static CCache<Integer,MClientInfo> s_cache = new CCache<Integer,MClientInfo>(Table_Name, 2);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MClientInfo.class);

View File

@ -122,7 +122,7 @@ public class MClientShare extends X_AD_ClientShare
/** Shared Info */
private static CCache<String,Boolean> s_shares
= new CCache<String,Boolean>("AD_ClientShare", 10, 120); // 2h
= new CCache<String,Boolean>(Table_Name, 10, 120); // 2h
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MClientShare.class);

View File

@ -100,7 +100,7 @@ public class MColorSchema extends X_PA_ColorSchema
/** Cache */
private static CCache<Integer, MColorSchema> s_cache
= new CCache<Integer, MColorSchema> ("PA_ColorSchema", 20);
= new CCache<Integer, MColorSchema> (Table_Name, 20);
/**
* Standard Constructor

View File

@ -77,7 +77,7 @@ public class MColumn extends X_AD_Column
} // getColumnName
/** Cache */
private static CCache<Integer,MColumn> s_cache = new CCache<Integer,MColumn>("AD_Column", 20);
private static CCache<Integer,MColumn> s_cache = new CCache<Integer,MColumn>(Table_Name, 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MColumn.class);

View File

@ -71,7 +71,7 @@ public class MConversionType extends X_C_ConversionType
} // getDefault
/** Cache Client-ID */
private static CCache<Integer,Integer> s_cache = new CCache<Integer,Integer>("C_ConversionType", 4);
private static CCache<Integer,Integer> s_cache = new CCache<Integer,Integer>(Table_Name, 4);
/**************************************************************************
* Standard Constructor

View File

@ -210,7 +210,7 @@ public class MCostElement extends X_M_CostElement
}
/** Cache */
private static CCache<Integer,MCostElement> s_cache = new CCache<Integer,MCostElement>("M_CostElement", 20);
private static CCache<Integer,MCostElement> s_cache = new CCache<Integer,MCostElement>(Table_Name, 20);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MCostElement.class);

View File

@ -112,7 +112,7 @@ public final class MCountry extends X_C_Country
MLanguage lang = MLanguage.get(ctx, client.getAD_Language());
MCountry usa = null;
//
s_countries = new CCache<String,MCountry>("C_Country", 250);
s_countries = new CCache<String,MCountry>(Table_Name, 250);
String sql = "SELECT * FROM C_Country WHERE IsActive='Y'";
try
{

View File

@ -87,9 +87,9 @@ public class MCurrency extends X_C_Currency
/** Store System Currencies **/
private static CCache<Integer,MCurrency> s_currencies = new CCache<Integer,MCurrency>("C_Currency", 50);
private static CCache<Integer,MCurrency> s_currencies = new CCache<Integer,MCurrency>(Table_Name, 50);
/** Cache System Currencies by using ISO code as key **/
private static CCache<String,MCurrency> s_currenciesISO = new CCache<String,MCurrency>("C_CurrencyISO", 50);
private static CCache<String,MCurrency> s_currenciesISO = new CCache<String,MCurrency>(Table_Name, "C_CurrencyISO", 50);
/**
* Get Currency using ISO code

View File

@ -43,7 +43,7 @@ public class MDepreciation extends X_A_Depreciation
s_cache = new CCache<Integer,MDepreciation>(Table_Name, 5);
/** Cache for type */
private static CCache<String,MDepreciation>
s_cache_forType = new CCache<String,MDepreciation>(Table_Name+"_DepreciationType", 5);
s_cache_forType = new CCache<String,MDepreciation>(Table_Name, Table_Name+"_DepreciationType", 5);
/** Static logger */
private static Logger s_log = CLogger.getCLogger(MDepreciation.class);
/** The accuracy of calculation on depreciation */

View File

@ -37,7 +37,7 @@ public class MDepreciationConvention extends X_A_Depreciation_Convention
} // MDepreciationConvention
/** Cache */
private static CCache<Integer,MDepreciationConvention> s_cache = new CCache<Integer,MDepreciationConvention>("A_Depreciation_Convention", 5);
private static CCache<Integer,MDepreciationConvention> s_cache = new CCache<Integer,MDepreciationConvention>(Table_Name, 5);
//~ /** Static logger */
//~ private static Logger s_log = CLogger.getCLogger(MDepreciationConvention.class);

View File

@ -40,7 +40,7 @@ public class MDepreciationMethod extends X_A_Depreciation_Method
s_cache = new CCache<Integer,MDepreciationMethod>(Table_Name, 5);
/** Cache for type */
private static CCache<String,MDepreciationMethod>
s_cache_forType = new CCache<String,MDepreciationMethod>(Table_Name+"_DepreciationType", 5);
s_cache_forType = new CCache<String,MDepreciationMethod>(Table_Name, Table_Name+"_DepreciationType", 5);
/**
*

View File

@ -336,7 +336,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile
}
/** Static cache: Asset/PostingType -> Workfile */
private static CCache<MultiKey, MDepreciationWorkfile>
s_cacheAsset = new CCache<MultiKey, MDepreciationWorkfile>(Table_Name+"_Asset", 10);
s_cacheAsset = new CCache<MultiKey, MDepreciationWorkfile>(Table_Name, Table_Name+"_Asset", 10);
/** Returns the date of the last action
*/

View File

@ -62,7 +62,7 @@ public class MDiscountSchema extends X_M_DiscountSchema
/** Cache */
private static CCache<Integer,MDiscountSchema> s_cache
= new CCache<Integer,MDiscountSchema>("M_DiscountSchema", 20);
= new CCache<Integer,MDiscountSchema>(Table_Name, 20);
/**************************************************************************

View File

@ -172,7 +172,7 @@ public class MDistribution extends X_GL_Distribution
private static CLogger s_log = CLogger.getCLogger (MDistribution.class);
/** Distributions by Account */
private static CCache<Integer,MDistribution[]> s_accounts
= new CCache<Integer,MDistribution[]>("GL_Distribution", 100);
= new CCache<Integer,MDistribution[]>(Table_Name, 100);
/**************************************************************************

View File

@ -200,9 +200,9 @@ public class MDocTypeCounter extends X_C_DocTypeCounter
/** Object Cache */
private static CCache<Integer,MDocTypeCounter> s_cache = new CCache<Integer,MDocTypeCounter>("C_DocTypeCounter", 20);
private static CCache<Integer,MDocTypeCounter> s_cache = new CCache<Integer,MDocTypeCounter>(Table_Name, 20);
/** Counter Relationship Cache */
private static CCache<Integer,MDocTypeCounter> s_counter = new CCache<Integer,MDocTypeCounter>("C_DocTypeCounter", 20);
private static CCache<Integer,MDocTypeCounter> s_counter = new CCache<Integer,MDocTypeCounter>(Table_Name, "C_DocTypeCounter_Relation", 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MDocTypeCounter.class);

View File

@ -133,7 +133,7 @@ public class MGLCategory extends X_GL_Category
private static CLogger s_log = CLogger.getCLogger (MGLCategory.class);
/** Cache */
private static CCache<Integer, MGLCategory> s_cache
= new CCache<Integer, MGLCategory> ("GL_Category", 5);
= new CCache<Integer, MGLCategory> (Table_Name, 5);
/**************************************************************************

View File

@ -53,7 +53,7 @@ public class MGroup extends X_R_Group
} // get
/** Cache */
private static CCache<Integer,MGroup> s_cache = new CCache<Integer,MGroup>("R_Group", 20);
private static CCache<Integer,MGroup> s_cache = new CCache<Integer,MGroup>(Table_Name, 20);
/**************************************************************************

View File

@ -54,7 +54,7 @@ public class MHierarchy extends X_PA_Hierarchy
/** Cache */
private static CCache<Integer, MHierarchy> s_cache
= new CCache<Integer, MHierarchy> ("PA_Hierarchy_ID", 20);
= new CCache<Integer, MHierarchy> (Table_Name, 20);
/**
* Default Constructor

View File

@ -71,7 +71,7 @@ public class MImage extends X_AD_Image
} // get
/** Cache */
private static CCache<Integer,MImage> s_cache = new CCache<Integer,MImage>("AD_Image", 20);
private static CCache<Integer,MImage> s_cache = new CCache<Integer,MImage>(Table_Name, 20);
/**
* Constructor

View File

@ -107,7 +107,7 @@ public class MInterestArea extends X_R_InterestArea
/** Cache */
private static CCache<Integer,MInterestArea> s_cache =
new CCache<Integer,MInterestArea>("R_InterestArea", 5);
new CCache<Integer,MInterestArea>(Table_Name, 5);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MInterestArea.class);

View File

@ -70,7 +70,7 @@ public class MInventory extends X_M_Inventory implements DocAction
} // get
/** Cache */
private static CCache<Integer,MInventory> s_cache = new CCache<Integer,MInventory>("M_Inventory", 5, 5);
private static CCache<Integer,MInventory> s_cache = new CCache<Integer,MInventory>(Table_Name, 5, 5);
/**

View File

@ -250,7 +250,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
} // get
/** Cache */
private static CCache<Integer,MInvoice> s_cache = new CCache<Integer,MInvoice>("C_Invoice", 20, 2); // 2 minutes
private static CCache<Integer,MInvoice> s_cache = new CCache<Integer,MInvoice>(Table_Name, 20, 2); // 2 minutes
/**************************************************************************

View File

@ -59,7 +59,7 @@ public class MInvoiceSchedule extends X_C_InvoiceSchedule
} // get
/** Cache */
private static CCache<Integer,MInvoiceSchedule> s_cache = new CCache<Integer,MInvoiceSchedule>("C_InvoiceSchedule", 5);
private static CCache<Integer,MInvoiceSchedule> s_cache = new CCache<Integer,MInvoiceSchedule>(Table_Name, 5);
/**************************************************************************

View File

@ -120,7 +120,7 @@ public class MLocation extends X_C_Location implements Comparator<Object>
} // getBPLocation
/** Cache */
private static CCache<Integer,MLocation> s_cache = new CCache<Integer,MLocation>("C_Location", 100, 30);
private static CCache<Integer,MLocation> s_cache = new CCache<Integer,MLocation>(Table_Name, 100, 30);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MLocation.class);

View File

@ -174,7 +174,7 @@ public class MLocator extends X_M_Locator
public static MLocator get (Properties ctx, int M_Locator_ID)
{
if (s_cache == null)
s_cache = new CCache<Integer,MLocator>("M_Locator", 20);
s_cache = new CCache<Integer,MLocator>(Table_Name, 20);
Integer key = new Integer (M_Locator_ID);
MLocator retValue = (MLocator) s_cache.get (key);
if (retValue != null)

View File

@ -36,7 +36,7 @@ public class MLookupCache
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MLookupCache.class);
/** Static Lookup data with MLookupInfo -> HashMap */
private static CCache<String,HashMap> s_loadedLookups = new CCache<String,HashMap>("MLookupCache", 50);
private static CCache<String,HashMap> s_loadedLookups = new CCache<String,HashMap>(null, "MLookupCache", 50, false);
/**
* MLookup Loader starts loading - ignore for now

View File

@ -55,7 +55,7 @@ public class MLookupFactory
/** Logging */
private static CLogger s_log = CLogger.getCLogger(MLookupFactory.class);
/** Table Reference Cache */
private static CCache<String,MLookupInfo> s_cacheRefTable = new CCache<String,MLookupInfo>("AD_Ref_Table", 30, 60); // 1h
private static CCache<String,MLookupInfo> s_cacheRefTable = new CCache<String,MLookupInfo>(I_AD_Ref_Table.Table_Name, 30, 60); // 1h
/**

View File

@ -74,7 +74,7 @@ public class MMailText extends X_R_MailText
/** Translated Text 3 */
private String m_MailText3 = null;
/** Translation Cache */
private static CCache<String,MMailTextTrl> s_cacheTrl = new CCache<String,MMailTextTrl> ("", 20);
private static CCache<String,MMailTextTrl> s_cacheTrl = new CCache<String,MMailTextTrl> (Table_Name, 20);
/**
* Get parsed/translated Mail Text

View File

@ -427,7 +427,7 @@ public class MMatchInv extends X_M_MatchInv
*/
public boolean reverse(Timestamp reversalDate)
{
if (this.isPosted())
if (this.isPosted() && this.getReversal_ID() == 0)
{
MMatchInv reversal = new MMatchInv (getCtx(), 0, get_TrxName());
PO.copyValues(this, reversal);
@ -439,8 +439,10 @@ public class MMatchInv extends X_M_MatchInv
reversal.set_ValueNoCheck ("DocumentNo", null);
reversal.setPosted (false);
reversal.setReversal_ID(getM_MatchInv_ID());
this.setDescription("(" + this.getDocumentNo() + "<-)");
if (reversal.save() && this.save())
reversal.saveEx();
this.setDescription("(" + reversal.getDocumentNo() + "<-)");
this.setReversal_ID(reversal.getM_MatchInv_ID());
this.saveEx();
return true;
}
return false;

View File

@ -1175,7 +1175,7 @@ public class MMatchPO extends X_M_MatchPO
public boolean reverse(Timestamp reversalDate)
{
if (this.isPosted())
if (this.isPosted() && this.getReversal_ID() == 0)
{
MMatchPO reversal = new MMatchPO (getCtx(), 0, get_TrxName());
reversal.setC_InvoiceLine_ID(getC_InvoiceLine_ID());
@ -1189,8 +1189,10 @@ public class MMatchPO extends X_M_MatchPO
reversal.set_ValueNoCheck ("DocumentNo", null);
reversal.setPosted (false);
reversal.setReversal_ID(getM_MatchPO_ID());
this.setDescription("(" + this.getDocumentNo() + "<-)");
if (reversal.save() && this.save())
reversal.saveEx();
this.setDescription("(" + reversal.getDocumentNo() + "<-)");
this.setReversal_ID(reversal.getM_MatchPO_ID());
this.saveEx();
return true;
}
return false;

View File

@ -76,7 +76,7 @@ public class MMeasure extends X_PA_Measure
/** Cache */
private static CCache<Integer, MMeasure> s_cache
= new CCache<Integer, MMeasure> ("PA_Measure", 10);
= new CCache<Integer, MMeasure> (Table_Name, 10);
/**
* Standard Constructor

View File

@ -60,7 +60,7 @@ public class MMeasureCalc extends X_PA_MeasureCalc
/** Cache */
private static CCache<Integer, MMeasureCalc> s_cache
= new CCache<Integer, MMeasureCalc> ("PA_MeasureCalc", 10);
= new CCache<Integer, MMeasureCalc> (Table_Name, 10);
/**************************************************************************
* Standard Constructor

View File

@ -118,7 +118,7 @@ public class MMessage extends X_AD_Message
} // getAD_Message_ID
/** Cache */
static private CCache<String,MMessage> s_cache = new CCache<String,MMessage>("AD_Message", 100);
static private CCache<String,MMessage> s_cache = new CCache<String,MMessage>(Table_Name, 100);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MMessage.class);

View File

@ -72,7 +72,7 @@ public class MPOS extends X_C_POS
} // get
/** Cache */
private static CCache<Integer,MPOS> s_cache = new CCache<Integer,MPOS>("C_POS", 20);
private static CCache<Integer,MPOS> s_cache = new CCache<Integer,MPOS>(Table_Name, 20);
/**
* Standard Constructor

View File

@ -57,7 +57,7 @@ public class MPOSKeyLayout extends X_C_POSKeyLayout
} // get
/** Cache */
private static CCache<Integer,MPOSKeyLayout> s_cache = new CCache<Integer,MPOSKeyLayout>("C_POSKeyLayout", 3);
private static CCache<Integer,MPOSKeyLayout> s_cache = new CCache<Integer,MPOSKeyLayout>(Table_Name, 3);
/**
* Standard Constructor

View File

@ -36,7 +36,7 @@ public class MPOSTerminal extends X_U_POSTerminal
*/
private static final long serialVersionUID = 6972567212871993024L;
/** Cache */
static private CCache<Integer,MPOSTerminal> s_cache = new CCache<Integer,MPOSTerminal>(X_U_POSTerminal.Table_Name, 10, 60);
static private CCache<Integer,MPOSTerminal> s_cache = new CCache<Integer,MPOSTerminal>(Table_Name, 10, 60);
/**
* @param ctx Context

View File

@ -321,7 +321,7 @@ public class MPeriod extends X_C_Period
} // getFirstInYear
/** Cache */
private static CCache<Integer,MPeriod> s_cache = new CCache<Integer,MPeriod>("C_Period", 10);
private static CCache<Integer,MPeriod> s_cache = new CCache<Integer,MPeriod>(Table_Name, 10);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MPeriod.class);

View File

@ -59,7 +59,7 @@ public class MProcessPara extends X_AD_Process_Para
/** Cache */
private static CCache<Integer, MProcessPara> s_cache
= new CCache<Integer, MProcessPara> ("AD_Process_Para", 20);
= new CCache<Integer, MProcessPara> (Table_Name, 20);
/**************************************************************************

View File

@ -117,9 +117,9 @@ public class MProductCategory extends X_M_Product_Category
} // isCategory
/** Categopry Cache */
private static CCache<Integer,MProductCategory> s_cache = new CCache<Integer,MProductCategory>("M_Product_Category", 20);
private static CCache<Integer,MProductCategory> s_cache = new CCache<Integer,MProductCategory>(Table_Name, 20);
/** Product Cache */
private static CCache<Integer,Integer> s_products = new CCache<Integer,Integer>("M_Product", 100);
private static CCache<Integer,Integer> s_products = new CCache<Integer,Integer>(I_M_Product.Table_Name, Table_Name + ".M_Product", 100);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MProductCategory.class);

View File

@ -61,7 +61,7 @@ public class MProjectType extends X_C_ProjectType
/** Cache */
private static CCache<Integer, MProjectType> s_cache
= new CCache<Integer, MProjectType> ("C_ProjectType", 20);
= new CCache<Integer, MProjectType> (Table_Name, 20);
/**************************************************************************

View File

@ -39,7 +39,7 @@ public class MRecentItem extends X_AD_RecentItem
private static final long serialVersionUID = 8337619537799431984L;
/** Recent Item Cache */
private static CCache<Integer,MRecentItem> s_cache = new CCache<Integer,MRecentItem>("AD_RecentItem", 10);
private static CCache<Integer,MRecentItem> s_cache = new CCache<Integer,MRecentItem>(Table_Name, 10);
/** Logger */
private static CLogger s_log = CLogger.getCLogger(MRecentItem.class);

View File

@ -55,7 +55,7 @@ public final class MRegion extends X_C_Region
*/
private static void loadAllRegions (Properties ctx)
{
s_regions = new CCache<String,MRegion>("C_Region", 100);
s_regions = new CCache<String,MRegion>(Table_Name, 100);
String sql = "SELECT * FROM C_Region WHERE IsActive='Y'";
try
{

View File

@ -113,7 +113,7 @@ public class MRegistrationAttribute extends X_A_RegistrationAttribute
private static CLogger s_log = CLogger.getCLogger(MRegistrationAttribute.class);
/** Cache */
private static CCache<Integer,MRegistrationAttribute> s_cache
= new CCache<Integer,MRegistrationAttribute>("A_RegistrationAttribute", 20);
= new CCache<Integer,MRegistrationAttribute>(Table_Name, 20);
/**************************************************************************
* Standard Constructor

View File

@ -54,7 +54,7 @@ public class MRequestCategory extends X_R_Category
/** Cache */
private static CCache<Integer,MRequestCategory> s_cache
= new CCache<Integer,MRequestCategory>("R_Category", 20);
= new CCache<Integer,MRequestCategory>(Table_Name, 20);
/**************************************************************************

View File

@ -65,7 +65,7 @@ public class MRequestType extends X_R_RequestType
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MRequestType.class);
/** Cache */
static private CCache<Integer,MRequestType> s_cache = new CCache<Integer,MRequestType>("R_RequestType", 10);
static private CCache<Integer,MRequestType> s_cache = new CCache<Integer,MRequestType>(Table_Name, 10);
/**
* Get Default Request Type

View File

@ -54,7 +54,7 @@ public class MResolution extends X_R_Resolution
} // get
/** Cache */
private static CCache<Integer,MResolution> s_cache = new CCache<Integer,MResolution>("R_Resolution", 10);
private static CCache<Integer,MResolution> s_cache = new CCache<Integer,MResolution>(Table_Name, 10);

View File

@ -61,7 +61,7 @@ public class MRfQ extends X_C_RfQ
} // get
/** Cache */
private static CCache<Integer,MRfQ> s_cache = new CCache<Integer,MRfQ>("C_RfQ", 10);
private static CCache<Integer,MRfQ> s_cache = new CCache<Integer,MRfQ>(Table_Name, 10);
/**

View File

@ -59,7 +59,7 @@ public class MRfQLine extends X_C_RfQLine
} // get
/** Cache */
private static CCache<Integer,MRfQLine> s_cache = new CCache<Integer,MRfQLine>("C_RfQLine", 20);
private static CCache<Integer,MRfQLine> s_cache = new CCache<Integer,MRfQLine>(Table_Name, 20);
/**
* Standard Constructor

View File

@ -59,7 +59,7 @@ public class MRfQLineQty extends X_C_RfQLineQty
} // get
/** Cache */
private static CCache<Integer,MRfQLineQty> s_cache = new CCache<Integer,MRfQLineQty>("C_RfQLineQty", 20);
private static CCache<Integer,MRfQLineQty> s_cache = new CCache<Integer,MRfQLineQty>(Table_Name, 20);
/**
* Standard Constructor

View File

@ -235,7 +235,7 @@ public final class MRole extends X_AD_Role
} // getOf
/** Role/User Cache */
private static CCache<String,MRole> s_roles = new CCache<String,MRole>("AD_Role", 5);
private static CCache<String,MRole> s_roles = new CCache<String,MRole>(Table_Name, 5);
/** Log */
private static CLogger s_log = CLogger.getCLogger(MRole.class);

View File

@ -123,7 +123,7 @@ public class MRule extends X_AD_Rule
} // getModelValidatorLoginRules
/** Cache */
private static CCache<Integer,MRule> s_cache = new CCache<Integer,MRule>("AD_Rule", 20);
private static CCache<Integer,MRule> s_cache = new CCache<Integer,MRule>(Table_Name, 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MRule.class);

View File

@ -61,7 +61,7 @@ public class MSLACriteria extends X_PA_SLA_Criteria
} // get
/** Cache */
private static CCache<Integer,MSLACriteria> s_cache = new CCache<Integer,MSLACriteria>("PA_SLA_Criteria", 20);
private static CCache<Integer,MSLACriteria> s_cache = new CCache<Integer,MSLACriteria>(Table_Name, 20);
/**

View File

@ -55,7 +55,7 @@ public class MSalesRegion extends X_C_SalesRegion
} // get
/** Cache */
private static CCache<Integer,MSalesRegion> s_cache = new CCache<Integer,MSalesRegion>("C_SalesRegion", 10);
private static CCache<Integer,MSalesRegion> s_cache = new CCache<Integer,MSalesRegion>(Table_Name, 10);
/**************************************************************************

View File

@ -151,7 +151,7 @@ public class MSchedule extends X_AD_Schedule
}
/** Cache */
private static CCache<Integer, MSchedule> s_cache = new CCache<Integer, MSchedule> ("AD_Schedule", 10);
private static CCache<Integer, MSchedule> s_cache = new CCache<Integer, MSchedule> (Table_Name, 10);
public boolean chekIPFormat(String ipOnly)
{

View File

@ -108,8 +108,8 @@ public class MSession extends X_AD_Session
/** Sessions */
private static CCache<Integer, MSession> s_sessions = Ini.isClient()
? new CCache<Integer, MSession>("AD_Session_ID", 1, 0) // one client session
: new CCache<Integer, MSession>("AD_Session_ID", 30, 0); // no time-out
? new CCache<Integer, MSession>(null, "AD_Session_ID", 1, 0, false) // one client session
: new CCache<Integer, MSession>(null, "AD_Session_ID", 30, 0, false); // no time-out
/**************************************************************************

View File

@ -157,10 +157,10 @@ public class MStatus extends X_R_Status
private static CLogger s_log = CLogger.getCLogger(MStatus.class);
/** Cache */
static private CCache<Integer,MStatus> s_cache
= new CCache<Integer,MStatus> ("R_Status", 10);
= new CCache<Integer,MStatus> (Table_Name, 10);
/** Default Cache (Key=Client) */
static private CCache<Integer,MStatus> s_cacheDefault
= new CCache<Integer,MStatus>("R_Status", 10);
= new CCache<Integer,MStatus>(Table_Name, "R_Status_Default", 10);
/**************************************************************************

View File

@ -124,7 +124,7 @@ public class MStatusCategory extends X_R_StatusCategory
/** Cache */
private static CCache<Integer, MStatusCategory> s_cache
= new CCache<Integer, MStatusCategory> ("R_StatusCategory", 20);
= new CCache<Integer, MStatusCategory> (Table_Name, 20);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MStatusCategory.class);

View File

@ -219,7 +219,7 @@ public class MStore extends X_W_Store
/** Cache */
private static CCache<Integer,MStore> s_cache
= new CCache<Integer,MStore>("W_Store", 2);
= new CCache<Integer,MStore>(Table_Name, 2);
/** Logger */
private static CLogger s_log = CLogger.getCLogger (MStore.class);

View File

@ -135,17 +135,8 @@ public class MSysConfig extends X_AD_SysConfig
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MSysConfig.class);
/** Cache */
private static CCache<String, String> s_cache = new CCache<String, String>(Table_Name, 40, 0);
/** resetCache */
private static boolean resetCache = false;
private static CCache<String, String> s_cache = new CCache<String, String>(Table_Name, 40, 0, true);
/** Reset Cache
*
*/
public static void resetCache()
{
s_cache.reset();
}
/**
* Get system configuration property of type string
* @param Name

View File

@ -149,7 +149,7 @@ public class MTable extends X_AD_Table
/** Cache */
private static CCache<Integer,MTable> s_cache = new CCache<Integer,MTable>("AD_Table", 20);
private static CCache<Integer,MTable> s_cache = new CCache<Integer,MTable>(Table_Name, 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MTable.class);

View File

@ -108,7 +108,7 @@ public class MTableScriptValidator extends X_AD_Table_ScriptValidator
= new CCache<Integer,MTableScriptValidator>(Table_Name, 20);
/** Cache / Table Event */
private static CCache<MultiKey,List<MTableScriptValidator>> s_cacheTableEvent
= new CCache<MultiKey,List<MTableScriptValidator>>(Table_Name+"_TableEvent", 20);
= new CCache<MultiKey,List<MTableScriptValidator>>(null, Table_Name+"_TableEvent", 20, false);
/**************************************************************************
* Standard Constructor

View File

@ -45,7 +45,7 @@ public class MTax extends X_C_Tax
/** Cache */
private static CCache<Integer,MTax> s_cache = new CCache<Integer,MTax>(Table_Name, 5);
/** Cache of Client */
private static CCache<Integer,MTax[]> s_cacheAll = new CCache<Integer,MTax[]>(Table_Name, 5);
private static CCache<Integer,MTax[]> s_cacheAll = new CCache<Integer,MTax[]>(Table_Name, Table_Name+"_Of_Client", 5);
/** 100 */
private static BigDecimal ONEHUNDRED = new BigDecimal(100);

View File

@ -219,7 +219,7 @@ public class MTree_Base extends X_AD_Tree
/** Cache */
private static CCache<Integer,MTree_Base> s_cache = new CCache<Integer,MTree_Base>("AD_Tree", 10);
private static CCache<Integer,MTree_Base> s_cache = new CCache<Integer,MTree_Base>(Table_Name, 10);
/**************************************************************************

View File

@ -169,7 +169,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
*/
private static void createRates (Properties ctx)
{
s_conversions = new CCache<Point,BigDecimal>("C_UOMConversion", 20);
s_conversions = new CCache<Point,BigDecimal>(Table_Name, 20);
//
String sql = MRole.getDefault(ctx, false).addAccessSQL (
"SELECT C_UOM_ID, C_UOM_To_ID, MultiplyRate, DivideRate "
@ -625,7 +625,7 @@ public class MUOMConversion extends X_C_UOM_Conversion
private static CCache<Point,BigDecimal> s_conversions = null;
/** Product Conversion Map */
private static final CCache<Integer,MUOMConversion[]> s_conversionProduct
= new CCache<Integer,MUOMConversion[]>("C_UOMConversion", 20);
= new CCache<Integer,MUOMConversion[]>(Table_Name, Table_Name+"_Of_Product", 20);
/**************************************************************************

View File

@ -275,7 +275,7 @@ public class MUser extends X_AD_User
} // isSalesRep
/** Cache */
static private CCache<Integer,MUser> s_cache = new CCache<Integer,MUser>("AD_User", 30, 60);
static private CCache<Integer,MUser> s_cache = new CCache<Integer,MUser>(Table_Name, 30, 60);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MUser.class);

View File

@ -186,7 +186,7 @@ public class MUserDefWin extends X_AD_UserDef_Win
}
/** Cache of selected MUserDefWin entries **/
private static CCache<Integer,MUserDefWin> s_cache = new CCache<Integer,MUserDefWin>("AD_UserDef_Win", 3); // 3 weights
private static CCache<Integer,MUserDefWin> s_cache = new CCache<Integer,MUserDefWin>(Table_Name, 3); // 3 weights
@Override
protected boolean beforeSave(boolean newRecord) {

View File

@ -107,7 +107,7 @@ public class MWarehouse extends X_M_Warehouse
} // get
/** Cache */
private static CCache<Integer,MWarehouse> s_cache = new CCache<Integer,MWarehouse>("M_Warehouse", 50 );
private static CCache<Integer,MWarehouse> s_cache = new CCache<Integer,MWarehouse>(Table_Name, 50 );
/**
* Standard Constructor
* @param ctx context

View File

@ -55,7 +55,7 @@ public class MWebProject extends X_CM_WebProject
/** Cache */
private static CCache<Integer, MWebProject> s_cache
= new CCache<Integer, MWebProject> ("CM_WebProject", 5);
= new CCache<Integer, MWebProject> (Table_Name, 5);
/**************************************************************************

View File

@ -634,7 +634,7 @@ public class ModelValidationEngine
/**************************************************************************
* Add Date Import Validation Listener
* @param tableName table name
* @param data.tableName table name
* @param listener listener
*/
public void addImportValidate (String importTableName, ImportValidator listener)

View File

@ -69,7 +69,7 @@ public final class NaturalAccountMap<K,V> extends CCache<K,V>
*/
public NaturalAccountMap(Properties ctx, String trxName)
{
super("NaturalAccountMap", 100);
super(null, "NaturalAccountMap", 100, false);
m_ctx = ctx;
m_trxName = trxName;
} // NaturalAccountMap

View File

@ -16,6 +16,8 @@
*****************************************************************************/
package org.compiere.model;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.io.StringWriter;
import java.math.BigDecimal;
@ -4314,5 +4316,10 @@ public abstract class PO
return clone;
}
private void readObject(ObjectInputStream ois)
throws ClassNotFoundException, IOException {
// default deserialization
ois.defaultReadObject();
log = CLogger.getCLogger(getClass());
}
} // PO

View File

@ -86,7 +86,7 @@ public class POInfo implements Serializable
} // getPOInfo
/** Cache of POInfo */
private static CCache<Integer,POInfo> s_cache = new CCache<Integer,POInfo>("POInfo", 200);
private static CCache<Integer,POInfo> s_cache = new CCache<Integer,POInfo>(I_AD_Table.Table_Name, "POInfo", 200);
/**************************************************************************
* Create Persistent Info

View File

@ -105,7 +105,7 @@ public class TranslationTable
private static Integer s_activeLanguages = null;
/** Cache */
private static CCache<String,TranslationTable> s_cache = new CCache<String,TranslationTable>("TranslationTable", 20);
private static CCache<String,TranslationTable> s_cache = new CCache<String,TranslationTable>(null, "TranslationTable", 20, true);
/**

View File

@ -77,7 +77,7 @@ public class MPrintColor extends X_AD_PrintColor
/*************************************************************************/
/** Cached Colors */
static private CCache<Integer,MPrintColor> s_colors = new CCache<Integer,MPrintColor>("AD_PrintColor", 20);
static private CCache<Integer,MPrintColor> s_colors = new CCache<Integer,MPrintColor>(Table_Name, 20);
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger (MPrintColor.class);

Some files were not shown because too many files have changed in this diff Show More