Class QueryDescriptorHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.cayenne.project.xml.SAXNestedTagHandler
org.apache.cayenne.project.xml.NamespaceAwareNestedTagHandler
org.apache.cayenne.project.xml.QueryDescriptorHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Direct Known Subclasses:
ProcedureQueryDescriptorHandler, SelectQueryDescriptorHandler, SQLTemplateDescriptorHandler
A base of the handlers of the query tags of a DataMap. A subclass per query type reads its own tag into the
matching
QueryDescriptor. The base reads the attributes common to all the query tags.- Since:
- 4.1
-
Field Summary
FieldsFields inherited from class NamespaceAwareNestedTagHandler
allowAllNamespaces, targetNamespaceFields inherited from class SAXNestedTagHandler
loaderContext, locator, parentHandler -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedQueryDescriptorHandler(NamespaceAwareNestedTagHandler parentHandler, DataMap map) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCallback method that is called before this handler pushed out of parsers stack.protected static CapsStrategycolumnNameCapitalization(Attributes attributes) Reads the "columnNameCapitalization" attribute of a SQL or a procedure query, returning null if it is not set.abstract QueryDescriptorReturns the descriptor of the query being read, or null before the query tag is processed.protected static intintAttribute(Attributes attributes, String name) protected voidloadQuerySettings(QueryDescriptor descriptor, Attributes attributes) Reads the attributes common to all the query tags into a descriptor.protected ObjectresolveRoot(Attributes attributes) Resolves the root of a query from its "root" and "rootName" attributes.Methods inherited from class NamespaceAwareNestedTagHandler
characters, createChildTagHandler, endElement, processCharData, processElement, setAllowAllNamespaces, setTargetNamespace, startElementMethods inherited from class SAXNestedTagHandler
getParentHandler, setDocumentLocator, stop, unexpectedTagMessageMethods inherited from class DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
map
-
-
Constructor Details
-
QueryDescriptorHandler
-
-
Method Details
-
beforeScopeEnd
protected void beforeScopeEnd()Description copied from class:SAXNestedTagHandlerCallback method that is called before this handler pushed out of parsers stack. Can be used to flush some aggregate state.- Overrides:
beforeScopeEndin classSAXNestedTagHandler
-
getQueryDescriptor
Returns the descriptor of the query being read, or null before the query tag is processed. -
loadQuerySettings
protected void loadQuerySettings(QueryDescriptor descriptor, Attributes attributes) throws SAXException Reads the attributes common to all the query tags into a descriptor.- Throws:
SAXException
-
resolveRoot
Resolves the root of a query from its "root" and "rootName" attributes. Falls back to the DataMap when the root type is not set, or the named root is not found. -
intAttribute
-
columnNameCapitalization
Reads the "columnNameCapitalization" attribute of a SQL or a procedure query, returning null if it is not set.
-