List of usage examples for org.apache.commons.lang3.builder EqualsBuilder appendSuper
public EqualsBuilder appendSuper(final boolean superEquals)
Adds the result of super.equals()
to this builder.
From source file:gov.ca.cwds.cals.service.dto.LicenseStatusTypeDto.java
@Override public boolean equals(Object obj) { if (obj == null) { return false; }//from ww w . j av a 2 s .co m if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } LicenseStatusTypeDto licenseStatusTypeDto = (LicenseStatusTypeDto) obj; EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder.appendSuper(super.equals(obj)); equalsBuilder.append(isActive, licenseStatusTypeDto.isActive); return equalsBuilder.isEquals(); }
From source file:com.silverpeas.gallery.web.PhotoEntityMatcher.java
@Override public boolean matches(final Object item) { boolean match = false; if (item instanceof PhotoEntity) { final PhotoEntity actual = (PhotoEntity) item; final EqualsBuilder matcher = new EqualsBuilder(); matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3/photos/7")); matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/3")); matcher.append("photo", actual.getType()); matcher.append(expected.getId(), actual.getId()); matcher.append(expected.getTitle(), actual.getTitle()); matcher.append(expected.getDescription(), actual.getDescription()); matcher.appendSuper(/*from w w w. j ava 2 s . c om*/ actual.getPreviewUrl().endsWith("/gallery/componentName5/albums/3/photos/7/previewContent")); matcher.appendSuper(actual.getUrl().endsWith("/gallery/componentName5/albums/3/photos/7/content")); match = matcher.isEquals(); } return match; }
From source file:com.silverpeas.gallery.web.AlbumEntityMatcher.java
@SuppressWarnings("unchecked") @Override//from w ww . j a va2 s. c o m public boolean matches(final Object item) { boolean match = false; if (item instanceof LinkedHashMap) { final AlbumEntity actual = from((LinkedHashMap<String, Object>) item); final EqualsBuilder matcher = new EqualsBuilder(); matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3")); matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/0")); matcher.append(String.valueOf(expected.getId()), actual.getId()); matcher.append(expected.getName(), actual.getTitle()); matcher.append(expected.getDescription(), actual.getDescription()); matcher.append(4, actual.getMediaList().size()); Set<String> keySet = actual.getMediaList().keySet(); matcher.appendSuper(keySet.contains(PHOTO_ID)); matcher.appendSuper(keySet.contains(VIDEO_ID)); matcher.appendSuper(keySet.contains(SOUND_ID)); matcher.appendSuper(keySet.contains(STREAMING_ID)); match = matcher.isEquals(); } return match; }
From source file:com.silverpeas.gallery.web.MediaEntityMatcher.java
@SuppressWarnings("unchecked") @Override/*w w w . ja v a 2 s. c o m*/ public boolean matches(final Object item) { boolean match = false; if (item instanceof LinkedHashMap) { final AbstractMediaEntity actual = from((LinkedHashMap<String, Object>) item); final EqualsBuilder matcher = new EqualsBuilder(); matcher.appendSuper(actual.getURI().toString().endsWith("/gallery/componentName5/albums/3/" + expected.getType().getMediaWebUriPart() + "/" + expected.getId())); matcher.appendSuper(actual.getParentURI().toString().endsWith("/gallery/componentName5/albums/3")); matcher.append(expected.getType(), actual.getType()); matcher.append(expected.getId(), actual.getId()); matcher.append(expected.getTitle(), actual.getTitle()); matcher.append(expected.getDescription(), actual.getDescription()); // URL if (expected.getInternalMedia() != null) { matcher.appendSuper(actual.getUrl().toString() .endsWith("/gallery/componentName5/" + expected.getType().getMediaWebUriPart() + "/" + expected.getId() + "/content?_t=1325372400000")); } else { matcher.appendSuper( actual.getUrl().toString().equals("/homepageUrl/componentName5/" + expected.getId())); } // Other URLs if (expected.getType().isPhoto()) { PhotoEntity photoEntity = (PhotoEntity) actual; matcher.appendSuper(photoEntity.getPreviewUrl().toString() .contains("/silverpeas/services/gallery/componentName5/photos/7/content?_t=1325372400000" + "&resolution=PREVIEW")); matcher.appendSuper(photoEntity.getThumbUrl().toString() .contains("/silverpeas/gallery/jsp/icons/notAvailable_fr_133x100.jpg")); } else { matcher.appendSuper(actual.getThumbUrl().toString().equals("/silverpeas/gallery/jsp/icons/" + expected.getType().getName().toLowerCase() + "_266x150.png")); } match = matcher.isEquals(); } return match; }
From source file:com.norconex.committer.core.AbstractBatchCommitter.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }// w ww . j av a2 s .c o m if (obj == null) { return false; } if (!(obj instanceof AbstractBatchCommitter)) { return false; } AbstractBatchCommitter other = (AbstractBatchCommitter) obj; EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder.appendSuper(super.equals(other)); equalsBuilder.append(commitBatchSize, other.commitBatchSize); equalsBuilder.append(maxRetries, other.maxRetries); equalsBuilder.append(maxRetryWait, other.maxRetryWait); equalsBuilder.append(operations, other.operations); return equalsBuilder.isEquals(); }
From source file:com.norconex.committer.core.AbstractFileQueueCommitter.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }/*from w ww . j a v a2s. c o m*/ if (obj == null) { return false; } if (!(obj instanceof AbstractFileQueueCommitter)) { return false; } AbstractFileQueueCommitter other = (AbstractFileQueueCommitter) obj; EqualsBuilder equalsBuilder = new EqualsBuilder(); equalsBuilder.appendSuper(super.equals(other)); equalsBuilder.append(queue, other.queue); return equalsBuilder.isEquals(); }
From source file:io.netlibs.bgp.protocol.attributes.PathAttribute.java
@Override public boolean equals(final Object obj) { if (!(obj instanceof PathAttribute)) { return false; }/* w w w . j a v a2s . com*/ final PathAttribute o = (PathAttribute) obj; final EqualsBuilder builder = new EqualsBuilder(); builder.append(this.internalType(), o.internalType()).append(this.getCategory(), o.getCategory()) .append(this.isOptional(), o.isOptional()).append(this.isPartial(), o.isPartial()) .append(this.isTransitive(), o.isTransitive()); if (this.internalType() == o.internalType()) { builder.appendSuper(this.subclassEquals(o)); } return builder.isEquals(); }
From source file:org.bgp4j.net.attributes.PathAttribute.java
@Override public boolean equals(Object obj) { if (!(obj instanceof PathAttribute)) return false; PathAttribute o = (PathAttribute) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(internalType(), o.internalType()).append(getCategory(), o.getCategory()) .append(isOptional(), o.isOptional()).append(isPartial(), o.isPartial()) .append(isTransitive(), o.isTransitive()); if (internalType() == o.internalType()) builder.appendSuper(subclassEquals(o)); return builder.isEquals(); }
From source file:org.sakaiproject.tool.assessment.data.dao.grading.AssessmentGradingData.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; AssessmentGradingData other = (AssessmentGradingData) obj; EqualsBuilder builder = new EqualsBuilder(); builder.appendSuper(super.equals(obj)); builder.append(agentId, other.agentId); builder.append(assessmentGradingId, other.assessmentGradingId); builder.append(attemptDate, other.attemptDate); builder.append(comments, other.comments); builder.append(finalScore, other.finalScore); builder.append(forGrade, other.forGrade); builder.append(gradedBy, other.gradedBy); builder.append(gradedDate, other.gradedDate); builder.append(isAutoSubmitted, other.isAutoSubmitted); builder.append(isLate, other.isLate); builder.append(isRecorded, other.isRecorded); builder.append(itemGradingSet, other.itemGradingSet); builder.append(lastVisitedPart, other.lastVisitedPart); builder.append(lastVisitedQuestion, other.lastVisitedQuestion); builder.append(publishedAssessmentId, other.publishedAssessmentId); builder.append(publishedAssessmentTitle, other.publishedAssessmentTitle); builder.append(publishedItemId, other.publishedItemId); builder.append(status, other.status); builder.append(submittedDate, other.submittedDate); builder.append(timeElapsed, other.timeElapsed); builder.append(totalAutoScore, other.totalAutoScore); builder.append(totalOverrideScore, other.totalOverrideScore); builder.append(totalSubmitted, other.totalSubmitted); return builder.isEquals(); }
From source file:org.sakaiproject.tool.assessment.data.dao.grading.ItemGradingData.java
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ItemGradingData other = (ItemGradingData) obj; EqualsBuilder builder = new EqualsBuilder(); builder.appendSuper(super.equals(obj)); builder.append(agentId, other.agentId); builder.append(answerText, other.answerText); builder.append(assessmentGradingId, other.assessmentGradingId); builder.append(attemptsRemaining, other.attemptsRemaining); builder.append(autoScore, other.autoScore); builder.append(comments, other.comments); builder.append(gradedBy, other.gradedBy); builder.append(gradedDate, other.gradedDate); builder.append(itemGradingId, other.itemGradingId); builder.append(isCorrect, other.isCorrect); builder.append(lastDuration, other.lastDuration); builder.append(mediaArray, other.mediaArray); builder.append(overrideScore, other.overrideScore); builder.append(publishedAnswerId, other.publishedAnswerId); builder.append(publishedItemId, other.publishedItemId); builder.append(publishedItemTextId, other.publishedItemTextId); builder.append(rationale, other.rationale); builder.append(review, other.review); builder.append(submittedDate, other.submittedDate); return builder.isEquals(); }