throw new AnnotationException( "A named query must have a name when used in class or package level" );
}
//EJBQL Query
QueryHint[] hints = queryAnn.hints();
String queryName = queryAnn.query();
NamedQueryDefinition queryDefinition = new NamedQueryDefinitionBuilder( queryAnn.name() )
.setLockOptions( determineLockOptions( queryAnn, hints ) )
.setQuery( queryName )
.setCacheable( getBoolean( queryName, "org.hibernate.cacheable", hints ) )
.setCacheRegion( getString( queryName, "org.hibernate.cacheRegion", hints ) )
.setTimeout( getTimeout( queryName, hints ) )