@Test void getActiveSctiptInfoShouldReturnEmptyByDefault() { assertThat(activeScriptDAO.getActiveSctiptInfo(USERNAME).blockOptional().isPresent()) .isFalse(); }
public Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username) { return cassandraAsyncExecutor.executeSingleRow( selectActiveName.bind() .setString(USER_NAME, username.asString())) .map(row -> new ActiveScriptInfo( new ScriptName(row.getString(SCRIPT_NAME)), ZonedDateTime.ofInstant(row.getTimestamp(DATE).toInstant(), ZoneOffset.UTC))); }
CassandraActiveScriptDAO { public Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username) { return cassandraAsyncExecutor.executeSingleRow( selectActiveName.bind() .setString(USER_NAME, username.asString())) .map(row -> new ActiveScriptInfo( new ScriptName(row.getString(SCRIPT_NAME)), ZonedDateTime.ofInstant(row.getTimestamp(DATE).toInstant(), ZoneOffset.UTC))); } }
CassandraActiveScriptDAO { public Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username) { return cassandraAsyncExecutor.executeSingleRow( selectActiveName.bind() .setString(USER_NAME, username.asString())) .map(row -> new ActiveScriptInfo( new ScriptName(row.getString(SCRIPT_NAME)), ZonedDateTime.ofInstant(row.getTimestamp(DATE).toInstant(), ZoneOffset.UTC))); } @Inject  CassandraActiveScriptDAO(Session session); }
CassandraActiveScriptDAO { public Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username) { return cassandraAsyncExecutor.executeSingleRow( selectActiveName.bind() .setString(USER_NAME, username.asString())) .map(row -> new ActiveScriptInfo( new ScriptName(row.getString(SCRIPT_NAME)), ZonedDateTime.ofInstant(row.getTimestamp(DATE).toInstant(), ZoneOffset.UTC))); } @Inject  CassandraActiveScriptDAO(Session session); Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username); Mono<Void> unactivate(Username username); Mono<Void> activate(Username username, ScriptName scriptName); }
CassandraActiveScriptDAO { public Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username) { return cassandraAsyncExecutor.executeSingleRow( selectActiveName.bind() .setString(USER_NAME, username.asString())) .map(row -> new ActiveScriptInfo( new ScriptName(row.getString(SCRIPT_NAME)), ZonedDateTime.ofInstant(row.getTimestamp(DATE).toInstant(), ZoneOffset.UTC))); } @Inject  CassandraActiveScriptDAO(Session session); Mono<ActiveScriptInfo> getActiveSctiptInfo(Username username); Mono<Void> unactivate(Username username); Mono<Void> activate(Username username, ScriptName scriptName);  }