Show
Ignore:
Timestamp:
06/18/07 20:46:39 (2 years ago)
Author:
warner
Message:

Incomplete - # 26: Tie in model/dao creation into chama script
http://warneronstine.com/cgi-bin/trac.cgi/ticket/26
made some changes in the JavaModelDAOBuilder

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/groovy/org/chama/builder/model/JavaModelDAOBuilder.groovy

    r63 r64  
    3030                             "toString"] 
    3131        def build() { 
     32            def files =[:] 
     33                //first check the build type 
     34                switch(buildType) { 
     35                    case BUILD_ALL: 
     36                        //get all the tables from the database 
     37                        dbMetaData.tables.each { 
     38                            def modelName = Inflection.singularize(SqlMapper.columnToCamelCaseAll(it.key)) 
     39                            buildDAO(modelName) 
     40                            buildModel(modelName) 
     41                             
     42                        } 
     43                        break 
     44                    case BUILD_MODEL: 
     45                        buildDAO(modelToBuild) 
     46                    buildModel(modelToBuild) 
     47                        break 
     48                } 
    3249             
    33       } 
     50      } 
    3451         
    3552        def buildModel(modelName) {