empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r902392 - in /incubator/empire-db/trunk: empire-db-examples/empire-db-example-advanced/ empire-db-examples/empire-db-example-basic/ empire-db/src/main/java/org/apache/empire/data/bean/ empire-db/src/main/java/org/apache/empire/db/ empire-db...
Date Sat, 23 Jan 2010 12:15:05 GMT
Author: doebele
Date: Sat Jan 23 12:15:04 2010
New Revision: 902392

URL: http://svn.apache.org/viewvc?rev=902392&view=rev
Log:
EMPIREDB-72

Modified:
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/config.xml
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/pom.xml
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/config.xml
    incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/pom.xml
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
    incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/config.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/config.xml?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/config.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/config.xml Sat
Jan 23 12:15:04 2010
@@ -43,26 +43,6 @@
 		<jdbcPwd>empire-db</jdbcPwd>
 		<schemaName>DBSAMPLEADV</schemaName>
 	</properties-mysql>
-
-	<properties-oracle>
-		<!-- JDBC properties for an Oracle Database connection -->
-		<!-- Required jar file: ojdbc14.jar -->
-		<jdbcClass>oracle.jdbc.driver.OracleDriver</jdbcClass>
-		<jdbcURL>jdbc:oracle:thin:@192.168.0.2:1521:ora10</jdbcURL>
-		<jdbcUser>DBSAMPLEADV</jdbcUser>
-		<jdbcPwd>DBSAMPLEADV</jdbcPwd>
-		<schemaName>DBSAMPLEADV</schemaName>
-	</properties-oracle>
-
-	<properties-sqlserver>
-		<!-- JDBC properties for a Microsoft SQL-Server Database connection -->
-		<!-- Required jar file: sqljdbc.jar -->
-		<jdbcClass>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbcClass>
-		<jdbcURL>jdbc:sqlserver://192.168.0.2:1433</jdbcURL>
-		<jdbcUser>sa</jdbcUser>
-		<jdbcPwd>empire-db</jdbcPwd>
-		<schemaName>DBSAMPLEADV</schemaName>
-	</properties-sqlserver>
 	
 	<properties-postgresql>
 		<!-- JDBC properties for a PostreSQL Database connection -->
@@ -93,6 +73,26 @@
 		<jdbcPwd></jdbcPwd>
 		<schemaName>DBSAMPLEADV</schemaName>
 	</properties-derby>
+
+	<properties-oracle>
+		<!-- JDBC properties for an Oracle Database connection -->
+		<!-- Required jar file: ojdbc14.jar -->
+		<jdbcClass>oracle.jdbc.driver.OracleDriver</jdbcClass>
+		<jdbcURL>jdbc:oracle:thin:@192.168.0.2:1521:ora10</jdbcURL>
+		<jdbcUser>DBSAMPLEADV</jdbcUser>
+		<jdbcPwd>DBSAMPLEADV</jdbcPwd>
+		<schemaName>DBSAMPLEADV</schemaName>
+	</properties-oracle>
+
+	<properties-sqlserver>
+		<!-- JDBC properties for a Microsoft SQL-Server Database connection -->
+		<!-- Required jar file: sqljdbc.jar -->
+		<jdbcClass>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbcClass>
+		<jdbcURL>jdbc:sqlserver://localhost:1433</jdbcURL>
+		<jdbcUser>empire-db</jdbcUser>
+		<jdbcPwd>empire-db</jdbcPwd>
+		<schemaName>DBSAMPLEADV</schemaName>
+	</properties-sqlserver>
 	
 	<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/pom.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/pom.xml?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/pom.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-advanced/pom.xml Sat Jan
23 12:15:04 2010
@@ -54,6 +54,23 @@
 		    <version>10.4.2.0</version>
 		    <!-- <scope>runtime</scope> -->
 		</dependency> 
+
+		<!-- ojdbc 
+		<dependency>
+		    <groupId>ojdbc</groupId>
+		    <artifactId>ojdbc</artifactId>
+		    <version>14</version>
+		</dependency>
+		-->
+
+		<!-- msssql 
+		<dependency>
+		    <groupId>microsoft</groupId>
+		    <artifactId>sqljdbc</artifactId>
+		    <version>1.0</version>
+		</dependency>
+		-->
+		
 	</dependencies>
 	<build>
 		<plugins>

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/config.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/config.xml?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/config.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/config.xml Sat Jan
23 12:15:04 2010
@@ -88,8 +88,8 @@
 		<!-- JDBC properties for a Microsoft SQL-Server Database connection -->
 		<!-- Required jar file: sqljdbc.jar -->
 		<jdbcClass>com.microsoft.sqlserver.jdbc.SQLServerDriver</jdbcClass>
-		<jdbcURL>jdbc:sqlserver://192.168.0.2:1433</jdbcURL>
-		<jdbcUser>sa</jdbcUser>
+		<jdbcURL>jdbc:sqlserver://localhost:1433</jdbcURL>
+		<jdbcUser>empire-db</jdbcUser>
 		<jdbcPwd>empire-db</jdbcPwd>
 		<schemaName>DBSAMPLE</schemaName>
 	</properties-sqlserver>

Modified: incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/pom.xml
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/pom.xml?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/pom.xml (original)
+++ incubator/empire-db/trunk/empire-db-examples/empire-db-example-basic/pom.xml Sat Jan 23
12:15:04 2010
@@ -54,6 +54,23 @@
 		    <version>10.4.2.0</version>
 		    <!-- <scope>runtime</scope> -->
 		</dependency> 
+
+		<!-- ojdbc 
+		<dependency>
+		    <groupId>ojdbc</groupId>
+		    <artifactId>ojdbc</artifactId>
+		    <version>14</version>
+		</dependency>
+		-->
+
+		<!-- msssql 
+		<dependency>
+		    <groupId>microsoft</groupId>
+		    <artifactId>sqljdbc</artifactId>
+		    <version>1.0</version>
+		</dependency>
+		-->
+		
 	</dependencies>
 	<build>
 		<plugins>

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
Sat Jan 23 12:15:04 2010
@@ -49,11 +49,11 @@
 {
     protected static final Log log = LogFactory.getLog(BeanRecordProxy.class);
     
-    private List<Column> columns;
-    private Column[] keyColumns;
-    private boolean[] modified;
+    protected List<Column> columns;
+    protected Column[] keyColumns;
+    protected boolean[] modified;
 
-    private T data;
+    protected T data;
 
     public BeanRecordProxy(T data, List<Column> columns, Column[] keyColumns)
     {
@@ -318,9 +318,9 @@
         return setBeanValues(bean, null);
     }
 
-    // --------------- private ------------------
+    // --------------- protected ------------------
     
-    private Object getBeanPropertyValue(Object bean, ColumnExpr column)
+    protected Object getBeanPropertyValue(Object bean, ColumnExpr column)
     {
         // Check Params
         if (column==null)
@@ -330,7 +330,7 @@
         return getBeanPropertyValue(bean, column.getBeanPropertyName()); 
     }
 
-    private Object getBeanPropertyValue(Object bean, String property)
+    protected Object getBeanPropertyValue(Object bean, String property)
     {
         // Check Params
         if (bean==null || property==null)
@@ -358,7 +358,7 @@
         }
     }
 
-    private boolean setBeanPropertyValue(Object bean, Column column, Object value)
+    protected boolean setBeanPropertyValue(Object bean, Column column, Object value)
     {
         // Check Params
         if (bean==null || column==null)

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
Sat Jan 23 12:15:04 2010
@@ -587,12 +587,12 @@
      * @param dataType the resulting data Type
      * @return the new DBCalcExpr object
      */
-    private DBColumnExpr getExprFromPhrase(int phrase, Object[] params, DBColumn updateColumn,
boolean isAggregate, DataType dataType)
+    protected DBColumnExpr getExprFromPhrase(int phrase, Object[] params, DBColumn updateColumn,
boolean isAggregate, DataType dataType)
     {
         return new DBFuncExpr(this, phrase, params, updateColumn, isAggregate, dataType);
     }
 
-    private DBColumnExpr getExprFromPhrase(int phrase, Object[] params, DBColumn updateColumn,
boolean isAggregate)
+    protected DBColumnExpr getExprFromPhrase(int phrase, Object[] params, DBColumn updateColumn,
boolean isAggregate)
     {
         return getExprFromPhrase(phrase, params, updateColumn, isAggregate, getDataType());
     }
@@ -1140,7 +1140,7 @@
 
     // get object Array from List
     private Object listToArray(Object value)
-    {   // Check wether value is a list
+    {   // Check whether value is a list
         /*
         if (value != null && value instanceof java.util.List)
         { // Convert List to array

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommand.java
Sat Jan 23 12:15:04 2010
@@ -48,7 +48,7 @@
 {
     public static final class DBCmdParameter extends DBExpr
     {
-        private DBCommand cmd;
+        protected DBCommand cmd;
         protected int index; 
         
         protected DBCmdParameter(DBCommand cmd, int index)
@@ -224,13 +224,13 @@
         }
     }
     
-    private boolean useCmdParam(DBColumn col)
+    protected boolean useCmdParam(DBColumn col)
     {
         DataType dt = col.getDataType();
         return ( dt==DataType.BLOB || dt==DataType.CLOB );
     }
     
-    private Object getCmdParamValue(DBColumn col, Object value)
+    protected Object getCmdParamValue(DBColumn col, Object value)
     {        
         switch (col.getDataType())
         {
@@ -294,7 +294,7 @@
      * @param column
      * @return
      */
-    private boolean hasSetExprOn(DBColumn column)
+    protected boolean hasSetExprOn(DBColumn column)
     {
         if (set==null)
             return false;
@@ -701,7 +701,7 @@
      * @param expr the DBCompareExpr object
      * @param expr the DBCompareExpr object
      */
-    private void setCompare(List<DBCompareExpr> list, DBCompareExpr expr)
+    protected void setCompare(List<DBCompareExpr> list, DBCompareExpr expr)
     { // adds a comparison to the where or having list
         for (int i = 0; i < list.size(); i++)
         { // check expression

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
Sat Jan 23 12:15:04 2010
@@ -106,11 +106,11 @@
     protected boolean ddlColumnDefaults = false;
 
     // Illegal name chars and reserved SQL keywords
-    private static final char[]   illegalNameChars   = new char[] { '@', '?', '>', '=',
'<', ';', ':', 
+    protected static final char[]   illegalNameChars   = new char[] { '@', '?', '>', '=',
'<', ';', ':', 
                                                                     '/', '.', '-', ',', '+',
'*', ')', '(',
                                                                     '\'', '&', '%', '!',
' '
                                                                   };        
-    private static final String[] generalSQLKeywords = new String[] { "user", "group", 
+    protected static final String[] generalSQLKeywords = new String[] { "user", "group",

                                                            "table", "column", "view", "index",
"constraint", 
                                                            "select", "udpate", "insert",
"alter", "delete" };        
     protected final Set<String> reservedSQLKeywords;

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java (original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java Sat
Jan 23 12:15:04 2010
@@ -514,7 +514,7 @@
     /**
      * Adds join restrictions to the supplied command object.
      */
-    private boolean addJoinRestriction(DBCommand upd, DBColumn updCol, DBColumn keyCol, DBColumn[]
keyColumns, DBRecord rec)
+    protected boolean addJoinRestriction(DBCommand upd, DBColumn updCol, DBColumn keyCol,
DBColumn[] keyColumns, DBRecord rec)
     {   // Find key for forein field
         Object rowsetData = rec.getRowSetData();
         for (int i = 0; i < keyColumns.length; i++)

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
Sat Jan 23 12:15:04 2010
@@ -38,9 +38,11 @@
 {
     // Logger
     private static final Log log = LogFactory.getLog(DBSQLScript.class);
-    
-    private ArrayList<String> sqlCmdList = new ArrayList<String>();
-    private static final String COMMAND_SEPARATOR = ";\r\n\r\n";
+    private static final String DEFAULT_COMMAND_SEPARATOR = ";\r\n\r\n";
+
+    // Properties
+    protected String COMMAND_SEPARATOR = DEFAULT_COMMAND_SEPARATOR; 
+    protected ArrayList<String> sqlCmdList = new ArrayList<String>();
     
     /**
      * Adds a statement to the script.

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/derby/DBDatabaseDriverDerby.java
Sat Jan 23 12:15:04 2010
@@ -364,7 +364,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
     {
 //        // User Master to create Database
 //        if (createSchema)
@@ -409,7 +409,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -496,7 +496,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql, boolean alter)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql, boolean alter)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -608,7 +608,7 @@
      * 
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -658,7 +658,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -687,7 +687,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -728,7 +728,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/h2/DBDatabaseDriverH2.java
Sat Jan 23 12:15:04 2010
@@ -361,7 +361,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
     {
 //        // User Master to create Database
 //        if (createSchema)
@@ -406,7 +406,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -493,7 +493,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -592,7 +592,7 @@
      * 
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -642,7 +642,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -671,7 +671,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -712,7 +712,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/hsql/DBDatabaseDriverHSql.java
Sat Jan 23 12:15:04 2010
@@ -327,7 +327,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script)
     {
         // Create all Sequences
         Iterator<DBTable> seqtabs = db.getTables().iterator();
@@ -374,7 +374,7 @@
      * 
      * @return true if the sequence has been created successfully
      */
-    private boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
+    protected boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
     {
         Object defValue = c.getDefaultValue();
         String seqName = (defValue != null) ? defValue.toString() : c.toString();
@@ -395,7 +395,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -476,7 +476,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -562,7 +562,7 @@
      * 
      * @return true if the relation has been altered successfully
      */
-    private boolean alterRelation(DBRelation r, DBCmdType type, DBSQLScript script)
+    protected boolean alterRelation(DBRelation r, DBCmdType type, DBSQLScript script)
     {
         switch(type)
         {
@@ -636,7 +636,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -665,7 +665,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -706,7 +706,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/mysql/DBDatabaseDriverMySQL.java
Sat Jan 23 12:15:04 2010
@@ -388,7 +388,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
     {
         // User Master to create Database
         if (createSchema)
@@ -433,7 +433,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -520,7 +520,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -619,7 +619,7 @@
      * 
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -669,7 +669,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -698,7 +698,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -739,7 +739,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/oracle/DBDatabaseDriverOracle.java
Sat Jan 23 12:15:04 2010
@@ -403,7 +403,7 @@
      * 
      * @return true if the database has been created successfully
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script)
     {
         // Create all Sequences
         Iterator<DBTable> seqtabs = db.getTables().iterator();
@@ -451,7 +451,7 @@
      * 
      * @return true if the sequence has been created successfully
      */
-    private boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
+    protected boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
     {
         Object defValue = c.getDefaultValue();
         String seqName = (defValue != null) ? defValue.toString() : c.toString();
@@ -471,7 +471,7 @@
      * Returns true if the table has been created successfully.
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -564,7 +564,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -651,7 +651,7 @@
      * Create a sql string for creating a relation and appends it to the supplied buffer
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -699,7 +699,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -728,7 +728,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -769,7 +769,7 @@
      * 
      * @return true if the comment has been created successfully
      */
-    private boolean createComment(DBDatabase db, String type, DBExpr expr, String comment,
DBSQLScript script)
+    protected boolean createComment(DBDatabase db, String type, DBExpr expr, String comment,
DBSQLScript script)
     {
         if (comment==null || comment.length()==0)
             return true;
@@ -796,7 +796,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/postgresql/DBDatabaseDriverPostgreSQL.java
Sat Jan 23 12:15:04 2010
@@ -470,7 +470,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script)
     {    	
         // Create all Sequences
         Iterator<DBTable> seqtabs = db.getTables().iterator();
@@ -513,7 +513,7 @@
         return true;
     }
     
-    private String createSequenceName(DBTableColumn c){
+    protected String createSequenceName(DBTableColumn c){
     	 Object defValue = c.getDefaultValue();
          return (defValue != null) ? defValue.toString() : c.toString();
     }
@@ -523,7 +523,7 @@
      * 
      * @return true if the sequence has been created successfully
      */
-    private boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
+    protected boolean createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script)
     {
     	String seqName = createSequenceName(c);
         // createSQL
@@ -548,7 +548,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -637,7 +637,7 @@
      * 
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql, boolean alter)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql, boolean alter)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -741,7 +741,7 @@
      * 
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -791,7 +791,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -822,7 +822,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -863,7 +863,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");

Modified: incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java?rev=902392&r1=902391&r2=902392&view=diff
==============================================================================
--- incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java
(original)
+++ incubator/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/sqlserver/DBDatabaseDriverMSSQL.java
Sat Jan 23 12:15:04 2010
@@ -402,7 +402,7 @@
     /*
      * return the sql for creating a Database
      */
-    private boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
+    protected boolean createDatabase(DBDatabase db, DBSQLScript script, boolean createSchema)
     {
         // User Master to create Database
         if (createSchema)
@@ -448,7 +448,7 @@
      * 
      * @return true if the table has been created successfully
      */
-    private boolean createTable(DBTable t, DBSQLScript script)
+    protected boolean createTable(DBTable t, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("-- creating table ");
@@ -530,7 +530,7 @@
      * @param sql the sql builder object
      * @return true if the column was successfully appended or false otherwise
      */
-    private boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
+    protected boolean appendColumnDesc(DBTableColumn c, StringBuilder sql)
     {
         // Append name
         c.addSQL(sql, DBExpr.CTX_NAME);
@@ -624,7 +624,7 @@
      * 
      * @return true if the relation has been created successfully
      */
-    private boolean createRelation(DBRelation r, DBSQLScript script)
+    protected boolean createRelation(DBRelation r, DBSQLScript script)
     {
         DBTable sourceTable = (DBTable) r.getReferences()[0].getSourceColumn().getRowSet();
         DBTable targetTable = (DBTable) r.getReferences()[0].getTargetColumn().getRowSet();
@@ -674,7 +674,7 @@
      * @param buf buffer to which to append the sql statement to
      * @return true if the statement was successfully appended to the buffer
      */
-    private boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
+    protected boolean alterTable(DBTableColumn col, DBCmdType type, DBSQLScript script)
     {
         StringBuilder sql = new StringBuilder();
         sql.append("ALTER TABLE ");
@@ -703,7 +703,7 @@
      * 
      * @return true if the view has been created successfully
      */
-    private boolean createView(DBView v, DBSQLScript script)
+    protected boolean createView(DBView v, DBSQLScript script)
     {
         // Create the Command
         DBCommandExpr cmd = v.createCommand();
@@ -744,7 +744,7 @@
      * 
      * @return true if the object has been dropped successfully
      */
-    private boolean dropObject(String name, String objType, DBSQLScript script)
+    protected boolean dropObject(String name, String objType, DBSQLScript script)
     {
         if (name == null || name.length() == 0)
             return error(Errors.InvalidArg, name, "name");



Mime
View raw message