Class QueryDescriptorHandler

All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Direct Known Subclasses:
ProcedureQueryDescriptorHandler, SelectQueryDescriptorHandler, SQLTemplateDescriptorHandler

public abstract class QueryDescriptorHandler extends NamespaceAwareNestedTagHandler
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 Details

    • map

      protected final DataMap map
  • Constructor Details

  • Method Details

    • beforeScopeEnd

      protected void beforeScopeEnd()
      Description copied from class: SAXNestedTagHandler
      Callback method that is called before this handler pushed out of parsers stack. Can be used to flush some aggregate state.
      Overrides:
      beforeScopeEnd in class SAXNestedTagHandler
    • getQueryDescriptor

      public abstract QueryDescriptor 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

      protected Object resolveRoot(Attributes attributes)
      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

      protected static int intAttribute(Attributes attributes, String name)
    • columnNameCapitalization

      protected static CapsStrategy columnNameCapitalization(Attributes attributes)
      Reads the "columnNameCapitalization" attribute of a SQL or a procedure query, returning null if it is not set.