db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: db-torque/src/generator/src/java/org/apache/torque/engine/platform PlatformDefaultImpl.java Platform.java PlatformMssqlImpl.java
Date Tue, 02 Dec 2003 02:27:22 GMT
dlr         2003/12/01 18:27:22

  Modified:    src/generator/src/java/org/apache/torque/engine/platform
                        PlatformDefaultImpl.java Platform.java
                        PlatformMssqlImpl.java
  Log:
  * src/generator/src/java/org/apache/torque/engine/platform/Platform.java
  * src/generator/src/java/org/apache/torque/engine/platform/PlatformDefaultImpl.java
  * src/generator/src/java/org/apache/torque/engine/platform/PlatformMssqlImpl.java
    getNullString(boolean): JavaDoc improvements and implementation
    brevity touch-ups.
  
  Revision  Changes    Path
  1.4       +8 -12     db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDefaultImpl.java
  
  Index: PlatformDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformDefaultImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- PlatformDefaultImpl.java	25 Nov 2003 16:57:13 -0000	1.3
  +++ PlatformDefaultImpl.java	2 Dec 2003 02:27:22 -0000	1.4
  @@ -122,19 +122,15 @@
       }
   
       /**
  -     * 
  -     * @param notNull
  -     * @return
  +     * @return Only produces a SQL fragment if null values are
  +     * disallowed.
  +     * @see Platform#getNullString(boolean)
        */
       public String getNullString(boolean notNull)
       {
  -        if (notNull) 
  -        {
  -            // TODO check if this is true for all dbs 
  -            // check old sybase templates!
  -            return "NOT NULL";
  -        }
  -        return "";
  +        // TODO: Check whether this is true for all DBs.  Also verify
  +        // the old Sybase templates.
  +        return (notNull ? "NOT NULL" : "");
       }
  -    
  +
   }
  
  
  
  1.4       +4 -5      db-torque/src/generator/src/java/org/apache/torque/engine/platform/Platform.java
  
  Index: Platform.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/Platform.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- Platform.java	25 Nov 2003 16:57:13 -0000	1.3
  +++ Platform.java	2 Dec 2003 02:27:22 -0000	1.4
  @@ -88,10 +88,9 @@
       Domain getDomainForSchemaType(SchemaType jdbcType);
       
       /**
  -     * Returns the db specific String for NULL or NOT NULL.
  -     * 
  -     * @return the db specific String
  +     * @return The RDBMS-specific SQL fragment for <code>NULL</code>
  +     * or <code>NOT NULL</code>.
        */
       String getNullString(boolean notNull);
  -    
  +
   }
  
  
  
  1.4       +4 -9      db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMssqlImpl.java
  
  Index: PlatformMssqlImpl.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/platform/PlatformMssqlImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- PlatformMssqlImpl.java	25 Nov 2003 16:57:13 -0000	1.3
  +++ PlatformMssqlImpl.java	2 Dec 2003 02:27:22 -0000	1.4
  @@ -99,18 +99,13 @@
       }
       
       /**
  -     * Explicitly returns NULL if null values allowed 
  -     * (as recomended by Microsoft).
  -     * 
  +     * @return Explicitly returns <code>NULL</code> if null values are
  +     * allowed (as recomended by Microsoft).
        * @see Platform#getNullString(boolean)
        */
       public String getNullString(boolean notNull) 
       {
  -        if (notNull) 
  -        {
  -            return "NOT NULL";
  -        }
  -        return "NULL";
  +        return (notNull ? "NOT NULL" : "NULL");
       }
   
   }
  
  
  

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


Mime
View raw message