public final class ValidationReport
extends java.lang.Object
Validation code checks if SQL tables conform tables definition in Zserio.
The following validation steps are taken:
1. Table schema validation. Table schema is read from SQLite and checked according to the Zserio table specification in Zserio. It's checked if number of columns is correct and if each column has expected type and expected 'isNotNull' and 'isPrimaryKey' flags.
2. Validation of column values. Each blob or integer value stored in table is read from SQLite and checked. Blobs are read from the bit stream and written again. Then read bit stream is binary compared with the written stream. Integer values are checked according to their boundaries specified in Zserio.
Constructor and Description |
---|
ValidationReport()
Constructs a default validation report.
|
ValidationReport(int numberOfValidatedTables,
int numberOfValidatedRows,
long totalValidationTime,
long totalParameterProviderTime,
java.util.List<ValidationError> errors)
Constructs a new validation report from given arguments.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ValidationReport other)
Adds other validation report to this report.
|
java.util.List<ValidationError> |
getErrors()
Gets the list of all validation errors.
|
int |
getNumberOfValidatedRows()
Gets the number of validated table rows.
|
int |
getNumberOfValidatedTables()
Gets the number of validated tables.
|
long |
getTotalParameterProviderTime()
Gets total time in milliseconds spent in parameter provider callback implemented by called application.
|
long |
getTotalValidationTime()
Gets total time in milliseconds spent in validation method generated by Zserio.
|
public ValidationReport()
public ValidationReport(int numberOfValidatedTables, int numberOfValidatedRows, long totalValidationTime, long totalParameterProviderTime, java.util.List<ValidationError> errors)
numberOfValidatedTables
- Number of validated tables to construct from.numberOfValidatedRows
- Number of validated rows to construct from.totalValidationTime
- Total validation time in milliseconds to construct from.totalParameterProviderTime
- Total parameter provider time in milliseconds to construct from.errors
- List of validation error to construct from.public int getNumberOfValidatedTables()
public int getNumberOfValidatedRows()
public long getTotalValidationTime()
public long getTotalParameterProviderTime()
public java.util.List<ValidationError> getErrors()
public void add(ValidationReport other)
other
- Validation report to add.Last updated 2024-12-05 10:34:50