Interface RepositoryGenerator
- All Known Implementing Classes:
BaseRepositoryGenerator
public interface RepositoryGenerator
Specific data repository (e.g. Jakarta Data, Micronaut Data, ...) generator.
Defines generated data repository interfaces implementations.
-
Method Summary
Modifier and TypeMethodDescriptionSupported data repository annotations for repository code processing and generation.createRepositoryInfo
(TypeInfo interfaceInfo, CodegenContext codegenContext) Create data repository interface descriptor (info).void
generateInterfaces
(RepositoryInfo repositoryInfo, ClassModel.Builder classModel, CodegenContext codegenContext, PersistenceGenerator persistenceGenerator) Generate repository interfaces (e.g.void
generateQueryMethods
(RepositoryInfo repositoryInfo, ClassModel.Builder classModel, CodegenContext codegenContext, PersistenceGenerator persistenceGenerator) Generate query by method name methods.genericInterface
(Map<TypeName, RepositoryInterfaceInfo> interfacesInfo) Return the most generic provider specific interface from provided interfaces.Supported data repository interfaces for repository code processing and generation.
-
Method Details
-
annotations
Supported data repository annotations for repository code processing and generation.- Returns:
- supported annotations
-
interfaces
Supported data repository interfaces for repository code processing and generation.- Returns:
- supported interfaces
-
createRepositoryInfo
Create data repository interface descriptor (info). Contains list of provider specific interfaces to be implemented and entity and ID types.- Parameters:
interfaceInfo
- data repository interface type informationcodegenContext
- code processing and generation context- Returns:
- data repository interface descriptor
-
genericInterface
Return the most generic provider specific interface from provided interfaces.- Parameters:
interfacesInfo
- data repository implemented interfacesMap
.- Returns:
- the most generic interface
-
generateInterfaces
void generateInterfaces(RepositoryInfo repositoryInfo, ClassModel.Builder classModel, CodegenContext codegenContext, PersistenceGenerator persistenceGenerator) Generate repository interfaces (e.g. CrudRepository) methods.- Parameters:
repositoryInfo
- data repository interface infoclassModel
- target class buildercodegenContext
- code processing and generation contextpersistenceGenerator
- persistence provider specific generator
-
generateQueryMethods
void generateQueryMethods(RepositoryInfo repositoryInfo, ClassModel.Builder classModel, CodegenContext codegenContext, PersistenceGenerator persistenceGenerator) Generate query by method name methods.- Parameters:
repositoryInfo
- data repository interface infoclassModel
- target class buildercodegenContext
- code processing and generation contextpersistenceGenerator
- persistence provider specific generator
-