empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1298175 - in /empire-db/trunk: empire-db-codegen/src/main/java/org/apache/empire/db/codegen/ empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/ empire-db-examples/empire-db-example-basic/src/...
Date Wed, 07 Mar 2012 22:34:39 GMT
Author: doebele
Date: Wed Mar  7 22:34:38 2012
New Revision: 1298175

URL: http://svn.apache.org/viewvc?rev=1298175&view=rev
Log:
EMPIREDB-126
javadoc and return optimization

Modified:
    empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
    empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
    empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
    empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
    empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/SampleTable.java
    empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
    empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
    empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java

Modified: empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
(original)
+++ empire-db/trunk/empire-db-codegen/src/main/java/org/apache/empire/db/codegen/CodeGenConfig.java
Wed Mar  7 22:34:38 2012
@@ -223,10 +223,7 @@ public class CodeGenConfig extends XMLCo
 	/**
 	 * Initialize the configuration.
 	 * 
-	 * @param filename
-	 *            the file to read
-	 * 
-	 * @return true on success
+	 * @param filename the file to read
 	 */
 	public void init(String filename) {
 		// Read the properties file

Modified: empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvConfig.java
Wed Mar  7 22:34:38 2012
@@ -56,8 +56,6 @@ public class SampleAdvConfig extends XML
      * Initialize the configuration.
      * 
      * @param filename the file to load 
-     * 
-     * @return true on success 
      */
     public void init(String filename)
     {

Modified: empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-basic/src/main/java/org/apache/empire/samples/db/SampleConfig.java
Wed Mar  7 22:34:38 2012
@@ -55,8 +55,6 @@ public class SampleConfig extends XMLCon
      * Initialize the configuration.
      * 
      * @param filename the file to read
-     * 
-     * @return true on success
      */
     public void init(String filename)
     {

Modified: empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-cxf/src/main/java/org/apache/empire/samples/cxf/wssample/server/SampleConfig.java
Wed Mar  7 22:34:38 2012
@@ -38,8 +38,6 @@ public class SampleConfig extends XMLCon
 	 * Initialize the configuration
 	 * 
 	 * @param filename the file
-	 * 
-	 * @return true on success
 	 */
 	public void init(String filename) {
 		// Read the properties file

Modified: empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/SampleTable.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/SampleTable.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/SampleTable.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/SampleTable.java
Wed Mar  7 22:34:38 2012
@@ -40,7 +40,7 @@ public class SampleTable extends DBTable
     }
 
     @Override
-    protected void addColumn(DBTableColumn column)
+    protected DBTableColumn addColumn(DBTableColumn column)
     {
         // Set Translation Title
         String col = column.getBeanPropertyName();  
@@ -53,6 +53,6 @@ public class SampleTable extends DBTable
         column.setControlType((type==DataType.BOOL) ? "checkbox" : "text");
 
         // Add Column
-        super.addColumn(column);
+        return super.addColumn(column);
     }
 }

Modified: empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/db/SampleTable.java
Wed Mar  7 22:34:38 2012
@@ -40,7 +40,7 @@ public class SampleTable extends DBTable
     }
 
     @Override
-    protected void addColumn(DBTableColumn column)
+    protected DBTableColumn addColumn(DBTableColumn column)
     {
         // Set Translation Title
         String col = column.getBeanPropertyName();  
@@ -53,6 +53,6 @@ public class SampleTable extends DBTable
         column.setControlType((type==DataType.BOOL) ? "checkbox" : "text");
 
         // Add Column
-        super.addColumn(column);
+        return super.addColumn(column);
     }
 }

Modified: empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-struts2/src/main/java/org/apache/empire/struts2/websample/web/SampleConfig.java
Wed Mar  7 22:34:38 2012
@@ -38,8 +38,6 @@ public class SampleConfig extends XMLCon
 	 * Initialize the configuration
 	 * 
 	 * @param filename the file to read 
-	 * 
-	 * @return true on success 
 	 */
 	public void init(String filename) {
 		// Read the properties file

Modified: empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java
(original)
+++ empire-db/trunk/empire-db-struts2/src/main/java/org/apache/empire/struts2/jsp/components/CalendarComponent.java
Wed Mar  7 22:34:38 2012
@@ -20,14 +20,12 @@ package org.apache.empire.struts2.jsp.co
 
 import java.io.StringWriter;
 import java.io.Writer;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.empire.commons.Attributes;
 import org.apache.empire.commons.StringUtils;
 import org.apache.empire.struts2.html.HtmlWriter;
 import org.apache.empire.struts2.html.HtmlWriter.HtmlTag;
@@ -37,6 +35,8 @@ import org.apache.struts2.components.Com
 import org.apache.struts2.components.UIBean;
 import org.apache.struts2.components.UrlProvider;
 import org.apache.struts2.components.UrlRenderer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.util.ValueStack;
@@ -253,7 +253,7 @@ public class CalendarComponent extends U
         Map<String, Object> paramMap = null;
         if (param != null)
         {
-            paramMap = new Attributes();
+            paramMap = new LinkedHashMap<String, Object>();
             paramMap.put(param, value);
         }
         // Render Link now

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java Wed Mar 
7 22:34:38 2012
@@ -420,12 +420,11 @@ public abstract class DBDatabase extends
 
     /**
      * Adds a DBTable object to list of database tables.<BR>
-     * There is usually no need to call this function directly 
-     * since it is internally called from the DBTable's constructor.
+     * This function is called internally from the DBTable's constructor.
      * <P> 
      * @param table the DBTable object
      */
-    public void addTable(DBTable table)
+    void addTable(DBTable table)
     { // find column by name
         if (table == null || table.getDatabase() != this)
             throw new InvalidArgumentException("table", table);
@@ -510,7 +509,7 @@ public abstract class DBDatabase extends
      * @param name the relation name
      * @param references a list of source and target column pairs
      */
-    public void addRelation(String name, DBRelation.DBReference[] references)
+    public DBRelation addRelation(String name, DBRelation.DBReference[] references)
     {
     	// Check
     	if (getRelation(name)!=null)
@@ -527,6 +526,7 @@ public abstract class DBDatabase extends
         }
         // OK
         relations.add(relation);
+        return relation;
     }
 
     /**
@@ -557,12 +557,11 @@ public abstract class DBDatabase extends
 
     /**
      * Adds a DBView object to list of database views.<BR>
-     * There is usually no need to call this function directly 
-     * since it is internally called from the DBView's constructor.
+     * This function is called internally from the DBView's constructor.
      * <P> 
      * @param view the DBView object
      */
-    public void addView(DBView view)
+    void addView(DBView view)
     { // find column by name
         if (view == null || view.getDatabase() != this)
             throw new InvalidArgumentException("view", view);

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java Wed Mar  7 22:34:38
2012
@@ -179,7 +179,7 @@ public class DBTable extends DBRowSet im
      * 
      * @param column a column object
      */
-    protected void addColumn(DBTableColumn column)
+    protected DBTableColumn addColumn(DBTableColumn column)
     { // find column by name
         if (column==null || column.getRowSet()!=this)
             throw new InvalidArgumentException("column", column);
@@ -187,6 +187,7 @@ public class DBTable extends DBRowSet im
             throw new ItemExistsException(column.getName());
         // add now
         columns.add(column);
+        return column;
     }
 
     /**
@@ -326,7 +327,7 @@ public class DBTable extends DBRowSet im
      * 
      * @param index the index to add
      */
-    public void addIndex(DBIndex index)
+    public DBIndex addIndex(DBIndex index)
     {
         if (index==null)
             throw new InvalidArgumentException("index", null);
@@ -342,6 +343,7 @@ public class DBTable extends DBRowSet im
         // add Index now
         indexes.add(index);
         index.setTable(this);
+        return index;
     }
 
     /**
@@ -353,7 +355,7 @@ public class DBTable extends DBRowSet im
      * 
      * @return the Index object
      */
-    public DBIndex addIndex(String name, boolean unique, DBColumn[] columns)
+    public final DBIndex addIndex(String name, boolean unique, DBColumn[] columns)
     {
         if (name==null || columns==null || columns.length==0)
             throw new InvalidArgumentException("name|columns", null);

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java?rev=1298175&r1=1298174&r2=1298175&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBView.java Wed Mar  7 22:34:38
2012
@@ -285,7 +285,7 @@ public abstract class DBView extends DBR
      * @param col a view column object
      * @return true if the column was successfully added or false otherwise
      */
-    protected void addColumn(DBViewColumn col)
+    protected DBViewColumn addColumn(DBViewColumn col)
     { // find column by name
         if (col == null || col.getRowSet() != this)
             throw new InvalidArgumentException("col", col);
@@ -293,6 +293,7 @@ public abstract class DBView extends DBR
             throw new ItemExistsException(col.getName());
         // add now
         columns.add(col);
+        return col;
     }
 
     /**



Mime
View raw message