Given the following example from Hibernate Make Easy, how can I call the named query, user.findByLoginName in Grails?
package com.examscam.model;
import javax.persistence.*;
import org.hibernate.Session;
import com.examscam.HibernateUtil;
@Entity
@Table(name = "user", schema = "examscam")
@NamedQuery(name="user.findByLoginName",
query="from User where loginName = :name" )
public class User { }