Beginner in SQL, coming from MongoDB.
I see libs that write SQL queries with Strings like:
String sql =
"SELECT id, category, duedate " +
"FROM tasks " +
"WHERE category = :category";
List<Task> tasks = con.createQuery(sql);
List<Object> results = db.query().select(Object.oneField).where(Object.oneField.equals("myString").from(db.MyTable);
I think Hibernate is what you are looking for.
At a very beginners level its like..
//create a user(Entity) object and set its properties
User user = new User();
and then you go on persisting(saving) the object to the database which will allow you to save the user properties in the database.
//get hibernate specific SessionFactory object
session.persist(user); //this will make your object's properties persist in the database
Take a look at Hibernate docs for detailed info.