@Test void getAttachmentShouldReturnEmptyWhenAbsent() { Optional<DAOAttachment> attachment = testee.getAttachment(ATTACHMENT_ID).blockOptional(); assertThat(attachment).isEmpty(); }
public Mono<DAOAttachment> getAttachment(AttachmentId attachmentId) { Preconditions.checkArgument(attachmentId != null); return cassandraAsyncExecutor.executeSingleRow( selectStatement.bind() .setUUID(ID_AS_UUID, attachmentId.asUUID()) .setConsistencyLevel(consistencyLevel)) .map(row -> CassandraAttachmentDAOV2.fromRow(row, blobIdFactory)); }
CassandraAttachmentDAOV2 { public Mono<DAOAttachment> getAttachment(AttachmentId attachmentId) { Preconditions.checkArgument(attachmentId != null); return cassandraAsyncExecutor.executeSingleRow( selectStatement.bind() .setUUID(ID_AS_UUID, attachmentId.asUUID()) .setConsistencyLevel(consistencyLevel)) .map(row -> CassandraAttachmentDAOV2.fromRow(row, blobIdFactory)); } }
CassandraAttachmentDAOV2 { public Mono<DAOAttachment> getAttachment(AttachmentId attachmentId) { Preconditions.checkArgument(attachmentId != null); return cassandraAsyncExecutor.executeSingleRow( selectStatement.bind() .setUUID(ID_AS_UUID, attachmentId.asUUID()) .setConsistencyLevel(consistencyLevel)) .map(row -> CassandraAttachmentDAOV2.fromRow(row, blobIdFactory)); } @Inject  CassandraAttachmentDAOV2(BlobId.Factory blobIdFactory, Session session,
                                    CassandraConsistenciesConfiguration consistenciesConfiguration); }
CassandraAttachmentDAOV2 { public Mono<DAOAttachment> getAttachment(AttachmentId attachmentId) { Preconditions.checkArgument(attachmentId != null); return cassandraAsyncExecutor.executeSingleRow( selectStatement.bind() .setUUID(ID_AS_UUID, attachmentId.asUUID()) .setConsistencyLevel(consistencyLevel)) .map(row -> CassandraAttachmentDAOV2.fromRow(row, blobIdFactory)); } @Inject  CassandraAttachmentDAOV2(BlobId.Factory blobIdFactory, Session session,
                                    CassandraConsistenciesConfiguration consistenciesConfiguration); static DAOAttachment from(AttachmentMetadata attachment, BlobId blobId); Mono<DAOAttachment> getAttachment(AttachmentId attachmentId); Mono<Void> storeAttachment(DAOAttachment attachment); Mono<Void> delete(AttachmentId attachmentId); }
CassandraAttachmentDAOV2 { public Mono<DAOAttachment> getAttachment(AttachmentId attachmentId) { Preconditions.checkArgument(attachmentId != null); return cassandraAsyncExecutor.executeSingleRow( selectStatement.bind() .setUUID(ID_AS_UUID, attachmentId.asUUID()) .setConsistencyLevel(consistencyLevel)) .map(row -> CassandraAttachmentDAOV2.fromRow(row, blobIdFactory)); } @Inject  CassandraAttachmentDAOV2(BlobId.Factory blobIdFactory, Session session,
                                    CassandraConsistenciesConfiguration consistenciesConfiguration); static DAOAttachment from(AttachmentMetadata attachment, BlobId blobId); Mono<DAOAttachment> getAttachment(AttachmentId attachmentId); Mono<Void> storeAttachment(DAOAttachment attachment); Mono<Void> delete(AttachmentId attachmentId);  }