Class RepositoryProcessor
java.lang.Object
dimstyl.orm.internal.processors.RepositoryProcessor
Utility class responsible for processing metadata related to repositories in ORM.
This class extracts metadata from repository classes annotated with Repository
,
identifying the database, entity, supported SQL operations, and table name.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Private constructor to prevent instantiation. -
Method Summary
Modifier and TypeMethodDescriptionstatic RepositoryMetadata
extractMetadata
(Class<?> repositoryClass) Extracts metadata from a given class annotated withRepository
.
-
Constructor Details
-
RepositoryProcessor
private RepositoryProcessor()Private constructor to prevent instantiation.
-
-
Method Details
-
extractMetadata
public static RepositoryMetadata extractMetadata(Class<?> repositoryClass) throws MissingRepositoryAnnotationException Extracts metadata from a given class annotated withRepository
.This method validates the presence of the
Repository
annotation, retrieves the database name, database engine, and associated entity. It also scans for methods annotated withSelectAll
andDeleteById
to determine the repository's supported SQL operations.- Parameters:
repositoryClass
- The class representing the repository.- Returns:
- The extracted
RepositoryMetadata
, containing database details, entity, table name, and supported operations. - Throws:
MissingRepositoryAnnotationException
- If the class is not annotated withRepository
.
-