This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit a25f689e authored by Daniel Rainer's avatar Daniel Rainer
Browse files

Refactor SearchResultDTO.equals

parent 24d8c1ff
Branches
Tags
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!2Add gitlab metadata
...@@ -480,118 +480,41 @@ public class SearchResultsDTO { ...@@ -480,118 +480,41 @@ public class SearchResultsDTO {
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (this == obj) if (this == obj) {
return true; return true;
if (obj == null) }
return false; if (!(obj instanceof SearchResultDTO)) {
if (getClass() != obj.getClass()) return false;
return false; }
SearchResultDTO other = (SearchResultDTO) obj; SearchResultDTO other = (SearchResultDTO) obj;
if (audience == null) { return Objects.equals(this.audience, other.audience)
if (other.audience != null) && Arrays.equals(this.collectionContent, other.collectionContent)
return false; && Arrays.equals(this.contributor, other.contributor)
} else if (!audience.equals(other.audience)) && Arrays.equals(this.creator, other.creator)
return false; && this.deprecated == other.deprecated
if (!Arrays.equals(collectionContent, other.collectionContent)) && Objects.equals(this.description, other.description)
return false; && Objects.equals(this.difficulty, other.difficulty)
if (!Arrays.equals(contributor, other.contributor)) && Objects.equals(this.educationLevel, other.educationLevel)
return false; && Arrays.equals(this.format, other.format)
if (!Arrays.equals(creator, other.creator)) && Objects.equals(this.gitURL, other.gitURL)
return false; && Objects.equals(this.identifier, other.identifier)
if (deprecated != other.deprecated) && Objects.equals(this.image, other.image)
return false; && Arrays.equals(this.keyword, other.keyword)
if (description == null) { && Arrays.equals(this.language, other.language)
if (other.description != null) && Objects.equals(this.license, other.license)
return false; && Objects.equals(this.metadataVersion, other.metadataVersion)
} else if (!description.equals(other.description)) && Arrays.equals(this.programmingLanguage, other.programmingLanguage)
return false; && Objects.equals(this.project, other.project)
if (difficulty == null) { && Arrays.equals(this.publisher, other.publisher)
if (other.difficulty != null) && Objects.equals(this.repositoryURL, other.repositoryURL)
return false; && Arrays.equals(this.requires, other.requires)
} else if (!difficulty.equals(other.difficulty)) && Arrays.equals(this.source, other.source)
return false; && Objects.equals(this.status, other.status)
if (educationLevel == null) { && Objects.equals(this.structure, other.structure)
if (other.educationLevel != null) && Objects.equals(this.timeRequired, other.timeRequired)
return false; && Objects.equals(this.title, other.title)
} else if (!educationLevel.equals(other.educationLevel)) && this.type == other.type
return false; && Objects.equals(this.version, other.version);
if (!Arrays.equals(format, other.format))
return false;
if (gitURL == null) {
if (other.gitURL != null)
return false;
} else if (!gitURL.equals(other.gitURL))
return false;
if (identifier == null) {
if (other.identifier != null)
return false;
} else if (!identifier.equals(other.identifier))
return false;
if (image == null) {
if (other.image != null)
return false;
} else if (!image.equals(other.image))
return false;
if (!Arrays.equals(keyword, other.keyword))
return false;
if (!Arrays.equals(language, other.language))
return false;
if (license == null) {
if (other.license != null)
return false;
} else if (!license.equals(other.license))
return false;
if (metadataVersion == null) {
if (other.metadataVersion != null)
return false;
} else if (!metadataVersion.equals(other.metadataVersion))
return false;
if (!Arrays.equals(programmingLanguage, other.programmingLanguage))
return false;
if (project == null) {
if (other.project != null)
return false;
} else if (!project.equals(other.project))
return false;
if (!Arrays.equals(publisher, other.publisher))
return false;
if (repositoryURL == null) {
if (other.repositoryURL != null)
return false;
} else if (!repositoryURL.equals(other.repositoryURL))
return false;
if (!Arrays.equals(requires, other.requires))
return false;
if (!Arrays.equals(source, other.source))
return false;
if (status == null) {
if (other.status != null)
return false;
} else if (!status.equals(other.status))
return false;
if (structure == null) {
if (other.structure != null)
return false;
} else if (!structure.equals(other.structure))
return false;
if (timeRequired == null) {
if (other.timeRequired != null)
return false;
} else if (!timeRequired.equals(other.timeRequired))
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
if (type != other.type)
return false;
if (version == null) {
if (other.version != null)
return false;
} else if (!version.equals(other.version))
return false;
return true;
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment