@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Configuration other = (Configuration) obj; if (!Arrays.equals(configurationBody, other.configurationBody)) { return false; } if (configurationSchema == null) { if (other.configurationSchema != null) { return false; } } else if (!configurationSchema.equals(other.configurationSchema)) { return false; } return true; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + super.hashCode(); result = prime * result + Arrays.hashCode(configurationBody); result = prime * result + ((configurationSchema == null) ? 0 : configurationSchema.hashCode()); return result; }
@Override public T toDto() { T dto = createDto(); dto.setId(getStringId()); if (application != null) { dto.setApplicationId(application.getStringId()); } if (endpointGroup != null) { dto.setEndpointGroupId(endpointGroup.getStringId()); } dto.setSequenceNumber(sequenceNumber); dto.setDescription(description); dto.setCreatedTime(createdTime); dto.setLastModifyTime(lastModifyTime); dto.setActivatedTime(activatedTime); dto.setDeactivatedTime(deactivatedTime); dto.setCreatedUsername(createdUsername); dto.setModifiedUsername(modifiedUsername); dto.setActivatedUsername(activatedUsername); dto.setDeactivatedUsername(deactivatedUsername); dto.setStatus(status); dto.setEndpointCount(endpointCount); dto.setVersion(version); return dto; }
@Override public ConfigurationDto toDto() { ConfigurationDto dto = super.toDto(); dto.setBody(binaryToString(configurationBody)); dto.setSchemaId(ModelUtils.getStringId(configurationSchema.getId())); dto.setSchemaVersion(schemaVersion); dto.setProtocolSchema(configurationSchema != null ? configurationSchema.getProtocolSchema() : null); return dto; }
@Override public ProfileFilterDto toDto() { ProfileFilterDto filterDto = super.toDto(); filterDto.setBody(body); if (endpointProfileSchema != null) { filterDto.setEndpointProfileSchemaId(endpointProfileSchema.getStringId()); filterDto.setEndpointProfileSchemaVersion(endpointProfileSchema.getVersion()); } if (serverProfileSchema != null) { filterDto.setServerProfileSchemaId(serverProfileSchema.getStringId()); filterDto.setServerProfileSchemaVersion(serverProfileSchema.getVersion()); } return filterDto; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (body != null ? body.hashCode() : 0); result = 31 * result + (endpointProfileSchema != null ? endpointProfileSchema.hashCode() : 0); result = 31 * result + (serverProfileSchema != null ? serverProfileSchema.hashCode() : 0); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } if (!super.equals(obj)) { return false; } ProfileFilter that = (ProfileFilter) obj; if (body != null ? !body.equals(that.body) : that.body != null) { return false; } if (endpointProfileSchema != null ? !endpointProfileSchema.equals(that.endpointProfileSchema) : that.endpointProfileSchema != null) { return false; } return serverProfileSchema != null ? serverProfileSchema.equals(that.serverProfileSchema) : that.serverProfileSchema == null; }