Show
Ignore:
Timestamp:
19-07-10 16:28:10 (4 years ago)
Author:
keesvb
Message:

restructured BootStrap?, it should now run faster because there are no BioPortal? connections, and it adds sample studies in development mode (outcomment the addExampleStudies call in the BootStrap? if you don't want that). Renamed TemplateEntity?.getFieldType to giveFieldType and added tests to SampleTests? for the method.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/dbnp/studycapturing/TemplateEntity.groovy

    r661 r662  
    623623 
    624624        /** 
     625         * Look up the type of a certain template field 
     626         * @param String fieldName The name of the template field 
     627         * @return String The type (static member of TemplateFieldType) of the field, or null of the field does not exist 
     628         */ 
     629        TemplateFieldType giveFieldType(String fieldName) { 
     630                def field = giveFields().find { 
     631                        it.name == fieldName 
     632                } 
     633                field?.type 
     634        } 
     635 
     636        /** 
    625637         * Return all relevant 'built-in' domain fields of the super class. Should be implemented by a static method 
    626638         * @return List with DomainTemplateFields 
     
    659671        } 
    660672 
    661                     /** 
    662          * Look up the type of a certain template subject field 
    663          * @param String fieldName The name of the template field 
    664          * @return String       The type (static member of TemplateFieldType) of the field, or null of the field does not exist 
    665          */ 
    666         def TemplateFieldType getFieldType(String fieldName) { 
    667                 def field = this.giveFields().find { 
    668                         it.name == fieldName 
    669                 } 
    670                 field?.type 
    671         } 
    672673}