org.nakedobjects.plugins.hibernate.objectstore.tools.internal
Class Nof2HbmXml

java.lang.Object
  extended by org.nakedobjects.plugins.hibernate.objectstore.tools.internal.Nof2HbmXml

public class Nof2HbmXml
extends java.lang.Object

Create hbm.xml mapping document for a Naked Object domain class.

If property valueFieldAccess is true values are mapped with access="field", but field names must be the same as the property name (i.e. method getXxx() and field xxx). This will allow Hibernate to circumvent any container.resolve() calls inside the getters, and dirty setting in setters.

Similarly, if property associationFieldAccess is true assocations are mapped with access="field".


Constructor Summary
Nof2HbmXml()
           
 
Method Summary
 void configure(org.hibernate.cfg.Configuration cfg)
          Add all classes loaded in Naked Objects to the hibernate configuration
protected  org.dom4j.Document createDocument(PersistentNakedClass persistentNakedClass)
           
 void createMappingFiles()
           
protected  org.w3c.dom.Document createW3cDoc(org.dom4j.Document doc4j)
           
 void exportHbmXml(java.lang.String basedir)
          Export Hibernate mapping files for all Naked Objects currently in NakedObjects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Nof2HbmXml

public Nof2HbmXml()
Method Detail

configure

public void configure(org.hibernate.cfg.Configuration cfg)
Add all classes loaded in Naked Objects to the hibernate configuration


createMappingFiles

public void createMappingFiles()

createW3cDoc

protected org.w3c.dom.Document createW3cDoc(org.dom4j.Document doc4j)

createDocument

protected org.dom4j.Document createDocument(PersistentNakedClass persistentNakedClass)

exportHbmXml

public void exportHbmXml(java.lang.String basedir)
Export Hibernate mapping files for all Naked Objects currently in NakedObjects.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.