CRUD operations on a db record not using the ID in hibernate

Hi all,
I have an application which saves data (books details like book title, author and location) to a mySql db and performs CRUD operations.
I thought I'd use hibernate to take care of the ORM side of things and everything was OK when it came to create a record, but for RUD operations I had an issue.
If I'm a user, I'm likely to be willing to find a book by its author, title or location, certainly not by its ID and yet as far as I can see, hibernate uses IDs for these kind of operations.
I dug a bit further and eventually resorted to Criteria objects which apparently allow you do perform operations creating your own criteria, see below for the update functionality:

 public void update() {
        // code to modify a book
        Session session = sessionFactory.openSession();
        String searchTerm = "Jack";
        session.beginTransaction();
        Criteria criteria = session.createCriteria(Book.class);
        Book uniqueResult = (Book) criteria.add(Restrictions.eq("author", searchTerm)).uniqueResult();
        uniqueResult.setTitle("Amended plus one");
        session.update(uniqueResult);
        session.getTransaction().commit();
        session.close();        
    }

The problem is that criteria have been deprecated and I can't find a good alternative to that, which now makes me question my choice to use hibernate in the first place. What do you guys think? I wouldn't mind using hibernate but I find hard to believe that to find a record I have to use an ID and not the author, title or whatever else, unless of course you can get the ID of the record from the searchTerm like author etc but I couldn't find a way, all the examples online relied on an ID to be passed on to the query, which I find very odd.
If you fancy looking at the application, it can be found here https://github.com/Antobbo/book-storage/tree/master/src/main/java/com/test (it's not a big project, lol)

Rocket Program, Need assistance with adding stages

Hi, I've been having issues with my program where I make the rocket do what its supposed to do when it comes to outputting a filled and hollow rocket body depending on either a odd or even value. The only problem I am currently having is duplicating the body length also known as adding stages of how long I want the boyd to be.

Here's my code:

[code]
//Draw a Rocket with a filled or hollow body with stages
#include <iostream>
using namespace std;

void drawOddBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters
void getDimensions(/* out */ int&, /* out */ int&); //Function prototype with two reference parameters
void drawEvenBox(/* in*/ int, /* in */ int); //Function prototype with two value parameters
void drawHorizontalLine(int);   //Function Prototype with one value parameter
void drawCone();    //Function prototype

int main()
{
    int width = 5, numRows = 10, stages = 0;

    //cout << width << " " << numRows << endl;
    getDimensions(width, numRows);  //A function call with two arguments
    //cout << width << " " << numRows << endl;

    if(numRows % 2 == 0)
    {
        drawCone(); //A function call to generate a cone
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawEvenBox(width, numRows); //Function call to generate a hollow box
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawCone(); //A function call to generate a cone
    }

    else
    {
        drawCone(); //A function call to generate a cone
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawOddBox(width, numRows); //A function call to generate a filled box
        drawHorizontalLine(width);  //A function call to generate a horizontal line
        drawCone(); //A function call to generate a cone
    }

    cout << endl;
    //drawFilledBox(numRows, width); //A function call with two arguments

    return 0;
}

//Define all your functions below

//describe what the function will do and the role of the parameters
void getDimensions(/* out */ int& userInput1, /* out */ int& userInput2) //Function heading with two reference parameters
//Pre:
//Post:
{
    cout << "Program will draw a filled box based on two dimensions" << endl;
    cout << "WIDTH OF THE ROCKET BODY: ";
    cin >> userInput1;
    cout << "HEIGHT OF ROCKET BODY: ";
    cin >> userInput2;

    //Data range validation loop
    while(userInput1 < 3 || userInput1 > 15 || userInput2 < 3 || userInput2 > 15 || !cin)
    {
        cin.clear(); //To clear cin fail state
        cin.ignore(200, '\n'); //To ignore stray characters in the buffer
        cout << "Dimensions input should be in the range of 3 to 15, please retype." << endl;
        cout << "WIDTH OF THE BOX: ";
        cin >> userInput1;
        cout << "HEIGHT OF BOX: ";
        cin >> userInput2;
    }
}

void drawCone()
//Pre: Assume that no values are entered
//Post: Prints out a cone with three rows using a *.
{
    cout << "  *" << endl;
    cout << " * *" << endl;
    cout << "*   *" << endl;
}

//describe what the function will do and the role of the parameters
void drawEvenBox(/* incoming data */ int width, /* in */ int numRows) //This is known as a function heading
//Pre: assume that two values are not negative or too large
//Post: A box is drawn with numRows and width limits
{
    for(int row = 0; row < numRows; row++) //Outer loop generates new rows
    {
        for(int col = 0; col < width; col++) //Inner loop draws a single row
        {
            cout << '*';
        }
            cout << endl; //To move to the next row
    }
}

void drawHorizontalLine(int x) //This is a "function definition"
{
    int count;
    for(count = 1; count <= x; count++)
    {
        cout << "*";
    }
    cout << endl;
}

void drawOddBox(/* in*/ int width, /* in */ int numRows)
{
    int rowCount;
    int spaceCount;

    for(rowCount = 1; rowCount <= numRows-2; rowCount++)
    {
        cout << "*";
        for(spaceCount = 1; spaceCount <= width-2; spaceCount++)
        {
            cout << " ";
        }
        cout << "*" << endl;
    }
}
[/code]

Vue Tutorial 3 – Handling User Input

In the previous tutorial, we peeked behind the curtain to learn a few Vue.js directives.

We used v-if to check if a component should be visible or not. We deployed v-click to toggle a state of a variable. We adopted v-for to display a list of groceries our granny wanted us to get for her.