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.NamedNativeQuery; 29 30 36 public class MetadataNamedNativeQuery extends MetadataQuery { 37 protected NamedNativeQuery m_namedNativeQuery; 38 39 42 protected MetadataNamedNativeQuery() {} 43 44 47 public MetadataNamedNativeQuery(NamedNativeQuery namedNativeQuery) { 48 m_namedNativeQuery = namedNativeQuery; 49 } 50 51 54 public String getEJBQLString() { 55 return m_namedNativeQuery.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_namedNativeQuery.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_namedNativeQuery.name(); 78 } 79 80 83 public Class getResultClass() { 84 return m_namedNativeQuery.resultClass(); 85 } 86 87 90 public String getResultSetMapping() { 91 return m_namedNativeQuery.resultSetMapping(); 92 } 93 } 94 | Popular Tags |