Class DatabaseProcessor
java.lang.Object
dimstyl.orm.internal.processors.DatabaseProcessor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Private constructor to prevent instantiation. -
Method Summary
Modifier and TypeMethodDescriptionstatic DatabaseMetadata
extractMetadata
(Class<?> databaseClass) Extracts metadata from a given class annotated withDatabase
.
-
Constructor Details
-
DatabaseProcessor
private DatabaseProcessor()Private constructor to prevent instantiation.
-
-
Method Details
-
extractMetadata
public static DatabaseMetadata extractMetadata(Class<?> databaseClass) throws MissingDatabaseAnnotationException, DatabaseConnectionException, MissingTableAnnotationException, UnsupportedFieldTypeException Extracts metadata from a given class annotated withDatabase
.This method validates the presence of the
Database
annotation, retrieves the database name, determines the database engine, and processes associated tables. It also connects to the database using theDatabaseConfigurationFactory
.- Parameters:
databaseClass
- The class representing the database configuration.- Returns:
- The extracted
DatabaseMetadata
, containing database name, engine, SQL operation, and table metadata. - Throws:
MissingDatabaseAnnotationException
- If the class is not annotated withDatabase
.DatabaseConnectionException
- If a connection to the database cannot be established.MissingTableAnnotationException
- If a table entity is not annotated withTable
.UnsupportedFieldTypeException
- If a table contains an unsupported field type.
-