Select from DB using HQL and query
Adding the control for maxResult and select only userName.
Using parametters binding