You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/14 23:03:18 UTC

svn commit: r1338421 - in /ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos: PosTransaction.java screen/PaidInOut.java

Author: doogie
Date: Mon May 14 21:03:17 2012
New Revision: 1338421

URL: http://svn.apache.org/viewvc?rev=1338421&view=rev
Log:
DEPRECATION: specialpurpose/pos: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.

Modified:
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
    ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=1338421&r1=1338420&r2=1338421&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Mon May 14 21:03:17 2012
@@ -329,7 +329,7 @@ public class PosTransaction implements S
             fields.put("maxAmount", inf.amount);
             fields.put("orderId", this.getOrderId());
 
-            List<GenericValue> paymentPrefs = session.getDelegator().findByAnd("OrderPaymentPreference", fields);
+            List<GenericValue> paymentPrefs = session.getDelegator().findByAnd("OrderPaymentPreference", fields, null, false);
             if (UtilValidate.isNotEmpty(paymentPrefs)) {
                 //Debug.logInfo("Found some prefs - " + paymentPrefs.size(), module);
                 if (paymentPrefs.size() > 1) {
@@ -701,7 +701,7 @@ public class PosTransaction implements S
         Map<String, String> fields = UtilMisc.toMap("paymentMethodTypeId", paymentMethodTypeId, "productStoreId", productStoreId);
         List<GenericValue> values = null;
         try {
-            values = session.getDelegator().findByAndCache("ProductStorePaymentSetting", fields);
+            values = session.getDelegator().findByAnd("ProductStorePaymentSetting", fields, null, true);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -1136,7 +1136,7 @@ public class PosTransaction implements S
         Delegator delegator = session.getDelegator();
         List<GenericValue> states = null;
         try {
-            states = delegator.findByAnd("PosTerminalState", UtilMisc.toMap("posTerminalId", this.getTerminalId()));
+            states = delegator.findByAnd("PosTerminalState", UtilMisc.toMap("posTerminalId", this.getTerminalId()), null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }
@@ -1809,7 +1809,7 @@ public class PosTransaction implements S
 
             Boolean newLogin = true;
             try {
-                List<GenericValue>  userLogins = session.getDelegator().findByAnd("UserLogin", UtilMisc.toMap("partyId", partyId));
+                List<GenericValue>  userLogins = session.getDelegator().findByAnd("UserLogin", UtilMisc.toMap("partyId", partyId), null, false);
                 if (UtilValidate.isNotEmpty(userLogins)) {
                     userLogin = userLogins.get(0);
                     newLogin = false;
@@ -1857,7 +1857,7 @@ public class PosTransaction implements S
                     svcCtx.put("partyId", partyId);
                     svcCtx.put("thruDate", null); // last one
                     try {
-                        List<GenericValue>  PartyTelecomNumbers = session.getDelegator().findByAnd("PartyAndTelecomNumber", svcCtx);
+                        List<GenericValue>  PartyTelecomNumbers = session.getDelegator().findByAnd("PartyAndTelecomNumber", svcCtx, null, false);
                         if (UtilValidate.isNotEmpty(PartyTelecomNumbers)) {
                             GenericValue PartyTelecomNumber = PartyTelecomNumbers.get(0); // There is  only one phone number (contactMechPurposeTypeId == "PHONE_HOME")
                             contactNumber = PartyTelecomNumber.getString("contactNumber");
@@ -1933,7 +1933,7 @@ public class PosTransaction implements S
                 String contactMechId = null;
                 String infoString = null;
                 try {
-                    List<GenericValue>  PartyEmails = session.getDelegator().findByAnd("PartyAndContactMech", svcCtx);
+                    List<GenericValue>  PartyEmails = session.getDelegator().findByAnd("PartyAndContactMech", svcCtx, null, false);
                     if (UtilValidate.isNotEmpty(PartyEmails)) {
                         GenericValue PartyEmail = PartyEmails.get(0); // There is  only one email address (contactMechPurposeTypeId == "PRIMARY_EMAIL")
                         contactMechId = PartyEmail.getString("contactMechId");

Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java?rev=1338421&r1=1338420&r2=1338421&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/PaidInOut.java Mon May 14 21:03:17 2012
@@ -98,14 +98,14 @@ public class PaidInOut extends XPage {
         if (m_type.equals("IN")) {
             m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PosPaidInTitle", locale));
             try {
-                posPaidReasons = m_trans.getSession().getDelegator().findByAndCache("Enumeration", UtilMisc.toMap("enumTypeId", "POS_PAID_REASON_IN"));
+                posPaidReasons = m_trans.getSession().getDelegator().findByAnd("Enumeration", UtilMisc.toMap("enumTypeId", "POS_PAID_REASON_IN"), null, true);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);
             }
         } else { // OUT
             m_dialog.setCaption(UtilProperties.getMessage(PosTransaction.resource, "PosPaidOutTitle", locale));
             try {
-                posPaidReasons = m_trans.getSession().getDelegator().findByAndCache("Enumeration", UtilMisc.toMap("enumTypeId", "POS_PAID_REASON_OUT"));
+                posPaidReasons = m_trans.getSession().getDelegator().findByAnd("Enumeration", UtilMisc.toMap("enumTypeId", "POS_PAID_REASON_OUT"), null, true);
             } catch (GenericEntityException e) {
                 Debug.logError(e, module);            }
         }