1 21 package oracle.toplink.essentials.internal.ejb.cmp3.metadata.queries; 23 24 import java.util.List ; 25 import java.util.ArrayList ; 26 27 import javax.persistence.QueryHint; 28 import javax.persistence.NamedQuery; 29 30 36 public class MetadataNamedQuery extends MetadataQuery { 37 protected NamedQuery m_namedQuery; 38 39 42 protected MetadataNamedQuery() {} 43 44 47 public MetadataNamedQuery(NamedQuery namedQuery) { 48 m_namedQuery = namedQuery; 49 } 50 51 54 public String getEJBQLString() { 55 return m_namedQuery.query(); 56 } 57 58 61 public List <MetadataQueryHint> getHints() { 62 if (m_hints == null) { 63 m_hints = new ArrayList <MetadataQueryHint>(); 64 65 for (QueryHint hint : m_namedQuery.hints()) { 66 m_hints.add(new MetadataQueryHint(hint)); 67 } 68 } 69 70 return m_hints; 71 } 72 73 76 public String getName() { 77 return m_namedQuery.name(); 78 } 79 } 80 | Popular Tags |