org.codehaus.mojo.appfuse.exporter
Class AppfuseExporter

java.lang.Object
  extended by org.hibernate.tool.hbm2x.AbstractExporter
      extended by org.hibernate.tool.hbm2x.GenericExporter
          extended by org.hibernate.tool.hbm2x.POJOExporter
              extended by org.codehaus.mojo.appfuse.exporter.AppfuseExporter
All Implemented Interfaces:
org.hibernate.tool.hbm2x.Exporter

public class AppfuseExporter
extends org.hibernate.tool.hbm2x.POJOExporter

This method provides a sample on how to extend the pojo processor when processing new objects from the hbm.xml into jaa objects using freemarker.

Version:
$Id$
Author:
Scott Ryan

Field Summary
static org.apache.commons.logging.Log LOG
          A static logger for the class.
 
Fields inherited from class org.hibernate.tool.hbm2x.AbstractExporter
log, templatePaths
 
Constructor Summary
AppfuseExporter()
          Creates a new AppfuseExporter object.
AppfuseExporter(org.hibernate.cfg.Configuration inConfiguration, java.io.File inOutputDirectory)
          Creates a new AppfuseExporter object.
 
Method Summary
protected  void exportComponent(java.util.Map inAdditionalContext, org.hibernate.tool.hbm2x.pojo.POJOClass inElement)
          This method determines if the components should be exported or not.
protected  void setupContext()
          This method will set up the processing context for this object such as template and file pattern processing information.
 
Methods inherited from class org.hibernate.tool.hbm2x.POJOExporter
getName, init
 
Methods inherited from class org.hibernate.tool.hbm2x.GenericExporter
doStart, exportPersistentClass, exportPOJO, getClassNameForFile, getFilePattern, getPackageNameForFile, getTemplateName, resolveFilename, setFilePattern, setForEach, setTemplateName
 
Methods inherited from class org.hibernate.tool.hbm2x.AbstractExporter
cleanUpContext, getArtifactCollector, getCfg2HbmTool, getCfg2JavaTool, getConfiguration, getFileForClassName, getOutputDirectory, getProperties, getTemplateHelper, getTemplatePath, getTemplatePaths, setArtifactCollector, setConfiguration, setOutputDirectory, setProperties, setTemplateHelper, setTemplatePath, setupTemplates, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
A static logger for the class.

Constructor Detail

AppfuseExporter

public AppfuseExporter(org.hibernate.cfg.Configuration inConfiguration,
                       java.io.File inOutputDirectory)
Creates a new AppfuseExporter object.

Parameters:
inConfiguration - The configuration object containing useful configuration information.
inOutputDirectory - The directory to output the results into.

AppfuseExporter

public AppfuseExporter()
Creates a new AppfuseExporter object.

Method Detail

setupContext

protected void setupContext()
This method will set up the processing context for this object such as template and file pattern processing information.

Overrides:
setupContext in class org.hibernate.tool.hbm2x.POJOExporter

exportComponent

protected void exportComponent(java.util.Map inAdditionalContext,
                               org.hibernate.tool.hbm2x.pojo.POJOClass inElement)
This method determines if the components should be exported or not. For generation of Appfuse objects we do not want to process any component objects but just the primary objects.

Overrides:
exportComponent in class org.hibernate.tool.hbm2x.GenericExporter
Parameters:
inAdditionalContext - Any additional context objects used for processing.
inElement - The object to process.


Copyright © 2006-2009. All Rights Reserved.