I need to keep the all the named queries in a separate file. For example
@javax.persistence.NamedQueries({
@NamedQuery(name = "Employee.findAll", query = "SELECT e FROM Employee e")})
public class AllNamedQueries {
}
Now that much in itself causes an Error "Named queries can only be defined in Entity or MappedSuperClass class".
How do I create Named Queries in a Separate file? By separate I mean files other than entity file.