//user Id - you will pass this value to this query at run time.String query
String query = "from User as user where user.userID=:userId"
If you ask Hibernate to employee.getId() it will give you the ObjectId which was assigned.
I have seen your code there was long id has mentioned your EMPLOYEE class it will return Id of your object.
~Ramesh..