站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

XMLDatabinder (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.xml
Class XMLDatabinder

java.lang.Object
  extended bynet.sf.hibernate.xml.XMLDatabinder
All Implemented Interfaces:
Databinder

public class XMLDatabinder
extends Object
implements Databinder

Implementation of the API class Databinder. NOT threadsafe.

Author:
Gavin King, Brad Clow
See Also:
Databinder

Constructor Summary
XMLDatabinder(SessionFactoryImplementor factory, javax.xml.transform.Transformer transform)
           
 
Method Summary
 Databinder bind(Object object)
          Add an object to the output document.
 Databinder bindAll(Collection collection)
          Add a collection of objects to the output document.
static javax.xml.transform.Templates getOutputStyleSheetTemplates(Properties properties)
           
 void setInitializeLazy(boolean initializeLazy)
          Controls lazy initialization.
 org.w3c.dom.Document toDOM()
          Output the custom XML representation of the bound objects as a DOM tree.
 org.w3c.dom.Document toGenericDOM()
          Output the generic XML representation of the bound objects as a DOM tree.
 String toGenericXML()
          Output the generic XML representation of the bound objects.
 String toXML()
          Output the custom XML representation of the bound objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDatabinder

public XMLDatabinder(SessionFactoryImplementor factory,
                     javax.xml.transform.Transformer transform)
Method Detail

setInitializeLazy

public void setInitializeLazy(boolean initializeLazy)
Description copied from interface: Databinder
Controls lazy initialization. Controls whether bound objects (and their associated objects) that are lazily initialized are explicitly initialized or left as they are.

Specified by:
setInitializeLazy in interface Databinder
Parameters:
initializeLazy - true to explicitly initialize lazy objects, false to leave them in the state they are in.

toGenericXML

public String toGenericXML()
                    throws HibernateException
Description copied from interface: Databinder
Output the generic XML representation of the bound objects.

Specified by:
toGenericXML in interface Databinder
Returns:
String generic XML representation
Throws:
HibernateException

toXML

public String toXML()
             throws HibernateException,
                    javax.xml.transform.TransformerException
Description copied from interface: Databinder
Output the custom XML representation of the bound objects.

Specified by:
toXML in interface Databinder
Returns:
String custom XML representation
Throws:
javax.xml.transform.TransformerException
HibernateException

toDOM

public org.w3c.dom.Document toDOM()
                           throws HibernateException,
                                  javax.xml.transform.TransformerException
Description copied from interface: Databinder
Output the custom XML representation of the bound objects as a DOM tree.

Specified by:
toDOM in interface Databinder
Returns:
Node custom XML tree
Throws:
HibernateException
javax.xml.transform.TransformerException

bind

public Databinder bind(Object object)
Description copied from interface: Databinder
Add an object to the output document.

Specified by:
bind in interface Databinder
Parameters:
object - a transient or persistent instance
Returns:
Databinder

bindAll

public Databinder bindAll(Collection collection)
Description copied from interface: Databinder
Add a collection of objects to the output document.

Specified by:
bindAll in interface Databinder
Parameters:
collection -
Returns:
Databinder

toGenericDOM

public org.w3c.dom.Document toGenericDOM()
                                  throws HibernateException
Description copied from interface: Databinder
Output the generic XML representation of the bound objects as a DOM tree.

Specified by:
toGenericDOM in interface Databinder
Returns:
Node generic XML tree
Throws:
HibernateException

getOutputStyleSheetTemplates

public static javax.xml.transform.Templates getOutputStyleSheetTemplates(Properties properties)