templates.ServiceImpl.tmpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of coder-maven-plugin Show documentation
Show all versions of coder-maven-plugin Show documentation
Assist in generating CRUD code, without limitation on the specific language, as long as you can write velocity templates.
/**
* @author: ${author}
* @version: 1.0
* @since ${date}
*/
package ${packagePrefix}.service.impl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.ArrayList;
import java.util.Collection;
import ${packagePrefix}.dao.${className}Dao;
import ${packagePrefix}.domain.${className};
import ${packagePrefix}.service.${className}Service;
@Service("${classVar}Service")
public class ${className}ServiceImpl implements ${className}Service {
@Resource(columnName="${classVar}Dao")
private ${className}Dao ${classVar}Dao;
@Transactional
public void save${className} (${className} ${classVar}){
${classVar}Dao.save(${classVar});
}
@Transactional
public void delete${className} (${className} ${classVar}){
${classVar}Dao.delete(${classVar});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy