From: Jorg J. <jj...@us...> - 2005-02-12 07:50:10
|
Update of /cvsroot/compiere/dbPort/src/org/compiere/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19837/src/org/compiere/util Modified Files: Msg.java GenerateModel.java CCache.java CacheMgt.java CacheInterface.java Log Message: Index: Msg.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/Msg.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Msg.java 10 Feb 2005 06:47:40 -0000 1.19 --- Msg.java 12 Feb 2005 07:49:58 -0000 1.20 *************** *** 554,557 **** --- 554,559 ---- public static String translate(Properties ctx, String text) { + if (text == null || text.length() == 0) + return text; String s = (String)ctx.get(text); if (s != null && s.length() > 0) Index: GenerateModel.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/GenerateModel.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** GenerateModel.java 22 Jan 2005 22:01:25 -0000 1.34 --- GenerateModel.java 12 Feb 2005 07:49:58 -0000 1.35 *************** *** 111,115 **** + "import java.math.*;" + "import org.compiere.util.*;" ! // Constructor + "/** Generated Model for ").append(tableName).append("\n" + " * @author Jorg Janke (generated) \n" --- 111,115 ---- + "import java.math.*;" + "import org.compiere.util.*;" ! // Class + "/** Generated Model for ").append(tableName).append("\n" + " * @author Jorg Janke (generated) \n" *************** *** 117,128 **** + "public class ").append(className).append(" extends PO" + "{" ! // + "/** Standard Constructor */\n" ! + "public ").append(className).append(" (Properties ctx, int ").append(keyColumn).append(")" + "{" ! + "super (ctx, ").append(keyColumn).append(");" + "/** if (").append(keyColumn).append(" == 0)" + "{").append(mandatory).append("} */\n" + "}" // Constructor End // Load Constructor + "/** Load Constructor */\n" --- 117,136 ---- + "public class ").append(className).append(" extends PO" + "{" ! // Standard Constructor + "/** Standard Constructor */\n" ! + "public ").append(className).append(" (Properties ctx, int ").append(keyColumn) ! .append(", String trxName)" + "{" ! + "super (ctx, ").append(keyColumn).append(", trxName);" + "/** if (").append(keyColumn).append(" == 0)" + "{").append(mandatory).append("} */\n" + "}" // Constructor End + // Short Constructor + + "/** Short Constructor */\n" + + "public ").append(className).append(" (Properties ctx, int ").append(keyColumn).append(")" + + "{" + + "this (ctx, ").append(keyColumn).append(", null);" + + "}" // Constructor End + // Load Constructor + "/** Load Constructor */\n" Index: CCache.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/CCache.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CCache.java 5 Jan 2005 04:27:20 -0000 1.12 --- CCache.java 12 Feb 2005 07:49:58 -0000 1.13 *************** *** 150,154 **** return "CCache[" + m_name + ",Exp=" + getExpireMinutes() ! + ", #" + size() + "]"; } // toString --- 150,154 ---- return "CCache[" + m_name + ",Exp=" + getExpireMinutes() ! + ", #" + super.size() + "]"; } // toString Index: CacheMgt.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/CacheMgt.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CacheMgt.java 14 Jan 2005 07:24:05 -0000 1.10 --- CacheMgt.java 12 Feb 2005 07:49:58 -0000 1.11 *************** *** 105,116 **** { CacheInterface stored = (CacheInterface)m_instances.get(i); ! if (stored != null) { ! log.fine("reset - " + stored); total += stored.reset(); counter++; } } ! log.info("reset #" + counter + " (" + total + ")"); return total; } // reset --- 105,116 ---- { CacheInterface stored = (CacheInterface)m_instances.get(i); ! if (stored != null && stored.size() > 0) { ! log.fine(stored.toString()); total += stored.reset(); counter++; } } ! log.info("#" + counter + " (" + total + ")"); return total; } // reset *************** *** 153,157 **** // if (Record_ID == 0) { ! log.fine("reset (all) - " + stored); total += stored.reset(); counter++; --- 153,157 ---- // if (Record_ID == 0) { ! log.fine("(all) - " + stored); total += stored.reset(); counter++; *************** *** 160,164 **** } } ! log.info("reset " + tableName + ": #" + counter + " (" + total + ")"); // Update Server if (DB.isRemoteObjects()) --- 160,164 ---- } } ! log.info(tableName + ": #" + counter + " (" + total + ")"); // Update Server if (DB.isRemoteObjects()) *************** *** 176,180 **** catch (RemoteException ex) { ! log.log(Level.SEVERE, "cacheReset - AppsServer error", ex); } } --- 176,180 ---- catch (RemoteException ex) { ! log.log(Level.SEVERE, "AppsServer error", ex); } } Index: CacheInterface.java =================================================================== RCS file: /cvsroot/compiere/dbPort/src/org/compiere/util/CacheInterface.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CacheInterface.java 5 Jan 2005 04:27:33 -0000 1.5 --- CacheInterface.java 12 Feb 2005 07:49:58 -0000 1.6 *************** *** 28,30 **** --- 28,37 ---- public int reset(); + /** + * Get Size of Cache + * @return number of items + */ + public int size(); + + } // CacheInterface |