public Revision toRevision() { return new Revision(getVersion(), getClientId(), getComponentId()); }
@Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if ((obj instanceof ComponentRevision) == false) { return false; } ComponentRevision thatRevision = (ComponentRevision) obj; // ensure that component ID's are the same (including null) if (thatRevision.getComponentId() == null && getComponentId() != null) { return false; } if (thatRevision.getComponentId() != null && getComponentId() == null) { return false; } if (thatRevision.getComponentId() != null && !thatRevision.getComponentId().equals(getComponentId())) { return false; } if (this.version != null && this.version.equals(thatRevision.version)) { return true; } else { return clientId != null && !clientId.trim().isEmpty() && clientId.equals(thatRevision.getClientId()); } }
public Revision toRevision() { return new Revision(getVersion(), getClientId(), getComponentId()); }
@Override public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if ((obj instanceof ComponentRevision) == false) { return false; } ComponentRevision thatRevision = (ComponentRevision) obj; // ensure that component ID's are the same (including null) if (thatRevision.getComponentId() == null && getComponentId() != null) { return false; } if (thatRevision.getComponentId() != null && getComponentId() == null) { return false; } if (thatRevision.getComponentId() != null && !thatRevision.getComponentId().equals(getComponentId())) { return false; } if (this.version != null && this.version.equals(thatRevision.version)) { return true; } else { return clientId != null && !clientId.trim().isEmpty() && clientId.equals(thatRevision.getClientId()); } }