All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates1.Mapper.tmpl Maven / Gradle / Ivy

Go to download

Assist in generating CRUD code, without limitation on the specific language, as long as you can write velocity templates.

There is a newer version: 1.0.8
Show newest version




  
#foreach($prop in $pkResult)
    
#end
#foreach($prop in $columnResult)
    
#end
  


  
   #foreach($prop in $pkResult)
     ${prop.columnName} as "${prop.columnName}",
    #end
   #foreach($prop in $columnResult)
    ${prop.columnName} as "${prop.columnName}" #if($velocityCount != $columnResult.size()) , #end

    #end
  

  

  
    delete from $tableName
    where
     #foreach($prop in $pkResult)
      ${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}} #if($velocityCount != $pkResult.size()) , #end

    #end
  

  
    insert into $tableName (
       #foreach($prop in $pkResult)
         ${prop.columnName}  ,

        #end
       #foreach($prop in $columnResult)
         ${prop.columnName}  #if($velocityCount != $columnResult.size()) , #end

        #end
      ) values (
        #foreach($prop in $pkResult)
          #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}},

        #end
        #foreach($prop in $columnResult)
         #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end

        #end
    )
  

  
       insert into $tableName (
           #foreach($prop in $pkResult)
             ${prop.columnName}  ,
            #end
           #foreach($prop in $columnResult)
             ${prop.columnName}   #if($velocityCount != $columnResult.size()) , #end

            #end
          ) values (
            #foreach($prop in $pkResult)
              #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}},

            #end
            #foreach($prop in $columnResult)
             #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}}  #if($velocityCount != $columnResult.size()) , #end

            #end
        )
  

  
    update ${tableName}
    
         #foreach($prop in $columnResult)
    
            ${prop.columnName} = #{ ${prop.javaName} ,jdbcType= ${prop.jdbcType}}  #if($velocityCount != $columnResult.size()) , #end

        
        #end
    
    where
     #foreach($prop in $pkResult)
      ${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}}  #if($velocityCount != $pkResult.size()) , #end

    #end
  

  
    update ${tableName}
    set
    #foreach($prop in $columnResult)
      ${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}} #if($velocityCount != $columnResult.size()) , #end

    #end

     where
     #foreach($prop in $pkResult)
      ${prop.columnName} = #{${prop.javaName},jdbcType=${prop.jdbcType}}
    #end
  


  

  

  

  
    delete from ${tableName}
    where  ${keyColumn}  in
    
        #{item}
    
  
 




© 2015 - 2025 Weber Informatics LLC | Privacy Policy