Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/cart/ShowCart.groovy Mon Jan 5 08:50:30 2015 @@ -35,7 +35,7 @@ if (webPosSession) { context.person = null; if (UtilValidate.isNotEmpty(shoppingCart)) { - placingCustomerParty = delegator.findOne("PartyAndPerson", [partyId : shoppingCart.getPlacingCustomerPartyId()], false); + placingCustomerParty = from("PartyAndPerson").where("partyId", shoppingCart.getPlacingCustomerPartyId()).queryOne(); if (UtilValidate.isNotEmpty(placingCustomerParty)) { context.person = placingCustomerParty.lastName + " " + placingCustomerParty.firstName; } @@ -79,7 +79,7 @@ if (shoppingCart) { context.shoppingCartSize = 0; } -context.paymentCash = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "CASH"], true); -context.paymentCheck = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "PERSONAL_CHECK"], true); -context.paymentGift = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "GIFT_CARD"], true); -context.paymentCredit = delegator.findOne("PaymentMethodType", ["paymentMethodTypeId" : "CREDIT_CARD"], true); \ No newline at end of file +context.paymentCash = from("PaymentMethodType").where("paymentMethodTypeId" : "CASH").cache(true).queryOne(); +context.paymentCheck = from("PaymentMethodType").where("paymentMethodTypeId" : "PERSONAL_CHECK").cache(true).queryOne(); +context.paymentGift = from("PaymentMethodType").where("paymentMethodTypeId" : "GIFT_CARD").cache(true).queryOne(); +context.paymentCredit = from("PaymentMethodType").where("paymentMethodTypeId" : "CREDIT_CARD").cache(true).queryOne(); \ No newline at end of file Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/Category.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/Category.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/Category.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/catalog/Category.groovy Mon Jan 5 08:50:30 2015 @@ -36,7 +36,7 @@ if (!(productCategoryId) && request.getA productCategoryId = request.getAttribute("topCategoryId"); } -category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryId], true); +category = from("ProductCategory").where("productCategoryId", productCategoryId).cache(true).queryOne(); if (category) { if (category.detailScreen) { detailScreen = category.detailScreen; Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/customer/EditAddress.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/customer/EditAddress.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/customer/EditAddress.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/customer/EditAddress.groovy Mon Jan 5 08:50:30 2015 @@ -17,14 +17,14 @@ * under the License. */ -person = delegator.findOne("Person", [partyId : parameters.partyId], false); +person = from("Person").where("partyId", parameters.partyId).queryOne(); if (person) { request.setAttribute("lastName", person.lastName); request.setAttribute("firstName", person.firstName); request.setAttribute("partyId", parameters.partyId); } -contactMech = delegator.findOne("ContactMech", [contactMechId : parameters.contactMechId], false); +contactMech = from("ContactMech").where("contactMechId", parameters.contactMechId).queryOne(); if (contactMech) { postalAddress = contactMech.getRelatedOne("PostalAddress", false); if (postalAddress) { @@ -37,11 +37,11 @@ if (contactMech) { request.setAttribute("postalCode", postalAddress.postalCode); request.setAttribute("stateProvinceGeoId", postalAddress.stateProvinceGeoId); request.setAttribute("countryGeoId", postalAddress.countryGeoId); - stateProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.stateProvinceGeoId], false); + stateProvinceGeo = from("Geo").where("geoId", postalAddress.stateProvinceGeoId).queryOne(); if (stateProvinceGeo) { request.setAttribute("stateProvinceGeo", stateProvinceGeo.get("geoName", locale)); } - countryProvinceGeo = delegator.findOne("Geo", [geoId : postalAddress.countryGeoId], false); + countryProvinceGeo = from("Geo").where("geoId", postalAddress.countryGeoId).queryOne(); if (countryProvinceGeo) { request.setAttribute("countryProvinceGeo", countryProvinceGeo.get("geoName", locale)); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/manager/PaidOutAndIn.groovy Mon Jan 5 08:50:30 2015 @@ -19,5 +19,5 @@ import org.ofbiz.entity.condition.*; -context.paidReasonIn = delegator.findList("Enumeration", EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "POS_PAID_REASON_IN") , null, ["sequenceId"], null, false); -context.paidReasonOut = delegator.findList("Enumeration", EntityCondition.makeCondition("enumTypeId", EntityOperator.EQUALS, "POS_PAID_REASON_OUT"), null, ["sequenceId"], null, false); +context.paidReasonIn = from("Enumeration").where("enumTypeId", "POS_PAID_REASON_IN").orderBy("sequenceId").queryList(); +context.paidReasonOut = from("Enumeration").where("enumTypeId", "POS_PAID_REASON_OUT").orderBy("sequenceId").queryList(); Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/CustomerAddress.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/CustomerAddress.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/CustomerAddress.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/CustomerAddress.groovy Mon Jan 5 08:50:30 2015 @@ -24,22 +24,22 @@ if (webPosSession) { shoppingCart = webPosSession.getCart(); shipToCustomerPartyId = shoppingCart.getShipToCustomerPartyId(); if (UtilValidate.isNotEmpty(shipToCustomerPartyId)) { - context.personShipTo = delegator.findOne("Person", [partyId : shipToCustomerPartyId], false); + context.personShipTo = from("Person").where("partyId", shipToCustomerPartyId).queryOne(); } shippingContactMechId = shoppingCart.getContactMech("SHIPPING_LOCATION"); if (UtilValidate.isNotEmpty(shippingContactMechId)) { - contactMech = delegator.findOne("ContactMech", [contactMechId : shippingContactMechId], false); + contactMech = from("ContactMech").where("contactMechId", shippingContactMechId).queryOne(); if (UtilValidate.isNotEmpty(contactMech) && "POSTAL_ADDRESS".equals(contactMech.contactMechTypeId)) { context.shippingPostalAddress = contactMech.getRelatedOne("PostalAddress", false); } } billToCustomerPartyId = shoppingCart.getBillToCustomerPartyId(); if (UtilValidate.isNotEmpty(billToCustomerPartyId)) { - context.personBillTo = delegator.findOne("Person", [partyId : billToCustomerPartyId], false); + context.personBillTo = from("Person").where("partyId", billToCustomerPartyId).queryOne(); } billingContactMechId = shoppingCart.getContactMech("BILLING_LOCATION"); if (UtilValidate.isNotEmpty(billingContactMechId)) { - contactMech = delegator.findOne("ContactMech", [contactMechId : billingContactMechId], false); + contactMech = from("ContactMech").where("contactMechId", billingContactMechId).queryOne(); if (UtilValidate.isNotEmpty(contactMech) && "POSTAL_ADDRESS".equals(contactMech.contactMechTypeId)) { context.billingPostalAddress = contactMech.getRelatedOne("PostalAddress", false); } Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/SearchSalesReps.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/SearchSalesReps.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff ============================================================================== --- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/SearchSalesReps.groovy (original) +++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/specialpurpose/webpos/webapp/webpos/WEB-INF/actions/search/SearchSalesReps.groovy Mon Jan 5 08:50:30 2015 @@ -20,11 +20,7 @@ import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.condition.EntityOperator; -List partyRoleCond = []; -List orderBy = ["lastName", "firstName"]; - -partyRoleCond.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SALES_REP")); -context.salesReps = delegator.findList("PartyRoleNameDetail", EntityCondition.makeCondition(partyRoleCond, EntityOperator.AND), null, orderBy, null, false); +context.salesReps = from("PartyRoleNameDetail").where("roleTypeId", "SALES_REP").orderBy("lastName", "firstName").queryList(); shoppingCart = session.getAttribute("shoppingCart"); if (shoppingCart) { |
Free forum by Nabble | Edit this page |