org.codehaus.mojo.appfuse.mojo
Class GenerateHibernateContextMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.appfuse.mojo.MojoBase
          extended by org.codehaus.mojo.appfuse.mojo.PojoMojoBase
              extended by org.codehaus.mojo.appfuse.mojo.GenerateHibernateContextMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class GenerateHibernateContextMojo
extends PojoMojoBase

This mojo class will create context xml entries for the hibernate dao implementations and dao interfaces from a set of hbm.xml files.

Version:
$Id: $
Author:
Scott Ryan

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
GenerateHibernateContextMojo()
          Creates a new GenerateHibernateContextMojo object.
 
Method Summary
protected  java.lang.String getHibernaeDaoPackageName()
          This method will return the full package name to be used for generating output for the dao objects.
 java.lang.String getOutputPattern()
          Getter for property file pattern.
protected  java.lang.String getSessionFactoryName()
          This method will return the name to use for the session factory.
 java.lang.String getTemplateName()
          This method implments the abstract method in the base class to allow a different template name to be processed.
 java.lang.String toString()
          This method creates a String representation of this object.
protected  void validateProperties(java.util.Properties inProperties)
          This method is used to make sure the proper properties are set to be used in processing this mojo.
 
Methods inherited from class org.codehaus.mojo.appfuse.mojo.PojoMojoBase
augmentFilePattern, buildOutputPattern, buildPackageName, execute, getListOfFilesToProcess, getTemplateHelperClassName, locateTemplate
 
Methods inherited from class org.codehaus.mojo.appfuse.mojo.MojoBase
getBasePackageName, getCopyOverWrite, getFilePattern, getModelDirectory, getModelPackageName, getMojoName, getOutputDirectory, getProcessingProperties, getSourceDirectory, setBasePackageName, setCopyOverWrite, setFilePattern, setModelDirectory, setMojoName, setOutputDirectory, setProcessingProperties, setSourceDirectory
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenerateHibernateContextMojo

public GenerateHibernateContextMojo()
Creates a new GenerateHibernateContextMojo object.

Method Detail

getOutputPattern

public java.lang.String getOutputPattern()
Getter for property file pattern.

Specified by:
getOutputPattern in class PojoMojoBase
Returns:
The value of file pattern.

getTemplateName

public java.lang.String getTemplateName()
This method implments the abstract method in the base class to allow a different template name to be processed.

Specified by:
getTemplateName in class PojoMojoBase
Returns:
The value of template name.

getHibernaeDaoPackageName

protected java.lang.String getHibernaeDaoPackageName()
This method will return the full package name to be used for generating output for the dao objects.

Returns:
The full package name for all dao objects.

getSessionFactoryName

protected java.lang.String getSessionFactoryName()
This method will return the name to use for the session factory.

Returns:
The name of the session factory.

validateProperties

protected void validateProperties(java.util.Properties inProperties)
This method is used to make sure the proper properties are set to be used in processing this mojo. These properties are passed in to the generator to be used within any freemarker templates. *

Specified by:
validateProperties in class PojoMojoBase
Parameters:
inProperties - The project properties that already have been populated.

toString

public java.lang.String toString()
This method creates a String representation of this object.

Overrides:
toString in class PojoMojoBase
Returns:
the String representation of this object


Copyright © 2006-2009. All Rights Reserved.