List of usage examples for org.apache.commons.lang.builder EqualsBuilder appendSuper
public EqualsBuilder appendSuper(boolean superEquals)
Adds the result of super.equals()
to this builder.
From source file:eu.datex2.schema._2_0rc2._2_0.HeaderInformation.java
/** * Equals./*w ww . j av a 2 s .com*/ * * @param object the object * @param equalsBuilder the equals builder */ public final void equals(final Object object, final EqualsBuilder equalsBuilder) { if (!(object instanceof HeaderInformation)) { equalsBuilder.appendSuper(false); return; } if (this == object) { return; } final HeaderInformation that = ((HeaderInformation) object); equalsBuilder.append(this.getAreaOfInterest(), that.getAreaOfInterest()); equalsBuilder.append(this.getConfidentiality(), that.getConfidentiality()); equalsBuilder.append(this.getInformationStatus(), that.getInformationStatus()); equalsBuilder.append(this.getUrgency(), that.getUrgency()); equalsBuilder.append(this.getHeaderInformationExtension(), that.getHeaderInformationExtension()); }
From source file:eu.datex2.schema._2_0rc2._2_0.Situation.java
/** * Equals.//from ww w .j ava 2s. c om * * @param object the object * @param equalsBuilder the equals builder */ public void equals(Object object, EqualsBuilder equalsBuilder) { if (!(object instanceof Situation)) { equalsBuilder.appendSuper(false); return; } if (this == object) { return; } final Situation that = ((Situation) object); equalsBuilder.append(this.getHeaderInformation(), that.getHeaderInformation()); equalsBuilder.append(this.getSituationRecord(), that.getSituationRecord()); equalsBuilder.append(this.getSituationExtension(), that.getSituationExtension()); equalsBuilder.append(this.getId(), that.getId()); equalsBuilder.append(this.getVersion(), that.getVersion()); }
From source file:eu.datex2.schema._2_0rc2._2_0.D2LogicalModel.java
/** * Equals.// ww w. jav a 2 s .co m * * @param object the object * @param equalsBuilder the equals builder */ public final void equals(final Object object, final EqualsBuilder equalsBuilder) { if (!(object instanceof D2LogicalModel)) { equalsBuilder.appendSuper(false); return; } if (this == object) { return; } final D2LogicalModel that = ((D2LogicalModel) object); equalsBuilder.append(this.getExchange(), that.getExchange()); equalsBuilder.append(this.getPayloadPublication(), that.getPayloadPublication()); equalsBuilder.append(this.getD2LogicalModelExtension(), that.getD2LogicalModelExtension()); equalsBuilder.append(this.getModelBaseVersion(), that.getModelBaseVersion()); equalsBuilder.append(this.getExtensionName(), that.getExtensionName()); equalsBuilder.append(this.getExtensionVersion(), that.getExtensionVersion()); }
From source file:eu.datex2.schema._2_0rc2._2_0.OpenlrBasePointLocation.java
/** * Equals./*from w w w.java 2s . com*/ * * @param object the object * @param equalsBuilder the equals builder */ public void equals(final Object object, final EqualsBuilder equalsBuilder) { if (!(object instanceof OpenlrBasePointLocation)) { equalsBuilder.appendSuper(false); return; } if (this == object) { return; } final OpenlrBasePointLocation that = ((OpenlrBasePointLocation) object); equalsBuilder.append(this.getOpenlrSideOfRoad(), that.getOpenlrSideOfRoad()); equalsBuilder.append(this.getOpenlrOrientation(), that.getOpenlrOrientation()); equalsBuilder.append(this.getOpenlrPositiveOffset(), that.getOpenlrPositiveOffset()); equalsBuilder.append(this.getOpenlrLocationReferencePoint(), that.getOpenlrLocationReferencePoint()); equalsBuilder.append(this.getOpenlrLastLocationReferencePoint(), that.getOpenlrLastLocationReferencePoint()); equalsBuilder.append(this.getOpenlrBasePointLocationExtension(), that.getOpenlrBasePointLocationExtension()); }
From source file:com.googlecode.markuputils.MarkupBuilder.java
@Override public boolean equals(Object obj) { EqualsBuilder builder = new EqualsBuilder(); if (obj instanceof MarkupBuilder) { MarkupBuilder other = (MarkupBuilder) obj; builder.append(buffer, other.buffer); } else {/*ww w.j av a 2s. c om*/ builder.appendSuper(false); } return builder.isEquals(); }
From source file:eu.datex2.schema._2_0rc2._2_0.SituationRecord.java
/** * Equals./*from ww w.j a va 2 s .c o m*/ * * @param object * the object * @param equalsBuilder * the equals builder */ public void equals(final Object object, final EqualsBuilder equalsBuilder) { if (!(object instanceof SituationRecord)) { equalsBuilder.appendSuper(false); return; } if (this == object) { return; } final SituationRecord that = ((SituationRecord) object); equalsBuilder.append(this.getSituationRecordCreationTime(), that.getSituationRecordCreationTime()); equalsBuilder.append(this.getSituationRecordVersionTime(), that.getSituationRecordVersionTime()); equalsBuilder.append(this.getProbabilityOfOccurrence(), that.getProbabilityOfOccurrence()); equalsBuilder.append(this.getValidity(), that.getValidity()); equalsBuilder.append(this.getGroupOfLocations(), that.getGroupOfLocations()); equalsBuilder.append(this.getSituationRecordExtension(), that.getSituationRecordExtension()); equalsBuilder.append(this.getId(), that.getId()); equalsBuilder.append(this.getVersion(), that.getVersion()); }
From source file:com.silverpeas.subscribe.web.SubscriptionEntityMatcher.java
@Override public boolean matches(Object item) { if (item instanceof SubscriptionEntity) { SubscriptionEntity actual = (SubscriptionEntity) item; EqualsBuilder match = new EqualsBuilder(); // Resource match.append(subscription.getResource().getId(), actual.getResource().getId()); match.append(subscription.getResource().getInstanceId(), actual.getResource().getInstanceId()); switch (subscription.getResource().getType()) { case NODE: match.appendSuper(!actual.getResource().isComponent()); match.appendSuper(actual.getResource().isNode()); break; case COMPONENT: match.appendSuper(actual.getResource().isComponent()); match.appendSuper(!actual.getResource().isNode()); break; default://from w w w.ja va 2s. c om match.appendSuper(false); break; } // Subscriber match.append(subscription.getSubscriber().getId(), actual.getSubscriber().getId()); switch (subscription.getSubscriber().getType()) { case USER: match.appendSuper(!actual.getSubscriber().isGroup()); match.appendSuper(actual.getSubscriber().isUser()); break; case GROUP: match.appendSuper(actual.getSubscriber().isGroup()); match.appendSuper(!actual.getSubscriber().isUser()); break; default: match.appendSuper(false); break; } // Method switch (subscription.getSubscriptionMethod()) { case FORCED: match.appendSuper(actual.isForced()); match.appendSuper(!actual.isSelfCreation()); break; case SELF_CREATION: match.appendSuper(!actual.isForced()); match.appendSuper(actual.isSelfCreation()); break; default: match.appendSuper(false); break; } return match.isEquals(); } return false; }
From source file:fr.cls.atoll.motu.processor.iso19139.OperationMetadata.java
/** * Equals./*from w w w .ja v a 2s. c om*/ * * @param object the object * @param equalsBuilder the equals builder */ public void equals(Object object, EqualsBuilder equalsBuilder) { if (LOG.isDebugEnabled()) { LOG.debug("equals(Object, EqualsBuilder) - entering"); } if (object == null) { equalsBuilder.appendSuper(false); if (LOG.isDebugEnabled()) { LOG.debug("equals(Object, EqualsBuilder) - exiting"); } return; } if (!(object instanceof OperationMetadata)) { equalsBuilder.appendSuper(false); if (LOG.isDebugEnabled()) { LOG.debug("equals(Object, EqualsBuilder) - exiting"); } return; } if (this == object) { if (LOG.isDebugEnabled()) { LOG.debug("equals(Object, EqualsBuilder) - exiting"); } return; } final OperationMetadata that = ((OperationMetadata) object); // String thatOperationName = that.getOperationName(); // String thisOperationName = this.getOperationName(); // if (thatOperationName == null) { // equalsBuilder.appendSuper(false); // return; // } // if (thisOperationName == null) { // equalsBuilder.appendSuper(false); // return; // } equalsBuilder.append(this.getOperationName(), that.getOperationName()); equalsBuilder.append(this.getInvocationName(), that.getInvocationName()); if (LOG.isDebugEnabled()) { LOG.debug("equals(Object, EqualsBuilder) - exiting"); } }
From source file:org.glite.security.voms.admin.persistence.model.request.CertificateRequest.java
@Override public boolean equals(Object other) { if (this == other) return true; if (other == null) return false; if (!(other instanceof CertificateRequest)) return false; CertificateRequest that = (CertificateRequest) other; EqualsBuilder builder = new EqualsBuilder(); builder.appendSuper(super.equals(other)).append(certificateSubject, that.certificateSubject) .append(certificateIssuer, that.certificateIssuer); return builder.isEquals(); }
From source file:org.glite.security.voms.admin.persistence.model.request.GroupMembershipRequest.java
@Override public boolean equals(Object other) { if (this == other) return true; if (!(other instanceof GroupMembershipRequest)) return false; if (other == null) return false; GroupMembershipRequest that = (GroupMembershipRequest) other; EqualsBuilder builder = new EqualsBuilder(); return builder.appendSuper(super.equals(other)).append(groupName, that.groupName).isEquals(); }