You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/12/23 10:27:00 UTC
svn commit: r1553086 [9/10] - in /ofbiz/branches/jackrabbit20120501: ./
applications/accounting/config/
applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/
applications/commonext/config/ applications/content/config/
applications/cont...
Modified: ofbiz/branches/jackrabbit20120501/framework/common/config/CommonUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/common/config/CommonUiLabels.xml?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/common/config/CommonUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/common/config/CommonUiLabels.xml Mon Dec 23 09:26:58 2013
@@ -1320,7 +1320,6 @@
<value xml:lang="fr">De</value>
<value xml:lang="hi-IN">à¤à¥ दà¥à¤µà¤¾à¤°à¤¾</value>
<value xml:lang="it">Da</value>
- <value xml:lang="ja">By</value>
<value xml:lang="nl">bij</value>
<value xml:lang="pt">Por</value>
<value xml:lang="ro">De la </value>
@@ -2131,14 +2130,9 @@
<value xml:lang="zh-TW">è¤å¶</value>
</property>
<property key="CommonCopyright">
- <value xml:lang="cs">Copyright</value>
<value xml:lang="en">Copyright</value>
- <value xml:lang="es">Copyright</value>
<value xml:lang="fr">Droit d'auteur</value>
<value xml:lang="hi-IN">à¤à¥à¤ªà¥à¤°à¤¾à¤à¤</value>
- <value xml:lang="it">Copyright</value>
- <value xml:lang="ja">Copyright</value>
- <value xml:lang="pt-BR">Copyright</value>
<value xml:lang="ru">ÐвÑоÑÑкое пÑаво</value>
<value xml:lang="vi">Bản quyá»n</value>
<value xml:lang="zh">çæææ</value>
@@ -5054,16 +5048,11 @@
</property>
<property key="CommonId">
<value xml:lang="ar">دÙÙÙ</value>
- <value xml:lang="cs">ID</value>
- <value xml:lang="de">ID</value>
<value xml:lang="en">ID</value>
<value xml:lang="es">Código</value>
<value xml:lang="fr">Réf.</value>
<value xml:lang="hi-IN">à¤à¥à¤°à¤®à¤¾à¤à¤</value>
<value xml:lang="it">Codice</value>
- <value xml:lang="ja">ID</value>
- <value xml:lang="nl">ID</value>
- <value xml:lang="pt">ID</value>
<value xml:lang="ro">Id</value>
<value xml:lang="ru">Ðод</value>
<value xml:lang="th">รหัส</value>
@@ -5137,18 +5126,13 @@
<property key="CommonIds">
<value xml:lang="ar">Ø¯ÙØ§Ø¦Ù</value>
<value xml:lang="cs">Identifikátory</value>
- <value xml:lang="de">IDs</value>
<value xml:lang="en">IDs</value>
<value xml:lang="es">Códigos</value>
<value xml:lang="fr">Références</value>
<value xml:lang="hi-IN">à¤à¥à¤°à¤®à¤¾à¤à¤</value>
<value xml:lang="it">Codici</value>
- <value xml:lang="ja">ID</value>
- <value xml:lang="nl">IDs</value>
- <value xml:lang="pt">IDs</value>
<value xml:lang="pt-BR">Identificações(IDs)</value>
<value xml:lang="ro">Id Coduri</value>
- <value xml:lang="ru">IDs</value>
<value xml:lang="th">รหัส</value>
<value xml:lang="vi">Äá»nh danh</value>
<value xml:lang="zh">æ è¯</value>
@@ -5181,7 +5165,6 @@
<value xml:lang="fr">En</value>
<value xml:lang="hi-IN">à¤
à¤à¤¦à¤°</value>
<value xml:lang="it">In</value>
- <value xml:lang="ja"></value>
<value xml:lang="nl">In</value>
<value xml:lang="pt">Em</value>
<value xml:lang="ro">In</value>
@@ -5201,7 +5184,6 @@
<value xml:lang="fr">Dans le</value>
<value xml:lang="hi-IN">à¤à¤¸ मà¥à¤</value>
<value xml:lang="it">Nel</value>
- <value xml:lang="ja"></value>
<value xml:lang="nl">In De</value>
<value xml:lang="pt">Em</value>
<value xml:lang="pt-BR">No</value>
@@ -6622,19 +6604,8 @@
</property>
<property key="CommonN">
<value xml:lang="ar">Ù</value>
- <value xml:lang="cs">N</value>
- <value xml:lang="de">N</value>
<value xml:lang="en">N</value>
- <value xml:lang="es">N</value>
- <value xml:lang="fr">N</value>
<value xml:lang="hi-IN">ना</value>
- <value xml:lang="it">N</value>
- <value xml:lang="ja">N</value>
- <value xml:lang="nl">N</value>
- <value xml:lang="pt">N</value>
- <value xml:lang="ro">N</value>
- <value xml:lang="ru">Ð</value>
- <value xml:lang="th">N</value>
<value xml:lang="vi">Không</value>
<value xml:lang="zh">å¦</value>
<value xml:lang="zh-CN">N</value>
@@ -8048,17 +8019,8 @@
<value xml:lang="zh-TW">æ¯ä»</value>
</property>
<property key="CommonPdf">
- <value xml:lang="cs">PDF</value>
- <value xml:lang="de">PDF</value>
- <value xml:lang="en">Pdf</value>
- <value xml:lang="es">Pdf</value>
- <value xml:lang="fr">PDF</value>
+ <value xml:lang="en">PDF</value>
<value xml:lang="hi-IN">पà¥à¤¡à¥à¤à¤«à¤¼(PDF)</value>
- <value xml:lang="it">Pdf</value>
- <value xml:lang="ja">PDF</value>
- <value xml:lang="pt-BR">Pdf</value>
- <value xml:lang="ru">PDF </value>
- <value xml:lang="zh">PDF</value>
</property>
<property key="CommonPerform">
<value xml:lang="ar">Ø¥ØØ±Ø§Ø¡</value>
@@ -8366,15 +8328,10 @@
<value xml:lang="zh-TW">é賬æ¥</value>
</property>
<property key="CommonPoweredBy">
- <value xml:lang="cs">Powered by</value>
- <value xml:lang="de">Powered by</value>
<value xml:lang="en">Powered by</value>
- <value xml:lang="es">Powered by</value>
<value xml:lang="fr">Fonctionne grâce à </value>
<value xml:lang="hi-IN">दà¥à¤µà¤¾à¤°à¤¾ सà¤à¤à¤¾à¤²à¤¿à¤¤</value>
<value xml:lang="it">Realizzato con</value>
- <value xml:lang="ja">Powered by</value>
- <value xml:lang="pt-BR">Powered by</value>
<value xml:lang="ru">Сделанно</value>
<value xml:lang="vi">Tà i trợ bá»i</value>
<value xml:lang="zh">è¿è¡å¹³å°</value>
@@ -9109,7 +9066,6 @@
<value xml:lang="fr">Version officiellement distribuée</value>
<value xml:lang="hi-IN">रिलà¥à¤ सà¤à¤¸à¥à¤à¤°à¤£à¤</value>
<value xml:lang="it">Versione release</value>
- <value xml:lang="ja">Release Version</value>
<value xml:lang="pt">1.0.0-Preview</value>
<value xml:lang="pt-BR">Versão de Lançamento</value>
<value xml:lang="ru">ÐеÑÑÐ¸Ñ Ñелиза</value>
@@ -10231,7 +10187,6 @@
<value xml:lang="fr">Depuis</value>
<value xml:lang="hi-IN">à¤à¥à¤¯à¥à¤à¤à¤¿</value>
<value xml:lang="it">Fino a</value>
- <value xml:lang="ja">Since</value>
<value xml:lang="nl">Sinds</value>
<value xml:lang="pt">Desde</value>
<value xml:lang="ro">Pana la A</value>
@@ -10788,18 +10743,11 @@
</property>
<property key="CommonTelephoneAbbr">
<value xml:lang="ar">ÙØ§ØªÙ</value>
- <value xml:lang="cs">Tel</value>
- <value xml:lang="de">Tel</value>
<value xml:lang="en">Tel</value>
<value xml:lang="es">Tel.</value>
<value xml:lang="fr">Tél.</value>
<value xml:lang="hi-IN">à¤à¥à¤²à¥à¤«à¥à¤¨</value>
- <value xml:lang="it">Tel</value>
- <value xml:lang="ja">Tel</value>
- <value xml:lang="nl">Tel</value>
- <value xml:lang="pt">Tel</value>
<value xml:lang="pt-BR">Tel.</value>
- <value xml:lang="ro">Tel</value>
<value xml:lang="ru">Тел</value>
<value xml:lang="th">หมายà¹à¸¥à¸à¹à¸à¸£à¸¨à¸±à¸à¸à¹</value>
<value xml:lang="vi">Äiá»n thoại</value>
@@ -10894,14 +10842,12 @@
<value xml:lang="zh-TW">ææ¬</value>
</property>
<property key="CommonThe">
- <value xml:lang="cs"></value>
<value xml:lang="de">Der</value>
<value xml:lang="en">The</value>
<value xml:lang="es">El/La</value>
<value xml:lang="fr">Le</value>
<value xml:lang="hi-IN">à¤à¤¸</value>
<value xml:lang="it">Il</value>
- <value xml:lang="ja"></value>
<value xml:lang="nl">de</value>
<value xml:lang="pt-BR">O</value>
<value xml:lang="ru">ÐÑо</value>
@@ -12424,9 +12370,7 @@
<value xml:lang="fr">O</value>
<value xml:lang="hi-IN">हाà¤</value>
<value xml:lang="it">S</value>
- <value xml:lang="ja">Y</value>
<value xml:lang="nl">J</value>
- <value xml:lang="pt">Y</value>
<value xml:lang="pt-BR">S</value>
<value xml:lang="pt-PT">S</value>
<value xml:lang="ro">D</value>
@@ -12706,18 +12650,8 @@
<value xml:lang="zh-TW">æ°å»ºè³ææºé¡å</value>
</property>
<property key="Ebay">
- <value xml:lang="cs">eBay</value>
- <value xml:lang="de">eBay</value>
<value xml:lang="en">eBay</value>
- <value xml:lang="es">eBay</value>
- <value xml:lang="fr">eBay</value>
- <value xml:lang="hi-IN">eBay</value>
- <value xml:lang="it">eBay</value>
- <value xml:lang="ja">eBay</value>
- <value xml:lang="pt-BR">eBay</value>
- <value xml:lang="ru">eBay</value>
<value xml:lang="th">à¸à¸µà¹à¸à¸¢à¹</value>
- <value xml:lang="zh">eBay</value>
<value xml:lang="zh-TW">é»åç£</value>
</property>
<property key="Example">
@@ -13797,19 +13731,12 @@
<value xml:lang="zh-TW">æ´æ°</value>
</property>
<property key="Google Base">
- <value xml:lang="cs">Google Base</value>
- <value xml:lang="de">Google Base</value>
<value xml:lang="en">Google Base</value>
- <value xml:lang="es">Google Base</value>
- <value xml:lang="fr">Google Base</value>
<value xml:lang="hi-IN">à¤à¥à¤à¤² बà¥à¤¸</value>
<value xml:lang="it">Googleã·ã§ããã³ã°</value>
- <value xml:lang="ja">Google Base</value>
<value xml:lang="pt-BR">Base do Google</value>
<value xml:lang="ru">ÐÑгл база</value>
- <value xml:lang="th">Google Base</value>
<value xml:lang="vi">Trên ná»n tảng Google</value>
- <value xml:lang="zh">Google Base</value>
</property>
<property key="HR">
<value xml:lang="cs">PersonálnÃ</value>
@@ -13944,19 +13871,9 @@
<value xml:lang="zh-TW">OFBizç«é»</value>
</property>
<property key="Oagis">
- <value xml:lang="cs">Oagis</value>
- <value xml:lang="de">Oagis</value>
<value xml:lang="en">Oagis</value>
- <value xml:lang="es">Oagis</value>
- <value xml:lang="fr">Oagis</value>
- <value xml:lang="hi-IN">Oagis</value>
- <value xml:lang="it">Oagis</value>
- <value xml:lang="ja">Oagis</value>
- <value xml:lang="pt-BR">Oagis</value>
- <value xml:lang="ru">Oagis</value>
<value xml:lang="th">à¸à¸²à¸£à¸£à¸§à¸¡à¸ าษาà¸à¸²à¸à¸à¸¸à¸£à¸à¸´à¸</value>
<value xml:lang="vi">Giao thức XML Oagis</value>
- <value xml:lang="zh">Oagis</value>
</property>
<property key="Order">
<value xml:lang="ar">Ø·ÙØ¨ÙØ©</value>
@@ -14361,15 +14278,12 @@
<value xml:lang="zh">éå®ç®¡ç</value>
<value xml:lang="zh-TW">é·å®</value>
</property>
- <value xml:lang="cs">Shark</value>
<property key="Web Pos">
- <value xml:lang="cs">Web Pos</value>
- <value xml:lang="en">Web Pos</value>
+ <value xml:lang="en">Web POS</value>
<value xml:lang="es">POS web</value>
<value xml:lang="fr">POS Web</value>
<value xml:lang="hi-IN">वà¥à¤¬ Pos</value>
<value xml:lang="it">POS web</value>
- <value xml:lang="ja">Web POS</value>
<value xml:lang="pt-BR">Ponto de venda Web</value>
<value xml:lang="ru">POS web</value>
<value xml:lang="vi">Äiá»m bán hà ng Web POS</value>
Modified: ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/CommonEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/CommonEvents.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/CommonEvents.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/CommonEvents.java Mon Dec 23 09:26:58 2013
@@ -465,9 +465,9 @@ public class CommonEvents {
response.setContentType("image/jpeg");
ImageIO.write(bufferedImage, "jpg", response.getOutputStream());
HttpSession session = request.getSession();
- Map captchaCodeMap = (Map)session.getAttribute("_CAPTCHA_CODE_");
+ Map<String, String> captchaCodeMap = UtilGenerics.checkMap(session.getAttribute("_CAPTCHA_CODE_"));
if (captchaCodeMap == null) {
- captchaCodeMap = new HashMap();
+ captchaCodeMap = new HashMap<String, String>();
session.setAttribute("_CAPTCHA_CODE_", captchaCodeMap);
}
captchaCodeMap.put(captchaCodeId, captchaCode);
Modified: ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/common/src/org/ofbiz/common/login/LoginServices.java Mon Dec 23 09:26:58 2013
@@ -729,7 +729,7 @@ public class LoginServices {
// Debug.logWarning(e, "", module);
//}
- if (loggedInUserLogin != null) {
+ if (!loggedInUserLogin.isEmpty()) {
// security check: userLogin partyId must equal partyId, or must have PARTYMGR_CREATE permission
if (!partyId.equals(loggedInUserLogin.getString("partyId"))) {
errMsg = UtilProperties.getMessage(resource,"loginservices.party_with_party_id_exists_not_permission_create_user_login", locale);
Modified: ofbiz/branches/jackrabbit20120501/framework/component-load.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/component-load.xml?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/component-load.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/component-load.xml Mon Dec 23 09:26:58 2013
@@ -36,7 +36,6 @@ under the License.
<load-component component-location="bi"/>
<load-component component-location="webapp"/>
<load-component component-location="widget"/>
- <load-component component-location="appserver"/>
<load-component component-location="testtools"/>
<load-component component-location="webtools"/>
<load-component component-location="images"/>
Modified: ofbiz/branches/jackrabbit20120501/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/datafile/src/org/ofbiz/datafile/ModelDataFileReader.java Mon Dec 23 09:26:58 2013
@@ -241,18 +241,12 @@ public final class ModelDataFileReader {
Element fieldElement = (Element) fList.item(i);
ModelField modelField = createModelField(fieldElement);
- // if the position is not specified, assume the start position based on last
- // entry
+ // if the position is not specified, assume the start position based on last entry
if ((i > 0) && (modelField.position == -1)) {
modelField.position = priorEnd;
}
priorEnd = modelField.position + modelField.length;
-
- if (modelField != null) {
- record.fields.add(modelField);
- } else {
- Debug.logWarning("[ModelDataFileReader.createModelRecord] Weird, modelField was null", module);
- }
+ record.fields.add(modelField);
}
return record;
Modified: ofbiz/branches/jackrabbit20120501/framework/entity/dtd/entitymodel.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/entity/dtd/entitymodel.xsd?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/entity/dtd/entitymodel.xsd (original)
+++ ofbiz/branches/jackrabbit20120501/framework/entity/dtd/entitymodel.xsd Mon Dec 23 09:26:58 2013
@@ -86,7 +86,14 @@ under the License.
<xs:attribute name="package-name" type="xs:string" use="required"/>
<xs:attribute name="default-resource-name" type="xs:string"/>
<xs:attribute name="dependent-on" type="xs:string"/>
- <xs:attribute name="sequence-bank-size" type="xs:string"/>
+ <xs:attribute name="sequence-bank-size" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ The 10 default value is defined in the SequenceBank class by the defaultBankSize constant.
+ Can't be more than 5000 which is defined by the maxBankSize constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
<xs:attribute name="enable-lock" default="false" type="boolean"/>
<xs:attribute name="no-auto-stamp" default="false" type="boolean"/>
<xs:attribute name="never-cache" default="false" type="boolean"/>
@@ -503,7 +510,14 @@ under the License.
<xs:attribute name="entity-name" type="xs:string" use="required"/>
<xs:attribute name="default-resource-name" type="xs:string"/>
<xs:attribute name="dependent-on" type="xs:string"/>
- <xs:attribute name="sequence-bank-size" type="xs:string"/>
+ <xs:attribute name="sequence-bank-size" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ The 10 default value is defined in the SequenceBank class by the defaultBankSize constant.
+ Can't be more than 5000 which is defined by the maxBankSize constant.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
<xs:attribute name="enable-lock" type="boolean"/>
<xs:attribute name="no-auto-stamp" type="boolean"/>
<xs:attribute name="never-cache" type="boolean"/>
Modified: ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Mon Dec 23 09:26:58 2013
@@ -32,6 +32,7 @@ import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import javax.xml.parsers.ParserConfigurationException;
@@ -105,7 +106,7 @@ public class GenericDelegator implements
protected DistributedCacheClear distributedCacheClear = null;
protected boolean warnNoEcaHandler = false;
protected EntityEcaHandler<?> entityEcaHandler = null;
- protected SequenceUtil sequencer = null;
+ protected final AtomicReference<SequenceUtil> AtomicRefSequencer = new AtomicReference<SequenceUtil>(null);
protected EntityCrypto crypto = null;
/** A ThreadLocal variable to allow other methods to specify a user identifier (usually the userLoginId, though technically the Entity Engine doesn't know anything about the UserLogin entity) */
@@ -287,6 +288,7 @@ public class GenericDelegator implements
protected Callable<Void> createHelperCallable(final String groupName) {
return new Callable<Void>() {
+ @Override
public Void call() {
initializeOneGenericHelper(groupName);
return null;
@@ -309,6 +311,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#initEntityEcaHandler()
*/
+ @Override
public synchronized void initEntityEcaHandler() {
// Nothing to do if already assigned: the class loader has already been called, the class instantiated and casted to EntityEcaHandler
if (this.entityEcaHandler != null || this.warnNoEcaHandler) {
@@ -343,6 +346,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getDelegatorName()
*/
+ @Override
public String getDelegatorName() {
return this.delegatorFullName;
}
@@ -350,6 +354,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getDelegatorBaseName()
*/
+ @Override
public String getDelegatorBaseName() {
return this.delegatorBaseName;
}
@@ -357,6 +362,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getDelegatorBaseName()
*/
+ @Override
public String getDelegatorTenantId() {
return this.delegatorTenantId;
}
@@ -364,6 +370,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getOriginalDelegatorName()
*/
+ @Override
public String getOriginalDelegatorName() {
return this.originalDelegatorName == null ? this.delegatorFullName : this.originalDelegatorName;
}
@@ -371,6 +378,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getModelReader()
*/
+ @Override
public ModelReader getModelReader() {
return this.modelReader;
}
@@ -378,6 +386,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getModelGroupReader()
*/
+ @Override
public ModelGroupReader getModelGroupReader() {
return this.modelGroupReader;
}
@@ -385,6 +394,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getModelEntity(java.lang.String)
*/
+ @Override
public ModelEntity getModelEntity(String entityName) {
try {
return getModelReader().getModelEntity(entityName);
@@ -397,6 +407,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityGroupName(java.lang.String)
*/
+ @Override
public String getEntityGroupName(String entityName) {
return getModelGroupReader().getEntityGroupName(entityName, this.delegatorBaseName);
}
@@ -404,6 +415,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getModelEntityMapByGroup(java.lang.String)
*/
+ @Override
public Map<String, ModelEntity> getModelEntityMapByGroup(String groupName) throws GenericEntityException {
Set<String> entityNameSet = getModelGroupReader().getEntityNamesByGroup(groupName);
@@ -447,10 +459,12 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getGroupHelperName(java.lang.String)
*/
+ @Override
public String getGroupHelperName(String groupName) {
return this.delegatorInfo.getGroupDataSource(groupName);
}
+ @Override
public GenericHelperInfo getGroupHelperInfo(String entityGroupName) {
if (entityGroupName == null) {
return null;
@@ -480,7 +494,7 @@ public class GenericDelegator implements
if (Debug.warningOn()) {
Debug.logWarning("Could not find TenantDataSource information for tenantId=[" + this.delegatorTenantId + "] and entityGroupName=[" + entityGroupName + "] in delegator [" + this.delegatorFullName + "]; will be defaulting to settings for the base delegator name [" + this.delegatorBaseName + "]", module);
}
- */
+ */
}
} catch (GenericEntityException e) {
// don't complain about this too much, just log the error if there is one
@@ -498,6 +512,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityHelperName(java.lang.String)
*/
+ @Override
public String getEntityHelperName(String entityName) {
return this.getGroupHelperName(this.getEntityGroupName(entityName));
}
@@ -505,6 +520,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityHelperName(org.ofbiz.entity.model.ModelEntity)
*/
+ @Override
public String getEntityHelperName(ModelEntity entity) {
if (entity == null) {
return null;
@@ -515,6 +531,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityHelper(java.lang.String)
*/
+ @Override
public GenericHelper getEntityHelper(String entityName) throws GenericEntityException {
GenericHelperInfo helperInfo = getEntityHelperInfo(entityName);
@@ -528,6 +545,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityHelper(org.ofbiz.entity.model.ModelEntity)
*/
+ @Override
public GenericHelper getEntityHelper(ModelEntity entity) throws GenericEntityException {
return getEntityHelper(entity.getEntityName());
}
@@ -535,6 +553,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityFieldType(org.ofbiz.entity.model.ModelEntity, java.lang.String)
*/
+ @Override
public ModelFieldType getEntityFieldType(ModelEntity entity, String type) throws GenericEntityException {
return this.getModelFieldTypeReader(entity).getModelFieldType(type);
}
@@ -542,6 +561,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getModelFieldTypeReader(org.ofbiz.entity.model.ModelEntity)
*/
+ @Override
public ModelFieldTypeReader getModelFieldTypeReader(ModelEntity entity) {
String helperName = getEntityHelperName(entity);
if (helperName == null || helperName.length() <= 0) {
@@ -557,6 +577,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityFieldTypeNames(org.ofbiz.entity.model.ModelEntity)
*/
+ @Override
public Collection<String> getEntityFieldTypeNames(ModelEntity entity) throws GenericEntityException {
String helperName = getEntityHelperName(entity);
@@ -574,6 +595,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValue(java.lang.String)
*/
+ @Override
public GenericValue makeValue(String entityName) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -587,6 +609,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValue(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericValue makeValue(String entityName, Object... fields) {
return makeValue(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -594,6 +617,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValue(java.lang.String, java.util.Map)
*/
+ @Override
public GenericValue makeValue(String entityName, Map<String, ? extends Object> fields) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -605,6 +629,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValueSingle(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericValue makeValueSingle(String entityName, Object singlePkValue) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -616,6 +641,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValidValue(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericValue makeValidValue(String entityName, Object... fields) {
return makeValidValue(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -623,6 +649,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValidValue(java.lang.String, java.util.Map)
*/
+ @Override
public GenericValue makeValidValue(String entityName, Map<String, ? extends Object> fields) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -637,6 +664,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makePK(java.lang.String)
*/
+ @Override
public GenericPK makePK(String entityName) {
return this.makePK(entityName, (Map<String, Object>) null);
}
@@ -644,6 +672,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makePK(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericPK makePK(String entityName, Object... fields) {
return makePK(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -651,6 +680,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makePK(java.lang.String, java.util.Map)
*/
+ @Override
public GenericPK makePK(String entityName, Map<String, ? extends Object> fields) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -662,6 +692,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makePKSingle(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericPK makePKSingle(String entityName, Object singlePkValue) {
ModelEntity entity = this.getModelEntity(entityName);
if (entity == null) {
@@ -673,6 +704,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#create(org.ofbiz.entity.GenericPK)
*/
+ @Override
public GenericValue create(GenericPK primaryKey) throws GenericEntityException {
return this.create(primaryKey, true);
}
@@ -681,6 +713,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#create(org.ofbiz.entity.GenericPK, boolean)
* @deprecated use {@link #create(GenericPK primaryKey)}
*/
+ @Override
@Deprecated
public GenericValue create(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException {
if (primaryKey == null) {
@@ -693,6 +726,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#create(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericValue create(String entityName, Object... fields) throws GenericEntityException {
return create(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -700,6 +734,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#create(java.lang.String, java.util.Map)
*/
+ @Override
public GenericValue create(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
if (entityName == null || fields == null) {
return null;
@@ -713,6 +748,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#createSingle(java.lang.String, java.lang.Object)
*/
+ @Override
public GenericValue createSingle(String entityName, Object singlePkValue) throws GenericEntityException {
if (entityName == null || singlePkValue == null) {
return null;
@@ -726,6 +762,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#create(org.ofbiz.entity.GenericValue)
*/
+ @Override
public GenericValue create(GenericValue value) throws GenericEntityException {
return this.create(value, true);
}
@@ -733,6 +770,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#createSetNextSeqId(org.ofbiz.entity.GenericValue)
*/
+ @Override
public GenericValue createSetNextSeqId(GenericValue value) throws GenericEntityException {
@Deprecated
boolean doCacheClear = true;
@@ -791,7 +829,7 @@ public class GenericDelegator implements
}
// found an existing value... was probably a duplicate key, so clean things up and try again
- this.sequencer.forceBankRefresh(value.getEntityName(), 1);
+ this.AtomicRefSequencer.get().forceBankRefresh(value.getEntityName(), 1);
value.setNextSeqId();
value = helper.create(value);
@@ -830,8 +868,9 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#create(org.ofbiz.entity.GenericValue, boolean)
- * @deprecated use {@link #create(GenericValue value)}
+ * @deprecated use {@link #create(GenericValue value)}
*/
+ @Override
@Deprecated
public GenericValue create(GenericValue value, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -889,8 +928,9 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#createOrStore(org.ofbiz.entity.GenericValue, boolean)
- * @deprecated use {@link #createOrStore(GenericValue value)}
+ * @deprecated use {@link #createOrStore(GenericValue value)}
*/
+ @Override
@Deprecated
public GenericValue createOrStore(GenericValue value, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -921,9 +961,10 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#createOrStore(org.ofbiz.entity.GenericValue)
*/
+ @Override
public GenericValue createOrStore(GenericValue value) throws GenericEntityException {
return createOrStore(value, true);
- }
+ }
protected void saveEntitySyncRemoveInfo(GenericEntity dummyPK) throws GenericEntityException {
// don't store remove info on entities where it is disabled
@@ -957,6 +998,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByPrimaryKey(org.ofbiz.entity.GenericPK)
*/
+ @Override
public int removeByPrimaryKey(GenericPK primaryKey) throws GenericEntityException {
int retVal = this.removeByPrimaryKey(primaryKey, true);
return retVal;
@@ -964,8 +1006,9 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByPrimaryKey(org.ofbiz.entity.GenericPK, boolean)
- * @deprecated use {@link #removeByPrimaryKey(GenericPK primaryKey)}
+ * @deprecated use {@link #removeByPrimaryKey(GenericPK primaryKey)}
*/
+ @Override
@Deprecated
public int removeByPrimaryKey(GenericPK primaryKey, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -1018,14 +1061,16 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeValue(org.ofbiz.entity.GenericValue)
*/
+ @Override
public int removeValue(GenericValue value) throws GenericEntityException {
return this.removeValue(value, true);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeValue(org.ofbiz.entity.GenericValue, boolean)
- * @deprecated use {@link #removeValue(GenericValue value)}
+ * @deprecated use {@link #removeValue(GenericValue value)}
*/
+ @Override
@Deprecated
public int removeValue(GenericValue value, boolean doCacheClear) throws GenericEntityException {
// NOTE: this does not call the GenericDelegator.removeByPrimaryKey method because it has more information to pass to the ECA rule hander
@@ -1083,6 +1128,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByAnd(java.lang.String, java.lang.Object)
*/
+ @Override
public int removeByAnd(String entityName, Object... fields) throws GenericEntityException {
return removeByAnd(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -1090,14 +1136,16 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByAnd(java.lang.String, java.util.Map)
*/
+ @Override
public int removeByAnd(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return this.removeByAnd(entityName, fields, true);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByAnd(java.lang.String, boolean, java.lang.Object)
- * @deprecated use {@link #removeByAnd(String entityName, Object... fields)}
+ * @deprecated use {@link #removeByAnd(String entityName, Object... fields)}
*/
+ @Override
@Deprecated
public int removeByAnd(String entityName, boolean doCacheClear, Object... fields) throws GenericEntityException {
return removeByAnd(entityName, UtilMisc.<String, Object>toMap(fields), doCacheClear);
@@ -1107,6 +1155,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#removeByAnd(java.lang.String, java.util.Map, boolean)
* @deprecated use {@link #removeByAnd(String entityName, Map<String, ? extends Object> fields)}}
*/
+ @Override
@Deprecated
public int removeByAnd(String entityName, Map<String, ? extends Object> fields, boolean doCacheClear) throws GenericEntityException {
EntityCondition ecl = EntityCondition.makeCondition(fields);
@@ -1116,6 +1165,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeByCondition(java.lang.String, org.ofbiz.entity.condition.EntityCondition)
*/
+ @Override
public int removeByCondition(String entityName, EntityCondition condition) throws GenericEntityException {
return this.removeByCondition(entityName, condition, true);
}
@@ -1124,6 +1174,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#removeByCondition(java.lang.String, org.ofbiz.entity.condition.EntityCondition, boolean)
* @deprecated use {@link #removeByCondition(String entityName, EntityCondition condition)}
*/
+ @Override
@Deprecated
public int removeByCondition(String entityName, EntityCondition condition, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -1164,14 +1215,16 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeRelated(java.lang.String, org.ofbiz.entity.GenericValue)
*/
+ @Override
public int removeRelated(String relationName, GenericValue value) throws GenericEntityException {
return this.removeRelated(relationName, value, true);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeRelated(java.lang.String, org.ofbiz.entity.GenericValue, boolean)
- * @deprecated use {@link #removeRelated(String relationName, GenericValue value)}
+ * @deprecated use {@link #removeRelated(String relationName, GenericValue value)}
*/
+ @Override
@Deprecated
public int removeRelated(String relationName, GenericValue value, boolean doCacheClear) throws GenericEntityException {
ModelEntity modelEntity = value.getModelEntity();
@@ -1192,6 +1245,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#refresh(org.ofbiz.entity.GenericValue)
*/
+ @Override
public void refresh(GenericValue value) throws GenericEntityException {
this.refresh(value, true);
}
@@ -1200,6 +1254,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#refresh(org.ofbiz.entity.GenericValue, boolean)
* @deprecated use {@link #refresh(GenericValue value)}
*/
+ @Override
@Deprecated
public void refresh(GenericValue value, boolean doCacheClear) throws GenericEntityException {
if (doCacheClear) {
@@ -1214,6 +1269,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#refreshFromCache(org.ofbiz.entity.GenericValue)
*/
+ @Override
public void refreshFromCache(GenericValue value) throws GenericEntityException {
GenericPK pk = value.getPrimaryKey();
GenericValue newValue = findOne(pk.getEntityName(), pk, true);
@@ -1223,14 +1279,16 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#storeByCondition(java.lang.String, java.util.Map, org.ofbiz.entity.condition.EntityCondition)
*/
+ @Override
public int storeByCondition(String entityName, Map<String, ? extends Object> fieldsToSet, EntityCondition condition) throws GenericEntityException {
return storeByCondition(entityName, fieldsToSet, condition, true);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#storeByCondition(java.lang.String, java.util.Map, org.ofbiz.entity.condition.EntityCondition, boolean)
- * @deprecated use {@link #storeByCondition(String entityName, Map<String, ? extends Object> fieldsToSet, EntityCondition condition)}
+ * @deprecated use {@link #storeByCondition(String entityName, Map<String, ? extends Object> fieldsToSet, EntityCondition condition)}
*/
+ @Override
@Deprecated
public int storeByCondition(String entityName, Map<String, ? extends Object> fieldsToSet, EntityCondition condition, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -1271,14 +1329,16 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#store(org.ofbiz.entity.GenericValue)
*/
+ @Override
public int store(GenericValue value) throws GenericEntityException {
return this.store(value, true);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#store(org.ofbiz.entity.GenericValue, boolean)
- * @deprecated use {@link #store(GenericValue value)}
+ * @deprecated use {@link #store(GenericValue value)}
*/
+ @Override
@Deprecated
public int store(GenericValue value, boolean doCacheClear) throws GenericEntityException {
boolean beganTransaction = false;
@@ -1333,6 +1393,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#storeAll(java.util.List)
*/
+ @Override
public int storeAll(List<GenericValue> values) throws GenericEntityException {
return this.storeAll(values, true);
}
@@ -1342,6 +1403,7 @@ public class GenericDelegator implements
* @deprecated use {@link #storeAll(List<GenericValue> values)}
* TODO: JLR 2013-09-19 - doCacheClear refactoring: to be removed and replaced by storeAll(List<GenericValue> values, boolean createDummyFks)
*/
+ @Override
@Deprecated
public int storeAll(List<GenericValue> values, boolean doCacheClear) throws GenericEntityException {
return this.storeAll(values, doCacheClear, false);
@@ -1351,6 +1413,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#storeAll(java.util.List, boolean, boolean)
* TODO: JLR 2013-09-19 - doCacheClear refactoring: to be changed to storeAll(List<GenericValue> values, boolean createDummyFks)
*/
+ @Override
public int storeAll(List<GenericValue> values, boolean doCacheClear, boolean createDummyFks) throws GenericEntityException {
if (values == null) {
return 0;
@@ -1426,6 +1489,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeAll(java.lang.String)
*/
+ @Override
public int removeAll(String entityName) throws GenericEntityException {
return removeByAnd(entityName, (Map<String, Object>) null);
}
@@ -1433,6 +1497,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#removeAll(java.util.List)
*/
+ @Override
public int removeAll(List<? extends GenericEntity> dummyPKs) throws GenericEntityException {
return this.removeAll(dummyPKs, true);
}
@@ -1441,6 +1506,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#removeAll(java.util.List, boolean)
* @deprecated use {@link #removeAll(List<? extends GenericEntity> dummyPKs)}
*/
+ @Override
@Deprecated
public int removeAll(List<? extends GenericEntity> dummyPKs, boolean doCacheClear) throws GenericEntityException {
if (dummyPKs == null) {
@@ -1475,6 +1541,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findOne(java.lang.String, boolean, java.lang.Object)
*/
+ @Override
public GenericValue findOne(String entityName, boolean useCache, Object... fields) throws GenericEntityException {
return findOne(entityName, UtilMisc.toMap(fields), useCache);
}
@@ -1482,6 +1549,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findOne(java.lang.String, java.util.Map, boolean)
*/
+ @Override
public GenericValue findOne(String entityName, Map<String, ? extends Object> fields, boolean useCache) throws GenericEntityException {
GenericPK primaryKey = this.makePK(entityName, fields);
if (!primaryKey.isPrimaryKey()) {
@@ -1544,6 +1612,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByPrimaryKey(java.lang.String, java.util.Map)
* @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Override
@Deprecated
public GenericValue findByPrimaryKey(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return findOne(entityName, fields, false);
@@ -1553,6 +1622,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByPrimaryKeyCache(java.lang.String, java.lang.Object)
* @deprecated use {@link #findOne(String, boolean, Object...)}
*/
+ @Override
@Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Object... fields) throws GenericEntityException {
return findByPrimaryKeyCache(entityName, UtilMisc.<String, Object>toMap(fields));
@@ -1562,6 +1632,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByPrimaryKeyCache(java.lang.String, java.util.Map)
* @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Override
@Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return findOne(entityName, fields, true);
@@ -1570,6 +1641,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByPrimaryKeyPartial(org.ofbiz.entity.GenericPK, java.util.Set)
*/
+ @Override
public GenericValue findByPrimaryKeyPartial(GenericPK primaryKey, Set<String> keys) throws GenericEntityException {
boolean beganTransaction = false;
try {
@@ -1604,19 +1676,21 @@ public class GenericDelegator implements
throw new GenericEntityException(e);
}
}
-
+
/** Finds all Generic entities
*@param entityName The Name of the Entity as defined in the entity XML file
* @see org.ofbiz.entity.Delegator#findAll(java.lang.String, boolean)
*/
+ @Override
public List<GenericValue> findAll(String entityName, boolean useCache) throws GenericEntityException {
return this.findList(entityName, null, null, null, null, useCache);
}
-
+
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.lang.Object)
* @deprecated use {@link #findByAnd(String, Map, List, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> findByAnd(String entityName, Object... fields) throws GenericEntityException {
EntityCondition ecl = EntityCondition.makeCondition(UtilMisc.<String, Object>toMap(fields));
@@ -1627,6 +1701,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.util.Map)
* @deprecated use {@link #findByAnd(String, Map, List, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> findByAnd(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
EntityCondition ecl = EntityCondition.makeCondition(fields);
@@ -1637,6 +1712,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.util.Map, java.util.List)
* @deprecated use {@link #findByAnd(String, Map, List, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> findByAnd(String entityName, Map<String, ? extends Object> fields, List<String> orderBy) throws GenericEntityException {
EntityCondition ecl = EntityCondition.makeCondition(fields);
@@ -1647,6 +1723,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByAndCache(java.lang.String, java.util.Map)
* @deprecated use {@link #findByAnd(String, Map, List, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> findByAndCache(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return this.findList(entityName, EntityCondition.makeCondition(fields), null, null, null, true);
@@ -1656,6 +1733,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#findByAndCache(java.lang.String, java.util.Map, java.util.List)
* @deprecated use {@link #findByAnd(String, Map, List, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> findByAndCache(String entityName, Map<String, ? extends Object> fields, List<String> orderBy) throws GenericEntityException {
return this.findList(entityName, EntityCondition.makeCondition(fields), null, orderBy, null, true);
@@ -1664,6 +1742,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.util.Map, java.util.List, boolean)
*/
+ @Override
public List<GenericValue> findByAnd(String entityName, Map<String, ? extends Object> fields, List<String> orderBy, boolean useCache) throws GenericEntityException {
return this.findList(entityName, EntityCondition.makeCondition(fields), null, orderBy, null, useCache);
}
@@ -1671,6 +1750,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#find(java.lang.String, org.ofbiz.entity.condition.EntityCondition, org.ofbiz.entity.condition.EntityCondition, java.util.Set, java.util.List, org.ofbiz.entity.util.EntityFindOptions)
*/
+ @Override
public EntityListIterator find(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Set<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException {
// if there is no transaction throw an exception, we don't want to create a transaction here since closing it would mess up the ELI
@@ -1708,6 +1788,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findList(java.lang.String, org.ofbiz.entity.condition.EntityCondition, java.util.Set, java.util.List, org.ofbiz.entity.util.EntityFindOptions, boolean)
*/
+ @Override
public List<GenericValue> findList(String entityName, EntityCondition entityCondition, Set<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions, boolean useCache) throws GenericEntityException {
EntityEcaRuleRunner<?> ecaRunner = null;
@@ -1752,6 +1833,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findListIteratorByCondition(org.ofbiz.entity.model.DynamicViewEntity, org.ofbiz.entity.condition.EntityCondition, org.ofbiz.entity.condition.EntityCondition, java.util.Collection, java.util.List, org.ofbiz.entity.util.EntityFindOptions)
*/
+ @Override
public EntityListIterator findListIteratorByCondition(DynamicViewEntity dynamicViewEntity, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Collection<String> fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions) throws GenericEntityException {
// if there is no transaction throw an exception, we don't want to create a transaction here since closing it would mess up the ELI
@@ -1778,6 +1860,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findCountByCondition(java.lang.String, org.ofbiz.entity.condition.EntityCondition, org.ofbiz.entity.condition.EntityCondition, org.ofbiz.entity.util.EntityFindOptions)
*/
+ @Override
public long findCountByCondition(String entityName, EntityCondition whereEntityCondition,
EntityCondition havingEntityCondition, EntityFindOptions findOptions) throws GenericEntityException {
@@ -1819,6 +1902,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getMultiRelation(org.ofbiz.entity.GenericValue, java.lang.String, java.lang.String, java.util.List)
*/
+ @Override
public List<GenericValue> getMultiRelation(GenericValue value, String relationNameOne, String relationNameTwo, List<String> orderBy) throws GenericEntityException {
boolean beganTransaction = false;
try {
@@ -1850,6 +1934,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#getRelated(java.lang.String, java.util.Map, java.util.List, org.ofbiz.entity.GenericValue)
* @deprecated use {@link #getRelated(String, Map, List, GenericValue, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> getRelated(String relationName, Map<String, ? extends Object> byAndFields, List<String> orderBy, GenericValue value) throws GenericEntityException {
return getRelated(relationName, byAndFields, orderBy, value, false);
@@ -1858,6 +1943,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getRelated(java.lang.String, java.util.Map, java.util.List, org.ofbiz.entity.GenericValue, boolean)
*/
+ @Override
public List<GenericValue> getRelated(String relationName, Map<String, ? extends Object> byAndFields, List<String> orderBy, GenericValue value, boolean useCache) throws GenericEntityException {
ModelEntity modelEntity = value.getModelEntity();
ModelRelation relation = modelEntity.getRelation(relationName);
@@ -1882,6 +1968,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getRelatedDummyPK(java.lang.String, java.util.Map, org.ofbiz.entity.GenericValue)
*/
+ @Override
public GenericPK getRelatedDummyPK(String relationName, Map<String, ? extends Object> byAndFields, GenericValue value) throws GenericEntityException {
ModelEntity modelEntity = value.getModelEntity();
ModelRelation relation = modelEntity.getRelation(relationName);
@@ -1908,6 +1995,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#getRelatedCache(java.lang.String, org.ofbiz.entity.GenericValue)
* @deprecated use {@link #getRelated(String, Map, List, GenericValue, boolean)}
*/
+ @Override
@Deprecated
public List<GenericValue> getRelatedCache(String relationName, GenericValue value) throws GenericEntityException {
return getRelated(relationName, null, null, value, true);
@@ -1917,6 +2005,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#getRelatedOne(java.lang.String, org.ofbiz.entity.GenericValue, boolean)
* @deprecated use {@link #getRelatedOne(String, GenericValue, boolean)}
*/
+ @Override
@Deprecated
public GenericValue getRelatedOne(String relationName, GenericValue value) throws GenericEntityException {
return this.getRelatedOne(relationName, value, false);
@@ -1926,6 +2015,7 @@ public class GenericDelegator implements
* @see org.ofbiz.entity.Delegator#getRelatedOneCache(java.lang.String, org.ofbiz.entity.GenericValue, boolean)
* @deprecated use {@link #getRelatedOne(String, GenericValue, boolean)}
*/
+ @Override
@Deprecated
public GenericValue getRelatedOneCache(String relationName, GenericValue value) throws GenericEntityException {
return this.getRelatedOne(relationName, value, true);
@@ -1934,6 +2024,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getRelatedOne(java.lang.String, org.ofbiz.entity.GenericValue, boolean)
*/
+ @Override
public GenericValue getRelatedOne(String relationName, GenericValue value, boolean useCache) throws GenericEntityException {
ModelRelation relation = value.getModelEntity().getRelation(relationName);
@@ -1960,6 +2051,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearAllCaches()
*/
+ @Override
public void clearAllCaches() {
this.clearAllCaches(true);
}
@@ -1967,6 +2059,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearAllCaches(boolean)
*/
+ @Override
public void clearAllCaches(boolean distribute) {
cache.clear();
@@ -1978,6 +2071,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(java.lang.String)
*/
+ @Override
public void clearCacheLine(String entityName) {
cache.remove(entityName);
}
@@ -1985,6 +2079,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(java.lang.String, java.lang.Object)
*/
+ @Override
public void clearCacheLine(String entityName, Object... fields) {
clearCacheLine(entityName, UtilMisc.<String, Object>toMap(fields));
}
@@ -1992,6 +2087,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(java.lang.String, java.util.Map)
*/
+ @Override
public void clearCacheLine(String entityName, Map<String, ? extends Object> fields) {
// if no fields passed, do the all cache quickly and return
if (fields == null) {
@@ -2015,6 +2111,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLineFlexible(org.ofbiz.entity.GenericEntity)
*/
+ @Override
public void clearCacheLineFlexible(GenericEntity dummyPK) {
this.clearCacheLineFlexible(dummyPK, true);
}
@@ -2022,6 +2119,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLineFlexible(org.ofbiz.entity.GenericEntity, boolean)
*/
+ @Override
public void clearCacheLineFlexible(GenericEntity dummyPK, boolean distribute) {
if (dummyPK != null) {
//if never cached, then don't bother clearing
@@ -2038,6 +2136,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLineByCondition(java.lang.String, org.ofbiz.entity.condition.EntityCondition)
*/
+ @Override
public void clearCacheLineByCondition(String entityName, EntityCondition condition) {
clearCacheLineByCondition(entityName, condition, true);
}
@@ -2045,6 +2144,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLineByCondition(java.lang.String, org.ofbiz.entity.condition.EntityCondition, boolean)
*/
+ @Override
public void clearCacheLineByCondition(String entityName, EntityCondition condition, boolean distribute) {
if (entityName != null) {
//if never cached, then don't bother clearing
@@ -2063,6 +2163,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(org.ofbiz.entity.GenericPK)
*/
+ @Override
public void clearCacheLine(GenericPK primaryKey) {
this.clearCacheLine(primaryKey, true);
}
@@ -2070,6 +2171,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(org.ofbiz.entity.GenericPK, boolean)
*/
+ @Override
public void clearCacheLine(GenericPK primaryKey, boolean distribute) {
if (primaryKey == null) {
return;
@@ -2090,6 +2192,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(org.ofbiz.entity.GenericValue)
*/
+ @Override
public void clearCacheLine(GenericValue value) {
this.clearCacheLine(value, true);
}
@@ -2097,6 +2200,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearCacheLine(org.ofbiz.entity.GenericValue, boolean)
*/
+ @Override
public void clearCacheLine(GenericValue value, boolean distribute) {
// Debug.logInfo("running clearCacheLine for value: " + value + ", distribute: " + distribute, module);
if (value == null) {
@@ -2118,6 +2222,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearAllCacheLinesByDummyPK(java.util.Collection)
*/
+ @Override
public void clearAllCacheLinesByDummyPK(Collection<GenericPK> dummyPKs) {
if (dummyPKs == null) {
return;
@@ -2130,6 +2235,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#clearAllCacheLinesByValue(java.util.Collection)
*/
+ @Override
public void clearAllCacheLinesByValue(Collection<GenericValue> values) {
if (values == null) {
return;
@@ -2142,6 +2248,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getFromPrimaryKeyCache(org.ofbiz.entity.GenericPK)
*/
+ @Override
public GenericValue getFromPrimaryKeyCache(GenericPK primaryKey) {
if (primaryKey == null) {
return null;
@@ -2156,6 +2263,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#putInPrimaryKeyCache(org.ofbiz.entity.GenericPK, org.ofbiz.entity.GenericValue)
*/
+ @Override
public void putInPrimaryKeyCache(GenericPK primaryKey, GenericValue value) {
if (primaryKey == null) {
return;
@@ -2176,6 +2284,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#putAllInPrimaryKeyCache(java.util.List)
*/
+ @Override
public void putAllInPrimaryKeyCache(List<GenericValue> values) {
if (values == null) {
return;
@@ -2188,6 +2297,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#setDistributedCacheClear(org.ofbiz.entity.util.DistributedCacheClear)
*/
+ @Override
public void setDistributedCacheClear(DistributedCacheClear distributedCacheClear) {
this.distributedCacheClear = distributedCacheClear;
}
@@ -2196,6 +2306,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#readXmlDocument(java.net.URL)
*/
+ @Override
public List<GenericValue> readXmlDocument(URL url) throws SAXException, ParserConfigurationException, java.io.IOException {
if (url == null) {
return null;
@@ -2206,6 +2317,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValues(org.w3c.dom.Document)
*/
+ @Override
public List<GenericValue> makeValues(Document document) {
if (document == null) {
return null;
@@ -2245,6 +2357,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makePK(org.w3c.dom.Element)
*/
+ @Override
public GenericPK makePK(Element element) {
GenericValue value = makeValue(element);
@@ -2254,6 +2367,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeValue(org.w3c.dom.Element)
*/
+ @Override
public GenericValue makeValue(Element element) {
if (element == null) {
return null;
@@ -2335,6 +2449,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#setEntityEcaHandler(org.ofbiz.entity.eca.EntityEcaHandler)
*/
+ @Override
public <T> void setEntityEcaHandler(EntityEcaHandler<T> entityEcaHandler) {
this.entityEcaHandler = entityEcaHandler;
this.warnNoEcaHandler = false;
@@ -2343,6 +2458,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getEntityEcaHandler()
*/
+ @Override
public <T> EntityEcaHandler<T> getEntityEcaHandler() {
return UtilGenerics.cast(this.entityEcaHandler);
}
@@ -2350,6 +2466,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getNextSeqId(java.lang.String)
*/
+ @Override
public String getNextSeqId(String seqName) {
return this.getNextSeqId(seqName, 1);
}
@@ -2357,6 +2474,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getNextSeqId(java.lang.String, long)
*/
+ @Override
public String getNextSeqId(String seqName, long staggerMax) {
Long nextSeqLong = this.getNextSeqIdLong(seqName, staggerMax);
@@ -2375,6 +2493,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getNextSeqIdLong(java.lang.String)
*/
+ @Override
public Long getNextSeqIdLong(String seqName) {
return this.getNextSeqIdLong(seqName, 1);
}
@@ -2382,6 +2501,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getNextSeqIdLong(java.lang.String, long)
*/
+ @Override
public Long getNextSeqIdLong(String seqName, long staggerMax) {
boolean beganTransaction = false;
try {
@@ -2389,13 +2509,16 @@ public class GenericDelegator implements
beganTransaction = TransactionUtil.begin();
}
- // FIXME: Replace DCL code with AtomicReference
+ SequenceUtil sequencer = this.AtomicRefSequencer.get();
if (sequencer == null) {
- synchronized (this) {
- if (sequencer == null) {
- ModelEntity seqEntity = this.getModelEntity("SequenceValueItem");
- sequencer = new SequenceUtil(this, this.getEntityHelperInfo("SequenceValueItem"), seqEntity, "seqName", "seqId");
+ ModelEntity seqEntity = this.getModelEntity("SequenceValueItem");
+ sequencer = new SequenceUtil(this, this.getEntityHelperInfo("SequenceValueItem"), seqEntity, "seqName", "seqId");
+ try {
+ if (!AtomicRefSequencer.compareAndSet(null, sequencer)) {
+ sequencer = this.AtomicRefSequencer.get();
}
+ } catch (Exception e) {
+ throw new IllegalStateException("Error thrown while creating AtomicReference<SequenceUtil> in getNextSeqIdLong()" + e);
}
}
@@ -2420,21 +2543,24 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#setSequencer(org.ofbiz.entity.util.SequenceUtil)
*/
+ @Override
public void setSequencer(SequenceUtil sequencer) {
- this.sequencer = sequencer;
+ this.AtomicRefSequencer.set(sequencer);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#refreshSequencer()
*/
+ @Override
public void refreshSequencer() {
- this.sequencer = null;
+ this.AtomicRefSequencer.set(null);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#setNextSubSeqId(org.ofbiz.entity.GenericValue, java.lang.String, int, int)
*/
+ @Override
public void setNextSubSeqId(GenericValue value, String seqFieldName, int numericPadding, int incrementBy) {
if (value != null && UtilValidate.isEmpty(value.getString(seqFieldName))) {
String sequencedIdPrefix = this.delegatorInfo.getSequencedIdPrefix();
@@ -2497,6 +2623,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#encryptFields(java.util.List)
*/
+ @Override
public void encryptFields(List<? extends GenericEntity> entities) throws GenericEntityException {
if (entities != null) {
for (GenericEntity entity: entities) {
@@ -2508,6 +2635,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#encryptFields(org.ofbiz.entity.GenericEntity)
*/
+ @Override
public void encryptFields(GenericEntity entity) throws GenericEntityException {
ModelEntity model = entity.getModelEntity();
String entityName = model.getEntityName();
@@ -2530,6 +2658,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#encryptFieldValue(java.lang.String, java.lang.Object)
*/
+ @Override
public Object encryptFieldValue(String entityName, Object fieldValue) throws EntityCryptoException {
if (fieldValue != null) {
if (fieldValue instanceof String && UtilValidate.isEmpty(fieldValue)) {
@@ -2543,6 +2672,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#decryptFields(java.util.List)
*/
+ @Override
public void decryptFields(List<? extends GenericEntity> entities) throws GenericEntityException {
if (entities != null) {
for (GenericEntity entity: entities) {
@@ -2554,6 +2684,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#decryptFields(org.ofbiz.entity.GenericEntity)
*/
+ @Override
public void decryptFields(GenericEntity entity) throws GenericEntityException {
ModelEntity model = entity.getModelEntity();
String entityName = model.getEntityName();
@@ -2586,6 +2717,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#setEntityCrypto(org.ofbiz.entity.util.EntityCrypto)
*/
+ @Override
public void setEntityCrypto(EntityCrypto crypto) {
this.crypto = crypto;
}
@@ -2602,6 +2734,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#getCache()
*/
+ @Override
public Cache getCache() {
return cache;
}
@@ -2680,6 +2813,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#cloneDelegator(java.lang.String)
*/
+ @Override
public GenericDelegator cloneDelegator(String delegatorFullName) {
// creates an exact clone of the delegator; except for the sequencer
// note that this will not be cached and should be used only when
@@ -2688,7 +2822,7 @@ public class GenericDelegator implements
newDelegator.modelReader = this.modelReader;
newDelegator.modelGroupReader = this.modelGroupReader;
newDelegator.setDelegatorNames(UtilValidate.isNotEmpty(delegatorFullName) ? delegatorFullName : this.delegatorFullName);
- // set the delegatorBaseName to be the same so that configuration settings all work the same as the current
+ // set the delegatorBaseName to be the same so that configuration settings all work the same as the current
// delegator, allowing the new delegatorFullName to not match a delegator name in the entityengine.xml file
newDelegator.delegatorBaseName = this.delegatorBaseName;
newDelegator.delegatorInfo = this.delegatorInfo;
@@ -2709,6 +2843,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#cloneDelegator()
*/
+ @Override
public GenericDelegator cloneDelegator() {
return this.cloneDelegator(this.delegatorFullName);
}
@@ -2716,6 +2851,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#makeTestDelegator(java.lang.String)
*/
+ @Override
public GenericDelegator makeTestDelegator(String delegatorName) {
GenericDelegator testDelegator = this.cloneDelegator(delegatorName);
testDelegator.entityEcaHandler = null;
@@ -2743,6 +2879,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#rollback()
*/
+ @Override
public void rollback() {
if (!this.testMode) {
Debug.logError("Rollback requested outside of testmode", module);
@@ -2795,6 +2932,7 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#initDistributedCacheClear()
*/
+ @Override
public void initDistributedCacheClear() {
// Nothing to do if already assigned: the class loader has already been called, the class instantiated and casted to DistributedCacheClear
if (this.distributedCacheClear != null) {
@@ -2825,9 +2963,9 @@ public class GenericDelegator implements
Debug.logVerbose("Distributed Cache Clear System disabled for delegator [" + delegatorFullName + "]", module);
}
}
-
+
+ @Override
public boolean useDistributedCacheClear() {
return this.delegatorInfo.getDistributedCacheClearEnabled();
}
-
}
Modified: ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/entity/src/org/ofbiz/entity/util/SequenceUtil.java Mon Dec 23 09:26:58 2013
@@ -48,7 +48,6 @@ public class SequenceUtil {
private final Map<String, SequenceBank> sequences = new Hashtable<String, SequenceBank>();
private final GenericHelperInfo helperInfo;
- private final long bankSize;
private final String tableName;
private final String nameColName;
private final String idColName;
@@ -74,11 +73,6 @@ public class SequenceUtil {
throw new IllegalArgumentException("Could not find the field definition for the sequence id field " + idFieldName);
}
this.idColName = idField.getColName();
- long bankSize = SequenceBank.defaultBankSize;
- if (seqEntity.getSequenceBankSize() != null) {
- bankSize = seqEntity.getSequenceBankSize().longValue();
- }
- this.bankSize = bankSize;
clustered = delegator.useDistributedCacheClear() || "Y".equals(UtilProperties.getPropertyValue("general.properties", "clustered"));
}
@@ -104,7 +98,12 @@ public class SequenceUtil {
synchronized(this) {
bank = sequences.get(seqName);
if (bank == null) {
- bank = new SequenceBank(seqName);
+ long bankSize = SequenceBank.defaultBankSize;
+ if (seqModelEntity != null && seqModelEntity.getSequenceBankSize() != null) {
+ bankSize = seqModelEntity.getSequenceBankSize().longValue();
+ if (bankSize > SequenceBank.maxBankSize) bankSize = SequenceBank.maxBankSize;
+ }
+ bank = new SequenceBank(seqName, bankSize);
sequences.put(seqName, bank);
}
}
@@ -124,11 +123,13 @@ public class SequenceUtil {
private long curSeqId;
private long maxSeqId;
private final String seqName;
+ private final long bankSize;
- private SequenceBank(String seqName) {
+ private SequenceBank(String seqName, long bankSize) {
this.seqName = seqName;
curSeqId = 0;
maxSeqId = 0;
+ this.bankSize = bankSize;
fillBank(1);
}
@@ -167,7 +168,7 @@ public class SequenceUtil {
// no need to get a new bank, SeqIds available
if ((curSeqId + stagger) <= maxSeqId) return;
- long bankSize = SequenceUtil.this.bankSize;
+ long bankSize = this.bankSize;
if (stagger > 1) {
// NOTE: could use staggerMax for this, but if that is done it would be easier to guess a valid next id without a brute force attack
bankSize = stagger * defaultBankSize;
Modified: ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java Mon Dec 23 09:26:58 2013
@@ -102,7 +102,6 @@ public abstract class Compare {
private static final class CompareContains extends Compare {
- @SuppressWarnings("unchecked")
@Override
public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
// The type parameter is ignored when using the contains operator, so no conversions will be performed.
Modified: ofbiz/branches/jackrabbit20120501/framework/webtools/config/WebtoolsUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webtools/config/WebtoolsUiLabels.xml?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webtools/config/WebtoolsUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webtools/config/WebtoolsUiLabels.xml Mon Dec 23 09:26:58 2013
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
-<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz.properties.xsd">
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<property key="ConnectionPoolStatus">
<value xml:lang="en">Connection Pool Status</value>
<value xml:lang="ja">æ¥ç¶ãã¼ã«ã¹ãã¼ã¿ã¹</value>
@@ -1973,7 +1973,6 @@
<value xml:lang="en">eomodel Full Path is not write-able: ${eomodeldFullPath}</value>
<value xml:lang="it">eomodel path completo non è scrivibile: ${eomodeldFullPath}</value>
<value xml:lang="ja">EOMODELã®ãã«ãã¹ãæ¸ãè¾¼ã¿å¯è½ã§ã¯ããã¾ãã: ${eomodeldFullPath}</value>
- <value xml:lang="vi"></value>
<value xml:lang="zh">eomodel宿´è·¯å¾ä¸å¯åï¼${eomodeldFullPath}</value>
</property>
<property key="WebtoolsEomodelSavingFileError">
@@ -5340,14 +5339,8 @@
<value xml:lang="zh_TW">éè¡é¢ç·åæ¥</value>
</property>
<property key="WebtoolsTTL">
- <value xml:lang="de">TTL</value>
<value xml:lang="en">TTL</value>
<value xml:lang="fr">Péremption</value>
- <value xml:lang="it">TTL</value>
- <value xml:lang="ja">TTL</value>
- <value xml:lang="pt">TTL</value>
- <value xml:lang="th">TTL</value>
- <value xml:lang="vi">TTL</value>
<value xml:lang="zh">å卿¶é´</value>
</property>
<property key="WebtoolsTable">
@@ -5414,14 +5407,9 @@
<property key="WebtoolsThreadId">
<value xml:lang="de">ThreadID</value>
<value xml:lang="en">ID</value>
- <value xml:lang="fr">ID</value>
- <value xml:lang="it">ID</value>
- <value xml:lang="ja">ID</value>
- <value xml:lang="pt">ID</value>
<value xml:lang="th">รหัส</value>
<value xml:lang="vi">Id</value>
<value xml:lang="zh">æ è¯</value>
- <value xml:lang="zh_TW">ID</value>
</property>
<property key="WebtoolsThreadList">
<value xml:lang="de">Thread Liste</value>
Modified: ofbiz/branches/jackrabbit20120501/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Mon Dec 23 09:26:58 2013
@@ -43,8 +43,8 @@ import org.ofbiz.base.util.GeneralExcept
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.base.util.cache.UtilCache;
import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.config.model.DelegatorElement;
import org.ofbiz.entity.config.EntityConfigUtil;
+import org.ofbiz.entity.config.model.DelegatorElement;
import org.ofbiz.entity.model.ModelEntity;
import org.ofbiz.entity.model.ModelReader;
import org.ofbiz.service.DispatchContext;
@@ -144,7 +144,7 @@ public class ArtifactInfoFactory {
public void prepareAll() throws GeneralException {
Debug.logInfo("Loading artifact info objects...", module);
- List<Future<Void>> futures = new ArrayList();
+ List<Future<Void>> futures = new ArrayList<Future<Void>>();
Set<String> entityNames = this.getEntityModelReader().getEntityNames();
for (String entityName: entityNames) {
this.getEntityArtifactInfo(entityName);
@@ -158,7 +158,7 @@ public class ArtifactInfoFactory {
Collection<ComponentConfig> componentConfigs = ComponentConfig.getAllComponents();
ExecutionPool.getAllFutures(futures);
- futures = new ArrayList();
+ futures = new ArrayList<Future<Void>>();
for (ComponentConfig componentConfig: componentConfigs) {
futures.add(ExecutionPool.GLOBAL_EXECUTOR.submit(prepareTaskForComponentAnalysis(componentConfig)));
}
@@ -382,8 +382,10 @@ public class ArtifactInfoFactory {
}
// private methods
+ @SuppressWarnings("unchecked")
private Callable<Void> prepareTaskForServiceAnalysis(final String serviceName) {
return new Callable() {
+ @Override
public Callable<Void> call() throws Exception {
try {
getServiceArtifactInfo(serviceName);
@@ -395,8 +397,10 @@ public class ArtifactInfoFactory {
};
}
+ @SuppressWarnings("unchecked")
private Callable<Void> prepareTaskForComponentAnalysis(final ComponentConfig componentConfig) {
return new Callable() {
+ @Override
public Callable<Void> call() throws Exception {
String componentName = componentConfig.getGlobalName();
String rootComponentPath = componentConfig.getRootLocation();
Modified: ofbiz/branches/jackrabbit20120501/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20120501/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=1553086&r1=1553085&r2=1553086&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20120501/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/branches/jackrabbit20120501/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Mon Dec 23 09:26:58 2013
@@ -427,6 +427,7 @@ public class WidgetWorker {
}
}
+ @SuppressWarnings("unchecked")
public Map<String, String> getParametersMap(Map<String, Object> context, String defaultServiceName) {
Map<String, String> autServiceParams = FastMap.newInstance();
LocalDispatcher dispatcher = (LocalDispatcher) context.get("dispatcher");
@@ -492,6 +493,7 @@ public class WidgetWorker {
}
}
+ @SuppressWarnings("unchecked")
public Map<String, String> getParametersMap(Map<String, Object> context, String defaultEntityName) {
Map<String, String> autEntityParams = FastMap.newInstance();
Delegator delegator = (Delegator) context.get("delegator");