pt.digitalis.maven.ormgenerator
Class FactoryExecutor

java.lang.Object
  extended by pt.digitalis.maven.ormgenerator.BaseExecutor
      extended by pt.digitalis.maven.ormgenerator.FactoryExecutor

public class FactoryExecutor
extends BaseExecutor

Creates the factory class

Author:
Pedro Viegas pviegas@digitalis.pt

Field Summary
static String FACTORY_TEMPLATE
          The name of the template for the factory
 
Fields inherited from class pt.digitalis.maven.ormgenerator.BaseExecutor
AUTO_PACKAGE, AUTO_PREFFIX, DAO_PACKAGE, DAO_SUFFIX, IMPL_FILE_SUFFIX, IMPL_PACKAGE_SUFFIX, INTERFACE_PREFFIX, JAVA_EXTENSION, PROPERTIES_EXTENSION
 
Constructor Summary
FactoryExecutor(String packageName, String dataSourceName, String templateDir, String destinationDir, String baseCodeDIR, String serviceConfigurationFileName, org.apache.maven.plugin.logging.Log logger)
          Class constructor instantiates the ServiceExecutor with the required initializations
 
Method Summary
 boolean execute()
          This method is responsible to generate all the files.
 boolean generateFactoryFiles(String generatedDest)
          Generates the files from the templates
 
Methods inherited from class pt.digitalis.maven.ormgenerator.BaseExecutor
getDestinationDir, getFreemarkerConfig, getPackageName, getTemplateDir, obtainPath, prepareExecutor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_TEMPLATE

public static final String FACTORY_TEMPLATE
The name of the template for the factory

See Also:
Constant Field Values
Constructor Detail

FactoryExecutor

public FactoryExecutor(String packageName,
                       String dataSourceName,
                       String templateDir,
                       String destinationDir,
                       String baseCodeDIR,
                       String serviceConfigurationFileName,
                       org.apache.maven.plugin.logging.Log logger)
Class constructor instantiates the ServiceExecutor with the required initializations

Parameters:
packageName - The base package for the generated files
dataSourceName - The dataSource name
templateDir - Path for the template directory, could be relative or absolute.
destinationDir - directory where the generated files should be inserted.
baseCodeDIR - the project base path
serviceConfigurationFileName - Service configuration file name, this file should read from the resources
logger - the Maven Plugin logger
Method Detail

execute

public boolean execute()
This method is responsible to generate all the files.

Specified by:
execute in class BaseExecutor
Returns:
Returns true if the generation process went well and false otherwise

generateFactoryFiles

public boolean generateFactoryFiles(String generatedDest)
Generates the files from the templates

Parameters:
generatedDest - generated file destination dir
Returns:
The result is true if the files were correctly generated well and false otherwise


Copyright © 2007-2010 Digitalis Informática Lda. All Rights Reserved.