org.apache.aries.jpa.container.parsing.impl
Class JPAHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.aries.jpa.container.parsing.impl.JPAHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class JPAHandler
- extends DefaultHandler
This code is responsible for parsing the persistence.xml into PersistenceUnits
Constructor Summary |
JPAHandler(org.osgi.framework.Bundle b,
String version)
Create a new JPA Handler for the given peristence.xml |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPAHandler
public JPAHandler(org.osgi.framework.Bundle b,
String version)
- Create a new JPA Handler for the given peristence.xml
- Parameters:
data
- version
- the version of the JPA schema used in the xml
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Collect up the characters, as element's characters may be split across multiple
calls. Isn't SAX lovely...
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
startElement
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String name)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DefaultHandler
- Throws:
SAXException
error
public void error(SAXParseException spe)
throws SAXException
- Specified by:
error
in interface ErrorHandler
- Overrides:
error
in class DefaultHandler
- Throws:
SAXException
getPersistenceUnits
public Collection<PersistenceUnitImpl> getPersistenceUnits()
- Returns:
- The collection of persistence units that we have parsed
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.