Class SchemaModelValidatorImpl
java.lang.Object
ch.tocco.nice2.model.entity.impl.schema.SchemaModelValidatorImpl
- All Implemented Interfaces:
SchemaModelValidator
Executes the
SchemaModelValidatorTask
in the backround. If the task
is already running a reference to the future is returned.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.entity.api.schema.SchemaModelValidator
SchemaModelValidator.Result
-
Constructor Summary
ConstructorDescriptionSchemaModelValidatorImpl
(org.slf4j.Logger log, ThreadHandlerManager threadHandlerManager, DataModel dataModel, MetaDataRegistry metaDataRegistry, Metamodel metamodel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProgress
(ValidationProgress progress) Adds aValidationProgress
to the list of global progress callbacks.void
addReporter
(Reporter reporter) Adds aReporter
to the global list of reporters.com.google.common.util.concurrent.ListenableFuture
<SchemaModelValidator.Result> checkDataModel
(ValidationProgress validationProgress, Reporter reporter) Starts validating the entity model against the database.boolean
Check if the validation is currently in progress.void
removeProgress
(ValidationProgress progress) void
removeReporter
(Reporter reporter) void
setEntityChecks
(List<SchemaCheck> entityChecks) void
setIgnoredTables
(List<String> ignoredTables) void
setProgresses
(List<ValidationProgress> progresses) void
setReporters
(List<Reporter> reporters)
-
Constructor Details
-
SchemaModelValidatorImpl
public SchemaModelValidatorImpl(org.slf4j.Logger log, ThreadHandlerManager threadHandlerManager, DataModel dataModel, MetaDataRegistry metaDataRegistry, @Lazy Metamodel metamodel)
-
-
Method Details
-
setIgnoredTables
-
checkDataModel
public com.google.common.util.concurrent.ListenableFuture<SchemaModelValidator.Result> checkDataModel(ValidationProgress validationProgress, Reporter reporter) Description copied from interface:SchemaModelValidator
Starts validating the entity model against the database. If already running, this just returns the future representing the currently running validation task. In this case the givenprogressCallback
andadditionalReporter
arguments are not taken into account.- Specified by:
checkDataModel
in interfaceSchemaModelValidator
-
isRunning
public boolean isRunning()Description copied from interface:SchemaModelValidator
Check if the validation is currently in progress.- Specified by:
isRunning
in interfaceSchemaModelValidator
-
setEntityChecks
-
setReporters
-
setProgresses
-
addProgress
Description copied from interface:SchemaModelValidator
Adds aValidationProgress
to the list of global progress callbacks.- Specified by:
addProgress
in interfaceSchemaModelValidator
-
removeProgress
- Specified by:
removeProgress
in interfaceSchemaModelValidator
-
addReporter
Description copied from interface:SchemaModelValidator
Adds aReporter
to the global list of reporters.- Specified by:
addReporter
in interfaceSchemaModelValidator
-
removeReporter
- Specified by:
removeReporter
in interfaceSchemaModelValidator
-