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

templates.generator.Dao.vm Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package ${package}.${moduleName}.dao;

import com.github.hdy.jdbcplus.data.db.BaseDao;
import com.github.hdy.jdbcplus.result.Page;
import ${package}.${moduleName}.entity.${className};
import org.springframework.stereotype.Repository;

/**
 * ${comments}
 *
 * @author ${author}
 * @date ${datetime}
 */
@Repository
public class ${className}Dao extends BaseDao<${className}, #foreach($column in $columns)#if($column.columnName == $pk.columnName)$column.attrType#end#end> {

    public Page<${className}> page(${className} ${classname}, Integer pageNumber, Integer pageSize) {
        return super.page(${classname}, pageNumber, pageSize);
    }

    public ${className} insert(${className} ${classname}) {
        return super.insert(${classname});
    }

    public ${className} update(${className} ${classname}) {
        return super.update(${classname});
    }

    public int delete(#foreach($column in $columns)#if($column.columnName == $pk.columnName)$column.attrType#end#end id) {
        return super.delete(id);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy