From the course: Learning Quarkus

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Wire HTTP

Solution: Wire HTTP

From the course: Learning Quarkus

Start my 1-month free trial

Solution: Wire HTTP

(upbeat music) - [Instructor] So now, it's time for my solution to this challenge exercise. This time, however, I only did one of the implementations. The implementation that I chose to do was using the REST API and the Cassandra backend. So in order to accomplish this, I made a couple changes to some class files. So let's go into src, main, java and take a look, first of all, at the RoomService. So you'll see, starting on line 22, that I've added a CQL statement for the four methods that I have created. The getAllRooms remained unchanged, but on line 34, I created a method to getRoomsByBedInfo, and I used a PreparedStatement to do that. On line 45, I created an addRoom method, and once again, I used a PreparedStatement. Now, there are other ways to do this in Cassandra with the Java Driver, but again, this was for the purpose of demonstration. It is not the most efficient way to do this. And now, on line 58, I created…

Contents