1) What is the difference between
a) session.save()
b) session.saveOrUpdate()
c) session.persist()

Ans :
a) session.save() : save() does an insert and will fail if the primary key is
already persistent.
b) session.saveOrUpdate() :
saveOrUpdate() does a select first to determine if it
needs to do an insert or an update. Insert data if primary key not exist
otherwise update data.
c) session.persist() : Does the same like session.save().
But session.save() return Serializable object and session.persist() return
void.
session.save() returns the generated identifier (Serializable object) and
session.persist() doesn't.