From ff6b2bff61f4ec6c4b22da96c79265f7b6c53b36 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 5 Dec 2008 16:14:44 +0000 Subject: [PATCH] Important -> SQL keywords must go uppercase Minor -> indentation, organize imports --- base/src/org/compiere/model/MShipper.java | 38 ++++++++++++----------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/base/src/org/compiere/model/MShipper.java b/base/src/org/compiere/model/MShipper.java index 3ffbaab740..841635caca 100644 --- a/base/src/org/compiere/model/MShipper.java +++ b/base/src/org/compiere/model/MShipper.java @@ -1,5 +1,5 @@ /****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * + * Product: Adempiere ERP & CRM Smart Business Solution * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * * under the terms version 2 of the GNU General Public License as published * @@ -16,9 +16,11 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.*; -import java.util.*; -import org.compiere.util.*; +import java.sql.ResultSet; +import java.util.List; +import java.util.Properties; + +import org.compiere.util.Env; /** @@ -52,19 +54,19 @@ public class MShipper extends X_M_Shipper } // MShipper - /** - * @param ctx - * @param FreightCategory_ID - * @param trxName - * @return A list of shippers having the given freight category - */ - public static List getShippersForFreightCategory(Properties ctx, int FreightCategory_ID, String trxName) { - Query q = new Query(ctx, MShipper.Table_Name, - "M_Shipper.AD_Client_ID=? and M_Shipper.AD_Org_ID in (0,?) and M_Shipper_ID " + - "in (select M_Shipper_ID from M_Freight where M_FreightCategory_ID=?)", trxName); - q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx), FreightCategory_ID}); - List result = q.list(); - return(result); - } + /** + * @param ctx + * @param FreightCategory_ID + * @param trxName + * @return A list of shippers having the given freight category + */ + public static List getShippersForFreightCategory(Properties ctx, int FreightCategory_ID, String trxName) { + Query q = new Query(ctx, MShipper.Table_Name, + "M_Shipper.AD_Client_ID=? AND M_Shipper.AD_Org_ID IN (0,?) AND M_Shipper_ID " + + "IN (SELECT M_Shipper_ID FROM M_Freight WHERE M_FreightCategory_ID=?)", trxName); + q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx), FreightCategory_ID}); + List result = q.list(); + return(result); + } } // MShipper