Skip to content

Commit

Permalink
Fix style in Credentials and Notification CassandraDao
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill380 committed Sep 29, 2016
1 parent 2b50b71 commit d0781e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public CassandraCredentials save(String applicationId, CredentialsDto credential
public Optional<CassandraCredentials> find(String applicationId, String credentialsId) {
LOG.debug("Searching credential by applicationID[{}] and credentialsID[{}]",
applicationId, credentialsId);
Select.Where query = select().from(getColumnFamilyName()).
where(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId)).
and(eq(CREDENTIALS_ID_PROPERTY, credentialsId));
Select.Where query = select().from(getColumnFamilyName())
.where(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId))
.and(eq(CREDENTIALS_ID_PROPERTY, credentialsId));
return Optional.ofNullable(this.findOneByStatement(query));
}

Expand All @@ -82,9 +82,9 @@ public Optional<CassandraCredentials> updateStatus(String applicationId,
+ "and credentialsID[{}] to STATUS[{}]",
applicationId, credentialsId, status.toString());
Update.Assignments query = update(getColumnFamilyName())
.where(eq(CREDENTIALS_ID_PROPERTY, credentialsId)).
and(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId)).
with(set(CREDENTIALS_STATUS_PROPERTY, status.toString()));
.where(eq(CREDENTIALS_ID_PROPERTY, credentialsId))
.and(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId))
.with(set(CREDENTIALS_STATUS_PROPERTY, status.toString()));
execute(query);
return find(applicationId, credentialsId);
}
Expand All @@ -93,9 +93,9 @@ public Optional<CassandraCredentials> updateStatus(String applicationId,
public void remove(String applicationId, String credentialsId) {
LOG.debug("Deleting credential by applicationID[{}] and credentialsID[{}]",
applicationId, credentialsId);
Delete.Where query = delete().from(getColumnFamilyName()).
where(eq(CREDENTIALS_ID_PROPERTY, credentialsId)).
and(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId));
Delete.Where query = delete().from(getColumnFamilyName())
.where(eq(CREDENTIALS_ID_PROPERTY, credentialsId))
.and(eq(CREDENTIALS_APPLICATION_ID_PROPERTY, applicationId));
execute(query);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ public void removeNotificationsByTopicId(String topicId) {
}

@Override
public List<CassandraNotification> findNotificationsByTopicIdAndVersionAndStartSecNum(String topicId,
int seqNum,
int sysNfVersion,
int userNfVersion) {
public List<CassandraNotification> findNotificationsByTopicIdAndVersionAndStartSecNum(
String topicId, int seqNum, int sysNfVersion, int userNfVersion) {

LOG.debug("Try to find notifications by topic id {} start sequence number {} "
+ "system schema version {} user schema version {}",
topicId, seqNum, sysNfVersion, userNfVersion);
Expand Down

0 comments on commit d0781e1

Please sign in to comment.