org.apache.openjpa.persistence.jdbc
Class XMLPersistenceMappingParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.apache.openjpa.lib.meta.XMLMetaDataParser
          extended by org.apache.openjpa.lib.meta.CFMetaDataParser
              extended by org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
                  extended by org.apache.openjpa.persistence.jdbc.XMLPersistenceMappingParser
All Implemented Interfaces:
org.apache.openjpa.lib.meta.MetaDataParser, org.apache.openjpa.meta.AbstractCFMetaDataFactory.Parser, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public class XMLPersistenceMappingParser
extends org.apache.openjpa.persistence.XMLPersistenceMetaDataParser

Custom SAX parser used by the system to parse persistence mapping files.

Author:
Steve Kim

Field Summary
 
Fields inherited from class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
ELEM_ACCESS, ELEM_ATTRS, ELEM_CASCADE, ELEM_CASCADE_ALL, ELEM_CASCADE_MER, ELEM_CASCADE_PER, ELEM_CASCADE_REF, ELEM_CASCADE_REM, ELEM_LISTENER, ELEM_PKG, ELEM_PU_DEF, ELEM_PU_META
 
Constructor Summary
XMLPersistenceMappingParser(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf)
          Constructor; supply configuration.
 
Method Summary
protected  void endClassMapping(org.apache.openjpa.meta.ClassMetaData meta)
           
protected  void endClassMappingElement(java.lang.String name)
           
protected  void endFieldMapping(org.apache.openjpa.meta.FieldMetaData field)
          Extend to set the columns.
protected  void endSystemMappingElement(java.lang.String name)
           
protected  void reset()
           
protected  void startClassMapping(org.apache.openjpa.meta.ClassMetaData meta, boolean mappedSuper, org.xml.sax.Attributes attrs)
           
protected  java.lang.Object startClassMappingElement(java.lang.String name, org.xml.sax.Attributes attrs)
           
protected  void startFieldMapping(org.apache.openjpa.meta.FieldMetaData field, org.xml.sax.Attributes attrs)
          Extend to clear annotation mapping info.
protected  boolean startLob(org.xml.sax.Attributes attrs)
           
protected  java.lang.Object startSystemMappingElement(java.lang.String name, org.xml.sax.Attributes attrs)
           
 
Methods inherited from class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
classForName, currentElement, currentParent, currentStrategy, endClass, endClassElement, endEmbeddedId, endGeneratedValue, endId, endIdClass, endLob, endNamedNativeQuery, endNamedQuery, endQueryHint, endSequenceGenerator, endSystemElement, endVersion, getAnnotationParser, getClassAttributeName, getClassElementDepth, getConfiguration, getEnvClassLoader, getMappingOverride, getMode, getPackageAttributeName, getRepository, getSchemaSource, isClassElementName, isMappingMode, isMappingOverrideMode, isMetaDataMode, isQueryMode, isRuntime, parseBasic, parseEmbedded, parseManyToMany, parseManyToOne, parseOneToMany, parseOneToOne, popElement, pushElement, setAnnotationParser, setCascades, setEnvClassLoader, setMappingOverride, setMode, setMode, setRepository, startCascade, startClass, startClassElement, startEmbeddedId, startGeneratedValue, startId, startIdClass, startNamedNativeQuery, startNamedQuery, startQueryHint, startSequenceGenerator, startSystemElement, startVersion
 
Methods inherited from class org.apache.openjpa.lib.meta.CFMetaDataParser
classForName, classForName, currentClassName, currentPackage, endElement, endPackage, endPackageElement, getPackageElementDepth, isPackageElementName, startElement, startPackage, startPackageElement
 
Methods inherited from class org.apache.openjpa.lib.meta.XMLMetaDataParser
addComments, addResult, characters, clear, comment, currentClassLoader, currentComments, currentDepth, currentLocation, currentText, endCDATA, endDTD, endElement, endEntity, error, fatalError, finish, getClassLoader, getDocType, getException, getException, getLexicalHandler, getLocation, getLog, getParseComments, getParseText, getResults, getSourceFile, getSourceIsSystemId, getSourceName, getSuffix, ignoreContent, isCaching, isValidating, parse, parse, parse, parse, parse, parse, parsed, parseNewResource, setCaching, setClassLoader, setDocumentLocator, setLexicalHandler, setLocation, setLog, setParseComments, setParseText, setSourceIsSystemId, setSuffix, setValidating, startCDATA, startDTD, startElement, startEntity
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.lib.meta.MetaDataParser
clear, getResults, parse, parse, parse, parse, parse, parse, setClassLoader
 

Constructor Detail

XMLPersistenceMappingParser

public XMLPersistenceMappingParser(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf)
Constructor; supply configuration.

Method Detail

reset

protected void reset()
Overrides:
reset in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser

startSystemMappingElement

protected java.lang.Object startSystemMappingElement(java.lang.String name,
                                                     org.xml.sax.Attributes attrs)
                                              throws org.xml.sax.SAXException
Overrides:
startSystemMappingElement in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

endSystemMappingElement

protected void endSystemMappingElement(java.lang.String name)
                                throws org.xml.sax.SAXException
Overrides:
endSystemMappingElement in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

startClassMappingElement

protected java.lang.Object startClassMappingElement(java.lang.String name,
                                                    org.xml.sax.Attributes attrs)
                                             throws org.xml.sax.SAXException
Overrides:
startClassMappingElement in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

endClassMappingElement

protected void endClassMappingElement(java.lang.String name)
                               throws org.xml.sax.SAXException
Overrides:
endClassMappingElement in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

startClassMapping

protected void startClassMapping(org.apache.openjpa.meta.ClassMetaData meta,
                                 boolean mappedSuper,
                                 org.xml.sax.Attributes attrs)
                          throws org.xml.sax.SAXException
Overrides:
startClassMapping in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

endClassMapping

protected void endClassMapping(org.apache.openjpa.meta.ClassMetaData meta)
                        throws org.xml.sax.SAXException
Overrides:
endClassMapping in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

startLob

protected boolean startLob(org.xml.sax.Attributes attrs)
                    throws org.xml.sax.SAXException
Overrides:
startLob in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

startFieldMapping

protected void startFieldMapping(org.apache.openjpa.meta.FieldMetaData field,
                                 org.xml.sax.Attributes attrs)
                          throws org.xml.sax.SAXException
Extend to clear annotation mapping info.

Overrides:
startFieldMapping in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException

endFieldMapping

protected void endFieldMapping(org.apache.openjpa.meta.FieldMetaData field)
                        throws org.xml.sax.SAXException
Extend to set the columns.

Overrides:
endFieldMapping in class org.apache.openjpa.persistence.XMLPersistenceMetaDataParser
Throws:
org.xml.sax.SAXException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.