# Class DbEntityHandler

java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.cayenne.configuration.xml.SAXNestedTagHandler
org.apache.cayenne.configuration.xml.NamespaceAwareNestedTagHandler
org.apache.cayenne.configuration.xml.DbEntityHandler

All Implemented Interfaces:
  `ContentHandler, DTDHandler, EntityResolver, ErrorHandler`

public class DbEntityHandler extends NamespaceAwareNestedTagHandler

Since:
  4.1

- ## Field Summary

  ### Fields inherited from class NamespaceAwareNestedTagHandler

  `allowAllNamespaces, targetNamespace`

  ### Fields inherited from class SAXNestedTagHandler

  `loaderContext, locator, parentHandler`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DbEntityHandler(NamespaceAwareNestedTagHandler parentHandler, DataMap dataMap)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected ContentHandler`
  `createChildTagHandler(String namespaceURI, String localName, String qName, Attributes attributes)`
  This method should be used to create nested handlers to process children elements.
  `DbEntity`
  `getEntity()`
  `DbAttribute`
  `getLastAttribute()`
  `protected boolean`
  `processCharData(String localName, String data)`
  `protected boolean`
  `processElement(String namespaceURI, String localName, Attributes attributes)`
  Main method to process XML content.

  ### Methods inherited from class NamespaceAwareNestedTagHandler

  `characters, endElement, setAllowAllNamespaces, setTargetNamespace, startElement`

  ### Methods inherited from class SAXNestedTagHandler

  `beforeScopeEnd, getParentHandler, setDocumentLocator, stop, unexpectedTagMessage`

  ### Methods inherited from class DefaultHandler

  `endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ContentHandler

  `declaration`

- ## Constructor Details

  - ### DbEntityHandler

    public DbEntityHandler(NamespaceAwareNestedTagHandler parentHandler, DataMap dataMap)

- ## Method Details

  - ### processElement

    protected boolean processElement(String namespaceURI, String localName, Attributes attributes) throws SAXException
    Description copied from class: `SAXNestedTagHandler`
    Main method to process XML content. Should be override in subclasses, by default do nothing. Return value should be true if tag was fully processed and shouldn't be passed down to child handler.
    Specified by:
      `processElement` in class `NamespaceAwareNestedTagHandler`
    Parameters:
      `namespaceURI` - namespace for tag
      `localName` - tag local name (i.e. w/o namespace prefix)
      `attributes` - tag attributes
    Returns:
      true if tag was processed
    Throws:
      `SAXException` - can be thrown to abort parsing
    See Also:
      - `SAXNestedTagHandler.createChildTagHandler(String, String, String, Attributes)`

  - ### processCharData

    protected boolean processCharData(String localName, String data)
    Overrides:
      `processCharData` in class `NamespaceAwareNestedTagHandler`

  - ### createChildTagHandler

    protected ContentHandler createChildTagHandler(String namespaceURI, String localName, String qName, Attributes attributes)
    Description copied from class: `SAXNestedTagHandler`
    This method should be used to create nested handlers to process children elements. This method should never return `null`.
    Overrides:
      `createChildTagHandler` in class `NamespaceAwareNestedTagHandler`
    Parameters:
      `namespaceURI` - namespace for tag
      `localName` - tag local name (i.e. w/o namespace prefix)
      `qName` - tag full name (i.e. with namespace prefix)
      `attributes` - tag attributes
    Returns:
      new handler to process child tag

  - ### getEntity

    public DbEntity getEntity()

  - ### getLastAttribute

    public DbAttribute getLastAttribute()