/** INTERNAL: */ public XMLNamedNativeQuery(Node node, XMLHelper helper) { // Set the location where we found this query. setLocation(helper.getDocumentName()); // Process the name. setName(helper.getNodeValue(node, XMLConstants.ATT_NAME)); // Process the query string. setEJBQLString(helper.getNodeTextValue(node, XMLConstants.QUERY)); // Process the query hints. NodeList hints = helper.getNodes(node, XMLConstants.QUERY_HINT); if (hints != null) { for (int i = 0; i < hints.getLength(); i++) { Node hintNode = hints.item(i); String name = helper.getNodeValue(hintNode, XMLConstants.ATT_NAME); String value = helper.getNodeValue(hintNode, XMLConstants.ATT_VALUE); addHint(new MetadataQueryHint(name, value)); } } // Process the result class. setResultClass(helper.getNodeValue(node, XMLConstants.ATT_RESULT_CLASS, void.class)); // Process the result set mapping. setResultSetMapping(helper.getNodeValue(node, XMLConstants.ATT_RESULT_SET_MAPPING, "")); }