init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
## --------------------------------------------------
|
||||
## BASE Repository (@NoRepositoryBean) — DB 와 1:1, 매번 재생성 (덮어씀)
|
||||
## + Concrete( @Repository )는 "없을 때만" 1회 생성 (있으면 보존)
|
||||
## 경로는 telosys-tools.cfg 의 REPO_BASE_PKG / REPO_CONCRETE_PKG / ENTITY_CONCRETE_PKG 로 결정
|
||||
## --------------------------------------------------
|
||||
#if ( $entity.isJoinEntity() )
|
||||
#cancel("No JPA repository for join entity")
|
||||
#end
|
||||
#checkId($entity)
|
||||
#parse("include/init_var_repo.vm")
|
||||
#parse("include/java_header.vm")
|
||||
##---------------------------------------------------------------------------------------
|
||||
## 경로 계산 : 모두 telosys-tools.cfg 의 변수 기반
|
||||
## Base -> REPO_BASE_PKG
|
||||
## Concrete -> REPO_CONCRETE_PKG (없으면 1회 생성)
|
||||
##---------------------------------------------------------------------------------------
|
||||
#set( $concretePath = $REPO_CONCRETE_PKG.replace(".", "/") )
|
||||
#set( $concreteFolder = "${SRC}/${concretePath}" )
|
||||
#set( $concreteFile = "${concreteFolder}/${repoConcreteClass}.java" )
|
||||
#if( ! $fn.file($concreteFile).exists() )
|
||||
$generator.generate($entity.name, "${repoConcreteClass}.java", $concreteFolder, "main-java/XxxRepositoryConcrete_java.vm")
|
||||
#end
|
||||
##---------------------------------------------------------------------------------------
|
||||
package ${REPO_BASE_PKG};
|
||||
|
||||
import ${ENTITY_CONCRETE_PKG}.${entityClass};
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.repository.NoRepositoryBean;
|
||||
|
||||
/**
|
||||
* BASE repository for "${entityClass}" — generated from DB, DO NOT EDIT (regenerated).
|
||||
* 커스텀 쿼리는 ${REPO_CONCRETE_PKG}.${repoConcreteClass} 에 작성하세요.
|
||||
#if( $entity.databaseComment && $entity.databaseComment != "" )
|
||||
*
|
||||
* Table comment: ${entity.databaseComment}
|
||||
#end
|
||||
*
|
||||
* <p>주요 컬럼:</p>
|
||||
* <ul>
|
||||
#foreach( $attribute in $entity.keyAttributes )
|
||||
#if( $attribute.databaseComment && $attribute.databaseComment != "" )
|
||||
* <li>(PK) ${attribute.databaseName} — ${attribute.databaseComment}</li>
|
||||
#else
|
||||
* <li>(PK) ${attribute.databaseName}</li>
|
||||
#end
|
||||
#end
|
||||
#foreach( $attribute in $entity.nonKeyAttributes )
|
||||
#if( $attribute.databaseComment && $attribute.databaseComment != "" )
|
||||
* <li>${attribute.databaseName} — ${attribute.databaseComment}</li>
|
||||
#end
|
||||
#end
|
||||
* </ul>
|
||||
*/
|
||||
@NoRepositoryBean
|
||||
public interface ${repoBaseClass} extends JpaRepository<${entityClass}, ${pkType}>,
|
||||
JpaSpecificationExecutor<${entityClass}> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user