|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.figure8.join.core.persistence.HibernateXmlImportHandler
public class HibernateXmlImportHandler
This utility class is an Xml import handler for Hibernate entity objects. It is adapted from the one written by Ara Abrahamian and available on http://opensource.atlassian.com/projects/hibernate/browse/HB-493.
| Constructor Summary | |
|---|---|
HibernateXmlImportHandler(net.sf.hibernate.SessionFactory factory)
Creates a new instance of HibernateXmlImportHandler |
|
| Method Summary | |
|---|---|
void |
characters(char[] iArr,
int start,
int length)
Read content as characteers |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
End an Xml element handling method |
protected java.lang.String |
getContents()
|
java.util.List |
getEntityObjects()
|
protected net.sf.hibernate.persister.ClassPersister |
getPersister(java.lang.Class clazz)
|
java.util.Collection |
loadEntityObjects(java.io.InputStream inputstream)
Load the entity objects from their Xml representation read on stream |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Start an Xml element handling method |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, error, 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 |
| Constructor Detail |
|---|
public HibernateXmlImportHandler(net.sf.hibernate.SessionFactory factory)
factory - The SessionFactory to use for getting entities metadata| Method Detail |
|---|
public java.util.List getEntityObjects()
public java.util.Collection loadEntityObjects(java.io.InputStream inputstream)
throws net.sf.hibernate.HibernateException
inputstream - The stream for reading Xml representations
net.sf.hibernate.HibernateException - if metadata on entity objects cannot be retrieved
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandleruri - The namespace URI of parsed streamlocalName - Local name of started elementqName - Qualified name of started elementattributes - Attributes of started element
org.xml.sax.SAXException - if something wrong occurs
public void characters(char[] iArr,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandleriArr - The characters array readstart - Start indexlength - Charactes length
org.xml.sax.SAXException - if somethong wrong occurs
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandleruri - The namespace URI of parsed streamlocalName - Local name of ended elementqName - Qualified name of ended element
org.xml.sax.SAXException - if somethong wrong occursprotected java.lang.String getContents()
protected net.sf.hibernate.persister.ClassPersister getPersister(java.lang.Class clazz)
throws net.sf.hibernate.MappingException
net.sf.hibernate.MappingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||