Package persist.lint.legacy
Class LegacySchemaValidator
java.lang.Object
persist.lint.legacy.LegacySchemaValidator
- All Implemented Interfaces:
PersistenceLinter,SchemaValidator
SchemaValidator implementation for the legacy
javax.persistence namespace ("javax").
Uses Hibernate 5 to build the entity metamodel from the discovered annotated classes and validates it against the live database schema reachable through the supplied JDBC connection properties.
- Since:
- 2.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic LegacySchemaValidatorCreates a newLegacySchemaValidatorfor the given entity class names.voidvalidateSchema(Map<String, String> connectionProperties) Validates the persistence schema against the database described by the given connection properties.
-
Method Details
-
of
Creates a newLegacySchemaValidatorfor the given entity class names.- Parameters:
discoveredClasses- fully qualified class names of the JPA entities to register in the metamodel- Returns:
- a new schema validator instance
-
validateSchema
Validates the persistence schema against the database described by the given connection properties.The map is expected to contain at least the keys
"driver","url","username", and"password".- Specified by:
validateSchemain interfaceSchemaValidator- Parameters:
connectionProperties- JDBC connection properties used to reach the target database
-