@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SchemaMetadataStorable that = (SchemaMetadataStorable) o; if (evolve != that.evolve) return false; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (schemaGroup != null ? !schemaGroup.equals(that.schemaGroup) : that.schemaGroup != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (timestamp != null ? !timestamp.equals(that.timestamp) : that.timestamp != null) return false; if (validationLevel != null ? !validationLevel.equals(that.validationLevel) : that.validationLevel != null) return false; return compatibility == that.compatibility; }
@Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (schemaGroup != null ? schemaGroup.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0); result = 31 * result + (compatibility != null ? compatibility.hashCode() : 0); result = 31 * result + (validationLevel != null ? validationLevel.hashCode() : 0); result = 31 * result + (evolve ? 1 : 0); return result; }
@Override public Map<String, Object> toMap() { Map<String, Object> values = super.toMap(); values.put(COMPATIBILITY, compatibility.name()); values.put(VALIDATION_LEVEL, validationLevel.name()); return values; }
@Override public Storable fromMap(Map<String, Object> map) { String compatibilityName = (String) map.remove(COMPATIBILITY); compatibility = SchemaCompatibility.valueOf(compatibilityName); String validationLevelName = (String) map.remove(VALIDATION_LEVEL); validationLevel = SchemaValidationLevel.valueOf(validationLevelName); super.fromMap(map); return this; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SchemaMetadata that = (SchemaMetadata) o; if (evolve != that.evolve) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (schemaGroup != null ? !schemaGroup.equals(that.schemaGroup) : that.schemaGroup != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (getValidationLevel() != null ? !getValidationLevel().equals(that.getValidationLevel()) : that.getValidationLevel() != null) return false; return getCompatibility() == that.getCompatibility(); }
@Override public int hashCode() { int result = type != null ? type.hashCode() : 0; result = 31 * result + (schemaGroup != null ? schemaGroup.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (getCompatibility() != null ? getCompatibility().hashCode() : 0); result = 31 * result + (getValidationLevel() != null ? getValidationLevel().hashCode() : 0); result = 31 * result + (evolve ? 1 : 0); return result; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SchemaMetadata that = (SchemaMetadata) o; if (evolve != that.evolve) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (schemaGroup != null ? !schemaGroup.equals(that.schemaGroup) : that.schemaGroup != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (getValidationLevel() != null ? !getValidationLevel().equals(that.getValidationLevel()) : that.getValidationLevel() != null) return false; return getCompatibility() == that.getCompatibility(); }
@Override public int hashCode() { int result = type != null ? type.hashCode() : 0; result = 31 * result + (schemaGroup != null ? schemaGroup.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (getCompatibility() != null ? getCompatibility().hashCode() : 0); result = 31 * result + (getValidationLevel() != null ? getValidationLevel().hashCode() : 0); result = 31 * result + (evolve ? 1 : 0); return result; }
if (validationLevel.equals(SchemaValidationLevel.ALL)) { for (SchemaVersionInfo curSchemaVersionInfo : allEnabledSchemaVersions) { int curVersion = curSchemaVersionInfo.getVersion(); } else if (validationLevel.equals(SchemaValidationLevel.LATEST)) { List<SchemaVersionInfo> sortedSchemaVersionInfos = new ArrayList<>(allEnabledSchemaVersions); sortedSchemaVersionInfos.sort(Comparator.comparingInt(SchemaVersionInfo::getVersion));
if (validationLevel.equals(SchemaValidationLevel.ALL)) { for (SchemaVersionInfo curSchemaVersionInfo : allEnabledSchemaVersions) { int curVersion = curSchemaVersionInfo.getVersion(); } else if (validationLevel.equals(SchemaValidationLevel.LATEST)) { List<SchemaVersionInfo> sortedSchemaVersionInfos = new ArrayList<>(allEnabledSchemaVersions); sortedSchemaVersionInfos.sort(Comparator.comparingInt(SchemaVersionInfo::getVersion));