From 8c3b57ab2c72ab6e2ce4ff837a8147fa881af395 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Thu, 11 Dec 2008 06:26:42 +0000 Subject: [PATCH] MProduct: * fixed indentation * minor improvement --- base/src/org/compiere/model/MProduct.java | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/base/src/org/compiere/model/MProduct.java b/base/src/org/compiere/model/MProduct.java index 6ca2b5b846..9527828c60 100644 --- a/base/src/org/compiere/model/MProduct.java +++ b/base/src/org/compiere/model/MProduct.java @@ -87,21 +87,21 @@ public class MProduct extends X_M_Product .list(); return list.toArray(new MProduct[list.size()]); } // get - - + + /** - * Get MProduct using UPC/EAN (case sensitive) - * @param ctx Context - * @param upc The upc to look for - * @return List of MProduct - * - */ - public static List getByUPC(Properties ctx, String upc, String trxName) { - String whereClause = "AD_Client_ID=? AND UPC=?"; - Query q = new Query(ctx, Table_Name, whereClause, trxName); - q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), upc}); - return(q.list()); - } + * Get MProduct using UPC/EAN (case sensitive) + * @param ctx Context + * @param upc The upc to look for + * @return List of MProduct + */ + public static List getByUPC(Properties ctx, String upc, String trxName) + { + String whereClause = "AD_Client_ID=? AND UPC=?"; + Query q = new Query(ctx, Table_Name, whereClause, trxName); + q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), upc}); + return(q.list()); + } /** * Is Product Stocked @@ -116,7 +116,7 @@ public class MProduct extends X_M_Product } // isProductStocked /** Cache */ - private static CCache s_cache = new CCache("M_Product", 40, 5); // 5 minutes + private static CCache s_cache = new CCache(Table_Name, 40, 5); // 5 minutes /************************************************************************** * Standard Constructor