From the Hibernate API:
Quote:
public Serializable save(Object object)
throws HibernateException
Persist the given transient instance, first assigning a generated identifier. (Or using the current value of the identifier property if the assigned generator is used.) This operation cascades to associated instances if the association is mapped with cascade="save-update".
Parameters:
object - a transient instance of a persistent class
Returns:
the generated identifier
Throws:
HibernateException
In other words, the Session.save({object}) function returns the generated identifier.
HTH