For better understanding you can include some code snippet in your post.
I think if you are calling query.list() or query.iterate() as mentioned in http://www.roseindia.net/hibernate/hibernateorderbyexample.shtml then what you will get will be an object of the class that have run your query on. (if your query is "from Cat as cat" then you should expect objects of class "Cat") So in your case you should typecast your objects to appropriate class and then you should get firstname and lastname.
Destroy anything that stands in your way. Except this tiny ad: