You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tv...@apache.org on 2010/10/31 21:08:29 UTC

svn commit: r1029481 - in /db/torque/village/trunk/src/java/com/workingdogs/village: Column.java DataSet.java QueryDataSet.java Record.java Schema.java SelectStmt.java TableDataSet.java Value.java package.html

Author: tv
Date: Sun Oct 31 20:08:29 2010
New Revision: 1029481

URL: http://svn.apache.org/viewvc?rev=1029481&view=rev
Log:
Cleanup CheckStyle and PMD errors, removed some more obsolete stuff

Added:
    db/torque/village/trunk/src/java/com/workingdogs/village/package.html   (with props)
Removed:
    db/torque/village/trunk/src/java/com/workingdogs/village/SelectStmt.java
Modified:
    db/torque/village/trunk/src/java/com/workingdogs/village/Column.java
    db/torque/village/trunk/src/java/com/workingdogs/village/DataSet.java
    db/torque/village/trunk/src/java/com/workingdogs/village/QueryDataSet.java
    db/torque/village/trunk/src/java/com/workingdogs/village/Record.java
    db/torque/village/trunk/src/java/com/workingdogs/village/Schema.java
    db/torque/village/trunk/src/java/com/workingdogs/village/TableDataSet.java
    db/torque/village/trunk/src/java/com/workingdogs/village/Value.java

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/Column.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/Column.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/Column.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/Column.java Sun Oct 31 20:08:29 2010
@@ -78,7 +78,7 @@ public class Column
         this.columnType = rsmd.getColumnType(colNum);
         this.nullAllowed = rsmd.isNullable(colNum) == 1;
     }
-    
+
     /**
      * internal package method for populating a Column instance
      *
@@ -89,7 +89,7 @@ public class Column
      * @param isNullable true if NULL allowed.
      *
      */
-    public void populate(String tableName, String columnName, String columnTypeName, 
+    public void populate(String tableName, String columnName, String columnTypeName,
             int columnType, boolean isNullable)
     {
         this.name = columnName;
@@ -97,7 +97,7 @@ public class Column
         this.columnType = columnType;
         this.nullAllowed = isNullable;
     }
-    
+
     /**
      * the name of the column
      *

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/DataSet.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/DataSet.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/DataSet.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/DataSet.java Sun Oct 31 20:08:29 2010
@@ -341,40 +341,40 @@ public abstract class DataSet
     {
         releaseRecords();
         this.schema = null;
-        
+
         SQLException sqlEx = null;
 
-        try 
+        try
         {
-			if (this.resultSet != null)
-			{
-			    resultSet().close();
-			}
-		}
+            if (this.resultSet != null)
+            {
+                resultSet().close();
+            }
+        }
         catch (SQLException e)
         {
-			sqlEx = e;
-		}
+            sqlEx = e;
+        }
 
-		this.resultSet = null;
+        this.resultSet = null;
 
-        try 
+        try
         {
-			if (this.stmt != null)
-			{
-			    this.stmt.close();
-			}
-		} 
-        catch (SQLException e) 
-		{
-			sqlEx = e;
-		}
+            if (this.stmt != null)
+            {
+                this.stmt.close();
+            }
+        }
+        catch (SQLException e)
+        {
+            sqlEx = e;
+        }
 
         this.conn = null;
-        
+
         if (sqlEx != null)
         {
-        	throw sqlEx;
+            throw sqlEx;
         }
     }
 
@@ -690,28 +690,6 @@ public abstract class DataSet
     }
 
     /**
-     * Calculates the maxColumnWidths for the column in a DataSet I really don't know what this is used for so it isn't
-     * implemented.
-     *
-     * @param with_heading
-     *
-     * @return int
-     *
-     * @exception DataSetException
-     * @exception SQLException
-     */
-    public int [] maxColumnWidths(boolean with_heading)
-            throws DataSetException, SQLException
-    {
-        if (schema() == null)
-        {
-            throw new DataSetException("Schema is null!");
-        }
-
-        throw new DataSetException("Not yet implemented!");
-    }
-
-    /**
      * Classes extending this class must implement this method.
      *
      * @return the select string

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/QueryDataSet.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/QueryDataSet.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/QueryDataSet.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/QueryDataSet.java Sun Oct 31 20:08:29 2010
@@ -76,7 +76,7 @@ public class QueryDataSet
         this.conn = conn;
 
         selectString = new StringBuffer(selectStmt);
-        
+
         boolean ok = false;
         try
         {
@@ -85,7 +85,7 @@ public class QueryDataSet
             schema = new Schema();
             schema.populate(resultSet.getMetaData(), null, conn);
             ok = true;
-        } 
+        }
         finally
         {
             if (!ok)

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/Record.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/Record.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/Record.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/Record.java Sun Oct 31 20:08:29 2010
@@ -1494,7 +1494,7 @@ public class Record
 
         PreparedStatement stmt = null;
         ResultSet rs = null;
-        
+
         try
         {
             stmt = connection.prepareStatement(getRefreshQueryString());
@@ -1522,8 +1522,8 @@ public class Record
         }
         finally
         {
-        	SQLException sqlEx = null;
-        	
+            SQLException sqlEx = null;
+
             try
             {
                 if (rs != null)
@@ -1535,7 +1535,7 @@ public class Record
             {
                 sqlEx = e2;
             }
-            
+
             try
             {
                 if (stmt != null)
@@ -1547,10 +1547,10 @@ public class Record
             {
                 sqlEx = e2;
             }
-            
+
             if (sqlEx != null)
             {
-            	throw sqlEx;
+                throw sqlEx;
             }
         }
     }

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/Schema.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/Schema.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/Schema.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/Schema.java Sun Oct 31 20:08:29 2010
@@ -80,14 +80,14 @@ public final class Schema
 
     /**
      * Initialize all table schemas reachable from this connection
-     * 
+     *
      * @param conn a database connection
      * @throws SQLException if retrieving the database meta data is unsuccessful
      */
     public static void initSchemas(Connection conn) throws SQLException
     {
         ResultSet allCol = null;
-        
+
         try
         {
             DatabaseMetaData databaseMetaData  = conn.getMetaData();
@@ -95,10 +95,10 @@ public final class Schema
             allCol = databaseMetaData.getColumns(
                     conn.getCatalog(), null, null, null);
 
-            while(true)
+            while (true)
             {
                 Schema schema = new Schema();
-                
+
                 schema.setAttributes("*");
                 schema.singleTable = true;
                 schema.populate(allCol);
@@ -106,7 +106,7 @@ public final class Schema
                 if (schema.numberOfColumns > 0)
                 {
                     String keyValue = connURL + schema.tableName;
-                    
+
                     synchronized (schemaCache)
                     {
                         schemaCache.put(keyValue, schema);
@@ -129,11 +129,11 @@ public final class Schema
                 catch (SQLException e)
                 {
                     //Do nothing
-                }               
+                }
             }
         }
     }
-    
+
     /**
      * Creates a Schema with all columns
      *
@@ -175,38 +175,38 @@ public final class Schema
 
         try
         {
-        	Schema tableSchema = null;
+            Schema tableSchema = null;
             String keyValue = conn.getMetaData().getURL() + tableName;
-        	
-        	synchronized (schemaCache)
-        	{
-	            tableSchema = (Schema) schemaCache.get(keyValue);
-	
-	            if (tableSchema == null)
-	            {
-	            	String sql = "SELECT " + columnsAttribute + " FROM " + tableName + " WHERE 1 = -1";
-	
-	            	/*
-	            	 *  prepare dummy query as recommended by John Goodson in
-	            	 *  http://www.theserverside.com/news/1365579/Using-Database-MetaData-methods-appropriately 
-	            	 */
-	            	stmt = conn.prepareStatement(sql);
-	
-	            	// query is never executed on the server - only prepared
-	                if (stmt != null)
-	                {
-	                    tableSchema = this;
-	                    tableSchema.setTableName(tableName);
-	                    tableSchema.setAttributes(columnsAttribute);
-	                    tableSchema.populate(stmt.getMetaData(), tableName, null);
-	                    schemaCache.put(keyValue, tableSchema);
-	                }
-	                else
-	                {
-	                    throw new DataSetException("Couldn't retrieve schema for " + tableName);
-	                }
-	            }
-        	}
+
+            synchronized (schemaCache)
+            {
+                tableSchema = (Schema) schemaCache.get(keyValue);
+
+                if (tableSchema == null)
+                {
+                    String sql = "SELECT " + columnsAttribute + " FROM " + tableName + " WHERE 1 = -1";
+
+                    /*
+                     *  prepare dummy query as recommended by John Goodson in
+                     *  http://www.theserverside.com/news/1365579/Using-Database-MetaData-methods-appropriately
+                     */
+                    stmt = conn.prepareStatement(sql);
+
+                    // query is never executed on the server - only prepared
+                    if (stmt != null)
+                    {
+                        tableSchema = this;
+                        tableSchema.setTableName(tableName);
+                        tableSchema.setAttributes(columnsAttribute);
+                        tableSchema.populate(stmt.getMetaData(), tableName, null);
+                        schemaCache.put(keyValue, tableSchema);
+                    }
+                    else
+                    {
+                        throw new DataSetException("Couldn't retrieve schema for " + tableName);
+                    }
+                }
+            }
 
             return tableSchema;
         }
@@ -214,14 +214,14 @@ public final class Schema
         {
             if (stmt != null)
             {
-            	try
-            	{
-            		stmt.close();
-            	}
-        		catch (SQLException e)
-        		{
-        			//Do nothing
-        		}           	
+                try
+                {
+                    stmt.close();
+                }
+                catch (SQLException e)
+                {
+                    //Do nothing
+                }
             }
         }
     }
@@ -398,15 +398,15 @@ public final class Schema
     public int index(String colName)
             throws DataSetException
     {
-    	Integer position = (Integer)columnNumberByName.get(colName);
-    	
-    	if (position != null)
+        Integer position = (Integer) columnNumberByName.get(colName);
+
+        if (position != null)
         {
-        	return position.intValue();
+            return position.intValue();
         }
         else
         {
-        	throw new DataSetException("Column name: " + colName + " does not exist!");
+            throw new DataSetException("Column name: " + colName + " does not exist!");
         }
     }
 
@@ -423,7 +423,7 @@ public final class Schema
     public int index(String tableName, String colName)
             throws DataSetException
     {
-    	return index(tableName + "." + colName);
+        return index(tableName + "." + colName);
     }
 
     /**
@@ -462,18 +462,18 @@ public final class Schema
         this.numberOfColumns = meta.getColumnCount();
         columns = new Column[numberOfColumns() + 1];
         columnNumberByName = new Hashtable((int) ((1.25 * numberOfColumns) + 1));
-     
+
         String connURL = (conn != null) ? conn.getMetaData().getURL() : null;
-        
+
         for (int i = 1; i <= numberOfColumns(); i++)
         {
-        	String metaColumnName = meta.getColumnName(i);
-        	String metaTableName = null;
-        	
+            String metaColumnName = meta.getColumnName(i);
+            String metaTableName = null;
+
             // Workaround for Sybase jConnect 5.2 and older.
             try
             {
-            	metaTableName = meta.getTableName(i);
+                metaTableName = meta.getTableName(i);
 
                 // ResultSetMetaData may report table name as the empty
                 // string when a database-specific function has been
@@ -482,11 +482,11 @@ public final class Schema
                 {
                     if (tableName != null)
                     {
-                    	metaTableName = tableName;
+                        metaTableName = tableName;
                     }
                     else
                     {
-                    	metaTableName = "";
+                        metaTableName = "";
                     }
                 }
             }
@@ -494,45 +494,45 @@ public final class Schema
             {
                 if (tableName != null)
                 {
-                	metaTableName = tableName;
+                    metaTableName = tableName;
                 }
                 else
                 {
-                	metaTableName = "";
+                    metaTableName = "";
                 }
             }
 
             Column col = null;
-        	
+
             if (metaTableName.length() > 0 && connURL != null)
             {
-            	Schema tableSchema = null; // schema(conn, metaTableName);
-            
-            	synchronized (schemaCache)
-            	{
-            		tableSchema = (Schema) schemaCache.get(connURL + metaTableName);
-            	}
-            	
-            	if (tableSchema != null)
-            	{
-        			try 
-        			{
-						col = tableSchema.column(metaColumnName);
-					} 
-        			catch (DataSetException e) 
-        			{
-        				// column does not exist, ignore
-					}
-            	}
+                Schema tableSchema = null; // schema(conn, metaTableName);
+
+                synchronized (schemaCache)
+                {
+                    tableSchema = (Schema) schemaCache.get(connURL + metaTableName);
+                }
+
+                if (tableSchema != null)
+                {
+                    try
+                    {
+                        col = tableSchema.column(metaColumnName);
+                    }
+                    catch (DataSetException e)
+                    {
+                        // column does not exist, ignore
+                    }
+                }
             }
-            
+
             // Not found in cache
             if (col == null)
             {
-	            col = new Column();
-	            col.populate(meta, i, metaTableName, metaColumnName);
+                col = new Column();
+                col.populate(meta, i, metaTableName, metaColumnName);
             }
-            
+
             columns[i] = col;
             Integer position = new Integer(i);
             columnNumberByName.put(metaColumnName, position);
@@ -571,24 +571,24 @@ public final class Schema
         }
         else
         {
-	        tableHash = new Hashtable((int) ((1.25 * numberOfColumns) + 1));
-	
-	        for (int i = 1; i <= numberOfColumns(); i++)
-	        {
-	        	Hashtable columnHash;
-	
-	        	if (tableHash.containsKey(columns[i].getTableName()))
-	            {
-	                columnHash = (Hashtable) tableHash.get(columns[i].getTableName());
-	            }
-	            else
-	            {
-	                columnHash = new Hashtable((int) ((1.25 * numberOfColumns) + 1));
-	                tableHash.put(columns[i].getTableName(), columnHash);
-	            }
-	            
-	            columnHash.put(columns[i].name(), columns[i]);
-	        }
+            tableHash = new Hashtable((int) ((1.25 * numberOfColumns) + 1));
+
+            for (int i = 1; i <= numberOfColumns(); i++)
+            {
+                Hashtable columnHash;
+
+                if (tableHash.containsKey(columns[i].getTableName()))
+                {
+                    columnHash = (Hashtable) tableHash.get(columns[i].getTableName());
+                }
+                else
+                {
+                    columnHash = new Hashtable((int) ((1.25 * numberOfColumns) + 1));
+                    tableHash.put(columns[i].getTableName(), columnHash);
+                }
+
+                columnHash.put(columns[i].name(), columns[i]);
+            }
         }
     }
 
@@ -605,7 +605,7 @@ public final class Schema
         List cols = new ArrayList();
         String tableName = null;
         columnNumberByName = new Hashtable();
-        
+
         while (dbMeta.next())
         {
             if (tableName == null)
@@ -618,31 +618,31 @@ public final class Schema
                 dbMeta.previous(); // reset result set pointer
                 break;
             }
-            
+
             Column c = new Column();
-            
+
             c.populate(tableName,
                 dbMeta.getString(4), // column name
                 dbMeta.getString(6), // Data source dependent type name
                 dbMeta.getInt(5), // SQL type from java.sql.Types
                 dbMeta.getInt(11) == DatabaseMetaData.columnNullable); // is NULL allowed.
-            
+
             cols.add(c);
-            
+
             Integer position = new Integer(dbMeta.getInt(17)); // ordinal number
             columnNumberByName.put(c.name(), position);
             columnNumberByName.put(tableName + "." + c.name(), position);
         }
-        
+
         if (!cols.isEmpty())
         {
             this.numberOfColumns = cols.size();
             columns = new Column[numberOfColumns() + 1];
-            
+
             int i = 1;
             for (Iterator col = cols.iterator(); col.hasNext();)
             {
-                columns[i++] = (Column)col.next();
+                columns[i++] = (Column) col.next();
             }
         }
     }

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/TableDataSet.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/TableDataSet.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/TableDataSet.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/TableDataSet.java Sun Oct 31 20:08:29 2010
@@ -20,9 +20,7 @@ package com.workingdogs.village;
  */
 
 import java.sql.Connection;
-import java.sql.ResultSet;
 import java.sql.SQLException;
-
 import java.util.Enumeration;
 
 /**
@@ -62,9 +60,6 @@ import java.util.Enumeration;
 public class TableDataSet
         extends DataSet
 {
-    /** the optimistic locking column value */
-    private String optimisticLockingCol;
-
     /** the value for the sql where clause */
     private String where = null;
 
@@ -172,36 +167,6 @@ public class TableDataSet
     }
 
     /**
-     * Use the TDS fetchRecords instead of the DataSet.fetchRecords
-     *
-     * @return an instance of myself
-     *
-     * @exception SQLException
-     * @exception DataSetException
-     */
-    public DataSet fetchRecords()
-            throws SQLException, DataSetException
-    {
-        return fetchRecords(-1);
-    }
-
-    /**
-     * Use the TDS fetchRecords instead of the DataSet.fetchRecords
-     *
-     * @param max
-     *
-     * @return an instance of myself
-     *
-     * @exception SQLException
-     * @exception DataSetException
-     */
-    public DataSet fetchRecords(int max)
-            throws SQLException, DataSetException
-    {
-        return fetchRecords(0, max);
-    }
-
-    /**
      * Fetch start to max records. start is at Record 0
      *
      * @param start
@@ -221,50 +186,6 @@ public class TableDataSet
     }
 
     /**
-     * this is a string that contains the columns for the table that this TableDataSet represents.
-     *
-     * @return columns separated by ","
-     */
-    public String attributes()
-    {
-        return super.getColumns();
-    }
-
-    /**
-     * Returns the KeyDef for the DataSet
-     *
-     * @return a keydef
-     */
-    public KeyDef keydef()
-    {
-        return super.keydef();
-    }
-
-    /**
-     * Returns the ResultSet for the DataSet
-     *
-     * @return a ResultSet
-     *
-     * @throws SQLException TODO: DOCUMENT ME!
-     * @throws DataSetException TODO: DOCUMENT ME!
-     */
-    public ResultSet resultSet()
-            throws SQLException, DataSetException
-    {
-        return super.resultSet();
-    }
-
-    /**
-     * Returns the Schema for the DataSet
-     *
-     * @return a Schema
-     */
-    public Schema schema()
-    {
-        return super.schema();
-    }
-
-    /**
      * Saves all the records in the DataSet.
      *
      * @return total number of records updated/inserted/deleted
@@ -326,32 +247,6 @@ public class TableDataSet
     }
 
     /**
-     * Not yet implemented
-     *
-     * @param conn TODO: DOCUMENT ME!
-     *
-     * @return TODO: DOCUMENT ME!
-     *
-     * @throws SQLException TODO: DOCUMENT ME!
-     * @throws DataSetException TODO: DOCUMENT ME!
-     */
-    public int saveWithoutStatusUpdate(Connection conn)
-            throws SQLException, DataSetException
-    {
-        throw new DataSetException("Not yet implemented!");
-    }
-
-    /**
-     * Hell if I know what this does.
-     *
-     * @return TODO: DOCUMENT ME!
-     */
-    public String debugInfo()
-    {
-        return "Not yet implemented!";
-    }
-
-    /**
      * Removes any records that are marked as a zombie.
      *
      * @throws DataSetException TODO: DOCUMENT ME!
@@ -371,26 +266,6 @@ public class TableDataSet
     }
 
     /**
-     * Sets the table column used for optomistic locking.
-     *
-     * @param olc TODO: DOCUMENT ME!
-     */
-    public void setOptimisticLockingColumn(String olc)
-    {
-        this.optimisticLockingCol = olc;
-    }
-
-    /**
-     * Gets the table column used for optomistic locking.
-     *
-     * @return string
-     */
-    public String optimisticLockingCol()
-    {
-        return this.optimisticLockingCol;
-    }
-
-    /**
      * Sets the value for the SQL portion of the WHERE statement
      *
      * @param where TODO: DOCUMENT ME!
@@ -553,31 +428,6 @@ public class TableDataSet
     }
 
     /**
-     * The name of the table for which this TableDataSet was created.
-     *
-     * @return string
-     *
-     * @throws DataSetException TODO: DOCUMENT ME!
-     */
-    public String tableName()
-            throws DataSetException
-    {
-        return super.tableName();
-    }
-
-    /**
-     * Not yet implemented
-     *
-     * @exception SQLException
-     * @exception DataSetException
-     */
-    public void updateStatus()
-            throws SQLException, DataSetException
-    {
-        throw new DataSetException("Not yet implemented!");
-    }
-
-    /**
      * Builds the select string that was used to populate this TableDataSet.
      *
      * @return SQL select string

Modified: db/torque/village/trunk/src/java/com/workingdogs/village/Value.java
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/Value.java?rev=1029481&r1=1029480&r2=1029481&view=diff
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/Value.java (original)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/Value.java Sun Oct 31 20:08:29 2010
@@ -20,7 +20,6 @@ package com.workingdogs.village;
  */
 
 import java.math.BigDecimal;
-
 import java.sql.Blob;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -28,11 +27,10 @@ import java.sql.SQLException;
 import java.sql.Time;
 import java.sql.Timestamp;
 import java.sql.Types;
-
 import java.util.Calendar;
 
 /**
- * A Value represents a single cell in a database table. In other words, 
+ * A Value represents a single cell in a database table. In other words,
  * it is the cross between a row and column and contains the
  * information held there.
  *
@@ -45,13 +43,13 @@ public class Value
     private Object valueObject;
 
     /** the column number that this object came from */
-    private int columnNumber;
+    private final int columnNumber;
 
     /** what sql type of object is this? */
-    private int type;
+    private final int type;
 
     /**
-     * Creates a new Value object based on the ResultSet, columnNumber and 
+     * Creates a new Value object based on the ResultSet, columnNumber and
      * type
      *
      * @param rs
@@ -286,7 +284,7 @@ public class Value
             // The following form is reported to work and be necessary for
             // Oracle when the blob exceeds 4k.
             byte [] value = this.asBytes();
-            stmt.setBinaryStream(stmtNumber, 
+            stmt.setBinaryStream(stmtNumber,
                     new java.io.ByteArrayInputStream(value), value.length);
 
             break;
@@ -381,14 +379,15 @@ public class Value
             {
                 return (BigDecimal) valueObject;
             }
-            else if ( isDouble() ) {
-                return new BigDecimal(((Double) valueObject).doubleValue() );
+            else if (isDouble())
+            {
+                return new BigDecimal(((Double) valueObject).doubleValue());
             }
-            else if ( isFloat() ) 
+            else if (isFloat())
             {
                 return new BigDecimal(((Float) valueObject).doubleValue());
             }
-            else if(isString() || isInt() || isLong() || isShort() || isByte())
+            else if (isString() || isInt() || isLong() || isShort() || isByte())
             {
                 return new BigDecimal(asString());
             }
@@ -425,17 +424,17 @@ public class Value
             {
                 return ((BigDecimal) valueObject).setScale(scale);
             }
-            else if ( isDouble() )
+            else if (isDouble())
             {
-                return new BigDecimal( ((Double) valueObject).doubleValue())
+                return new BigDecimal(((Double) valueObject).doubleValue())
                                                              .setScale(scale);
-            } 
-            else if ( isFloat() ) 
+            }
+            else if (isFloat())
             {
                 return new BigDecimal(((Float) valueObject).doubleValue())
                                 .setScale(scale);
             }
-            else if(isString() || isInt() || isLong() || isShort() || isByte())
+            else if (isString() || isInt() || isLong() || isShort() || isByte())
             {
                 return new BigDecimal(asString()).setScale(scale);
             }
@@ -594,7 +593,7 @@ public class Value
             {
                 return ((Integer) valueObject);
             }
-            else if (isString() || isDouble() || isFloat() || isBigDecimal() 
+            else if (isString() || isDouble() || isFloat() || isBigDecimal()
                      || isLong() || isShort() || isByte())
             {
                 return new Integer(asString());
@@ -689,8 +688,8 @@ public class Value
             {
                 return ((Byte) valueObject);
             }
-            else if (isString() || isDouble() || isFloat() || isInt() || 
-                     isLong() || isShort() || isBigDecimal())
+            else if (isString() || isDouble() || isFloat() || isInt()
+                    || isLong() || isShort() || isBigDecimal())
             {
                 return new Byte(asString());
             }
@@ -813,8 +812,8 @@ public class Value
             {
                 return ((Short) valueObject);
             }
-            else if (isString() || isDouble() || isFloat() || isInt() || 
-                     isLong() || isBigDecimal() || isByte())
+            else if (isString() || isDouble() || isFloat() || isInt()
+                    || isLong() || isBigDecimal() || isByte())
             {
                 return new Short(asString());
             }
@@ -904,8 +903,8 @@ public class Value
             {
                 return ((Long) valueObject);
             }
-            else if (isString() || isDouble() || isFloat() || isInt() || 
-                     isBigDecimal() || isShort() || isByte())
+            else if (isString() || isDouble() || isFloat() || isInt()
+                    || isBigDecimal() || isShort() || isByte())
             {
                 return new Long(asString());
             }
@@ -995,8 +994,8 @@ public class Value
             {
                 return ((Double) valueObject);
             }
-            else if (isString() || isBigDecimal() || isFloat() || isInt() || 
-                     isLong() || isShort() || isByte())
+            else if (isString() || isBigDecimal() || isFloat() || isInt()
+                    || isLong() || isShort() || isByte())
             {
                 return new Double(asString());
             }
@@ -1086,8 +1085,8 @@ public class Value
             {
                 return ((Float) valueObject);
             }
-            else if (isString() || isDouble() || isBigDecimal() || isInt() || 
-                     isLong() || isShort() || isByte())
+            else if (isString() || isDouble() || isBigDecimal() || isInt()
+                    || isLong() || isShort() || isByte())
             {
                 return new Float(asString());
             }
@@ -1148,8 +1147,8 @@ public class Value
         }
         catch (IllegalArgumentException a)
         {
-            throw new DataSetException("Bad date value - " + 
-                    "Java Time Objects cannot be earlier than 1/1/70");
+            throw new DataSetException("Bad date value - "
+                    + "Java Time Objects cannot be earlier than 1/1/70");
         }
         catch (Exception b)
         {
@@ -1200,8 +1199,8 @@ public class Value
         }
         catch (IllegalArgumentException a)
         {
-            throw new DataSetException("Bad date value - " + 
-                       "Java Timestamp Objects cannot be earlier than 1/1/70");
+            throw new DataSetException("Bad date value - "
+                    + "Java Timestamp Objects cannot be earlier than 1/1/70");
         }
         catch (Exception b)
         {
@@ -1267,8 +1266,8 @@ public class Value
         }
         catch (IllegalArgumentException a)
         {
-            throw new DataSetException("Bad date value - " + 
-                    "Java Timestamp Objects cannot be earlier than 1/1/70");
+            throw new DataSetException("Bad date value - "
+                    + "Java Timestamp Objects cannot be earlier than 1/1/70");
         }
         catch (Exception b)
         {
@@ -1330,8 +1329,8 @@ public class Value
         }
         catch (IllegalArgumentException a)
         {
-            throw new DataSetException("Bad date value - " + 
-                  "Java java.util.Date Objects cannot be earlier than 1/1/70");
+            throw new DataSetException("Bad date value - "
+                    + "Java java.util.Date Objects cannot be earlier than 1/1/70");
         }
         catch (Exception b)
         {
@@ -1518,7 +1517,7 @@ public class Value
      */
     private boolean isTrue(String value)
     {
-        return (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("t") 
+        return (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("t")
                 || value.equalsIgnoreCase("yes")
         || value.equalsIgnoreCase("y") || value.equals("1"));
     }

Added: db/torque/village/trunk/src/java/com/workingdogs/village/package.html
URL: http://svn.apache.org/viewvc/db/torque/village/trunk/src/java/com/workingdogs/village/package.html?rev=1029481&view=auto
==============================================================================
--- db/torque/village/trunk/src/java/com/workingdogs/village/package.html (added)
+++ db/torque/village/trunk/src/java/com/workingdogs/village/package.html Sun Oct 31 20:08:29 2010
@@ -0,0 +1,25 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<html>
+  <head>
+  </head>
+  <body>
+    Village is a JDBC abstraction layer.
+  </body>
+</html>

Propchange: db/torque/village/trunk/src/java/com/workingdogs/village/package.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org