Skip to content

Commit

Permalink
Fixed about 200 style warns.
Browse files Browse the repository at this point in the history
  • Loading branch information
Acarus committed Sep 28, 2016
1 parent 1bc379f commit e9f06cb
Show file tree
Hide file tree
Showing 10 changed files with 468 additions and 206 deletions.

Large diffs are not rendered by default.

Expand Up @@ -40,7 +40,7 @@ protected String getColumnFamilyName() {
return CassandraModelConstants.EP_BY_ACCESS_TOKEN_COLUMN_FAMILY_NAME;
}

public ByteBuffer findEPIdByAccessToken(String accessToken) {
public ByteBuffer findEpIdByAccessToken(String accessToken) {
LOG.debug("Try to find endpoint key hash by access token {}", accessToken);
ByteBuffer endpointKeyHash = null;
CassandraEPByAccessToken result = findById(accessToken);
Expand Down
Expand Up @@ -50,7 +50,8 @@ public final class CassandraEndpointNotification implements EndpointNotification
private Integer seqNum;
@Column(name = CassandraModelConstants.ET_NF_ID_PROPERTY)
private String id;
@Column(name = CassandraModelConstants.ET_NF_NOTIFICATION_TYPE_PROPERTY, codec = NotificationTypeCodec.class)
@Column(name = CassandraModelConstants.ET_NF_NOTIFICATION_TYPE_PROPERTY,
codec = NotificationTypeCodec.class)
private NotificationTypeDto type;
@Column(name = CassandraModelConstants.ET_NF_APPLICATION_ID_PROPERTY)
private String applicationId;
Expand Down Expand Up @@ -201,26 +202,62 @@ public void setTopicId(String topicId) {
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
public boolean equals(Object object) {
if (this == object) {
return true;
}

if (object == null || getClass() != object.getClass()) {
return false;
}

CassandraEndpointNotification that = (CassandraEndpointNotification) o;
CassandraEndpointNotification that = (CassandraEndpointNotification) object;

if (nfVersion != that.nfVersion) return false;
if (applicationId != null ? !applicationId.equals(that.applicationId) : that.applicationId != null)
if (nfVersion != that.nfVersion) {
return false;
if (body != null ? !body.equals(that.body) : that.body != null) return false;
if (endpointKeyHash != null ? !endpointKeyHash.equals(that.endpointKeyHash) : that.endpointKeyHash != null)
}

if (applicationId != null
? !applicationId.equals(that.applicationId)
: that.applicationId != null) {
return false;
if (expiredAt != null ? !expiredAt.equals(that.expiredAt) : that.expiredAt != null)
}

if (body != null ? !body.equals(that.body) : that.body != null) {
return false;
if (id != null ? !id.equals(that.id) : that.id != null) return false;
if (lastModifyTime != null ? !lastModifyTime.equals(that.lastModifyTime) : that.lastModifyTime != null)
}

if (endpointKeyHash != null
? !endpointKeyHash.equals(that.endpointKeyHash)
: that.endpointKeyHash != null) {
return false;
if (schemaId != null ? !schemaId.equals(that.schemaId) : that.schemaId != null) return false;
if (seqNum != null ? !seqNum.equals(that.seqNum) : that.seqNum != null) return false;
if (type != that.type) return false;
}

if (expiredAt != null ? !expiredAt.equals(that.expiredAt) : that.expiredAt != null) {
return false;
}

if (id != null ? !id.equals(that.id) : that.id != null) {
return false;
}

if (lastModifyTime != null
? !lastModifyTime.equals(that.lastModifyTime)
: that.lastModifyTime != null) {
return false;
}

if (schemaId != null ? !schemaId.equals(that.schemaId) : that.schemaId != null) {
return false;
}

if (seqNum != null ? !seqNum.equals(that.seqNum) : that.seqNum != null) {
return false;
}

if (type != that.type) {
return false;
}

return true;
}
Expand All @@ -242,18 +279,18 @@ public int hashCode() {

@Override
public String toString() {
return "CassandraEndpointNotification{" +
"endpointKeyHash=" + endpointKeyHash +
", seqNum=" + seqNum +
", id='" + id + '\'' +
", type=" + type +
", applicationId='" + applicationId + '\'' +
", schemaId='" + schemaId + '\'' +
", nfVersion=" + nfVersion +
", lastModifyTime=" + lastModifyTime +
", body=" + body +
", expiredAt=" + expiredAt +
'}';
return "CassandraEndpointNotification{"
+ "endpointKeyHash=" + endpointKeyHash
+ ", seqNum=" + seqNum
+ ", id='" + id + '\''
+ ", type=" + type
+ ", applicationId='" + applicationId + '\''
+ ", schemaId='" + schemaId + '\''
+ ", nfVersion=" + nfVersion
+ ", lastModifyTime=" + lastModifyTime
+ ", body=" + body
+ ", expiredAt=" + expiredAt
+ '}';
}

@Override
Expand Down
Expand Up @@ -375,42 +375,151 @@ public void setVersion(Long version) {
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

CassandraEndpointProfile that = (CassandraEndpointProfile) o;

if (sequenceNumber != that.sequenceNumber) return false;
if (profileVersion != that.profileVersion) return false;
if (serverProfileVersion != that.serverProfileVersion) return false;
if (configurationVersion != that.configurationVersion) return false;
if (notificationVersion != that.notificationVersion) return false;
if (systemNfVersion != that.systemNfVersion) return false;
if (userNfVersion != that.userNfVersion) return false;
if (logSchemaVersion != that.logSchemaVersion) return false;
if (endpointKeyHash != null ? !endpointKeyHash.equals(that.endpointKeyHash) : that.endpointKeyHash != null) return false;
if (id != null ? !id.equals(that.id) : that.id != null) return false;
if (endpointProfileKey != null ? !endpointProfileKey.equals(that.endpointProfileKey) : that.endpointProfileKey != null)
public boolean equals(Object object) {
if (this == object) {
return true;
}

if (object == null || getClass() != object.getClass()) {
return false;
}

CassandraEndpointProfile that = (CassandraEndpointProfile) object;

if (sequenceNumber != that.sequenceNumber) {
return false;
}

if (profileVersion != that.profileVersion) {
return false;
}

if (serverProfileVersion != that.serverProfileVersion) {
return false;
}

if (configurationVersion != that.configurationVersion) {
return false;
}

if (notificationVersion != that.notificationVersion) {
return false;
}

if (systemNfVersion != that.systemNfVersion) {
return false;
}

if (userNfVersion != that.userNfVersion) {
return false;
}

if (logSchemaVersion != that.logSchemaVersion) {
return false;
}

if (endpointKeyHash != null
? !endpointKeyHash.equals(that.endpointKeyHash)
: that.endpointKeyHash != null) {
return false;
}
if (id != null ? !id.equals(that.id) : that.id != null) {
return false;
}

if (endpointProfileKey != null
? !endpointProfileKey.equals(that.endpointProfileKey)
: that.endpointProfileKey != null) {
return false;
}

if (applicationId != null
? !applicationId.equals(that.applicationId)
: that.applicationId != null) {
return false;
if (applicationId != null ? !applicationId.equals(that.applicationId) : that.applicationId != null) return false;
if (endpointUserId != null ? !endpointUserId.equals(that.endpointUserId) : that.endpointUserId != null) return false;
if (accessToken != null ? !accessToken.equals(that.accessToken) : that.accessToken != null) return false;
if (groupStates != null ? !groupStates.equals(that.groupStates) : that.groupStates != null) return false;
if (profile != null ? !profile.equals(that.profile) : that.profile != null) return false;
if (profileHash != null ? !profileHash.equals(that.profileHash) : that.profileHash != null) return false;
if (configurationHash != null ? !configurationHash.equals(that.configurationHash) : that.configurationHash != null) return false;
if (userConfigurationHash != null ? !userConfigurationHash.equals(that.userConfigurationHash) : that.userConfigurationHash != null)
}

if (endpointUserId != null
? !endpointUserId.equals(that.endpointUserId)
: that.endpointUserId != null) {
return false;
}

if (accessToken != null
? !accessToken.equals(that.accessToken)
: that.accessToken != null) {
return false;
}

if (groupStates != null
? !groupStates.equals(that.groupStates)
: that.groupStates != null) {
return false;
}

if (profile != null
? !profile.equals(that.profile)
: that.profile != null) {
return false;
}

if (profileHash != null
? !profileHash.equals(that.profileHash)
: that.profileHash != null) {
return false;
}

if (configurationHash != null
? !configurationHash.equals(that.configurationHash)
: that.configurationHash != null) {
return false;
}

if (userConfigurationHash != null
? !userConfigurationHash.equals(that.userConfigurationHash)
: that.userConfigurationHash != null) {
return false;
}

if (subscriptions != null
? !subscriptions.equals(that.subscriptions)
: that.subscriptions != null) {
return false;
}

if (topicHash != null
? !topicHash.equals(that.topicHash)
: that.topicHash != null) {
return false;
if (subscriptions != null ? !subscriptions.equals(that.subscriptions) : that.subscriptions != null) return false;
if (topicHash != null ? !topicHash.equals(that.topicHash) : that.topicHash != null) return false;
if (ecfVersionStates != null ? !ecfVersionStates.equals(that.ecfVersionStates) : that.ecfVersionStates != null) return false;
if (serverHash != null ? !serverHash.equals(that.serverHash) : that.serverHash != null) return false;
if (sdkToken != null ? !sdkToken.equals(that.sdkToken) : that.sdkToken != null) return false;
if (useConfigurationRawSchema != null ? !useConfigurationRawSchema.equals(that.useConfigurationRawSchema) : that.useConfigurationRawSchema != null) {
}

if (ecfVersionStates != null
? !ecfVersionStates.equals(that.ecfVersionStates)
: that.ecfVersionStates != null) {
return false;
}
return serverProfile != null ? serverProfile.equals(that.serverProfile) : that.serverProfile == null;

if (serverHash != null
? !serverHash.equals(that.serverHash)
: that.serverHash != null) {
return false;
}

if (sdkToken != null
? !sdkToken.equals(that.sdkToken)
: that.sdkToken != null) {
return false;
}

if (useConfigurationRawSchema != null
? !useConfigurationRawSchema.equals(that.useConfigurationRawSchema)
: that.useConfigurationRawSchema != null) {
return false;
}

return serverProfile != null
? serverProfile.equals(that.serverProfile)
: that.serverProfile == null;

}

Expand All @@ -429,7 +538,8 @@ public int hashCode() {
result = 31 * result + profileVersion;
result = 31 * result + serverProfileVersion;
result = 31 * result + (configurationHash != null ? configurationHash.hashCode() : 0);
result = 31 * result + (userConfigurationHash != null ? userConfigurationHash.hashCode() : 0);
result = 31 * result
+ (userConfigurationHash != null ? userConfigurationHash.hashCode() : 0);
result = 31 * result + configurationVersion;
result = 31 * result + notificationVersion;
result = 31 * result + (subscriptions != null ? subscriptions.hashCode() : 0);
Expand All @@ -440,42 +550,43 @@ public int hashCode() {
result = 31 * result + (ecfVersionStates != null ? ecfVersionStates.hashCode() : 0);
result = 31 * result + (serverHash != null ? serverHash.hashCode() : 0);
result = 31 * result + (sdkToken != null ? sdkToken.hashCode() : 0);
result = 31 * result + (useConfigurationRawSchema != null ? useConfigurationRawSchema.hashCode() : 0);
result = 31 * result
+ (useConfigurationRawSchema != null ? useConfigurationRawSchema.hashCode() : 0);
result = 31 * result + (serverProfile != null ? serverProfile.hashCode() : 0);
return result;
}

@Override
public String toString() {
return "CassandraEndpointProfile{" +
"endpointKeyHash=" + endpointKeyHash +
", id='" + id + '\'' +
", endpointProfileKey=" + endpointProfileKey +
", applicationId='" + applicationId + '\'' +
", endpointUserId='" + endpointUserId + '\'' +
", accessToken='" + accessToken + '\'' +
", groupStates=" + groupStates +
", sequenceNumber=" + sequenceNumber +
", profile='" + profile + '\'' +
", profileHash=" + profileHash +
", profileVersion=" + profileVersion +
", serverProfileVersion=" + serverProfileVersion +
", configurationHash=" + configurationHash +
", userConfigurationHash=" + userConfigurationHash +
", configurationVersion=" + configurationVersion +
", notificationVersion=" + notificationVersion +
", subscriptions=" + subscriptions +
", topicHash=" + topicHash +
", simpleTopicHash=" + simpleTopicHash +
", systemNfVersion=" + systemNfVersion +
", userNfVersion=" + userNfVersion +
", logSchemaVersion=" + logSchemaVersion +
", ecfVersionStates=" + ecfVersionStates +
", serverHash='" + serverHash + '\'' +
", sdkToken='" + sdkToken + '\'' +
", useRawSchema=" + useConfigurationRawSchema +
", serverProfile='" + serverProfile + '\'' +
'}';
return "CassandraEndpointProfile{"
+ "endpointKeyHash=" + endpointKeyHash
+ ", id='" + id + '\''
+ ", endpointProfileKey=" + endpointProfileKey
+ ", applicationId='" + applicationId + '\''
+ ", endpointUserId='" + endpointUserId + '\''
+ ", accessToken='" + accessToken + '\''
+ ", groupStates=" + groupStates
+ ", sequenceNumber=" + sequenceNumber
+ ", profile='" + profile + '\''
+ ", profileHash=" + profileHash
+ ", profileVersion=" + profileVersion
+ ", serverProfileVersion=" + serverProfileVersion
+ ", configurationHash=" + configurationHash
+ ", userConfigurationHash=" + userConfigurationHash
+ ", configurationVersion=" + configurationVersion
+ ", notificationVersion=" + notificationVersion
+ ", subscriptions=" + subscriptions
+ ", topicHash=" + topicHash
+ ", simpleTopicHash=" + simpleTopicHash
+ ", systemNfVersion=" + systemNfVersion
+ ", userNfVersion=" + userNfVersion
+ ", logSchemaVersion=" + logSchemaVersion
+ ", ecfVersionStates=" + ecfVersionStates
+ ", serverHash='" + serverHash + '\''
+ ", sdkToken='" + sdkToken + '\''
+ ", useRawSchema=" + useConfigurationRawSchema
+ ", serverProfile='" + serverProfile + '\''
+ '}';
}

@Override
Expand Down

0 comments on commit e9f06cb

Please sign in to comment.