net.sourceforge.fluxion.datapublisher.beangen
Class BeanWriter

java.lang.Object
  extended by net.sourceforge.fluxion.datapublisher.beangen.BeanWriter

public class BeanWriter
extends java.lang.Object

A dedicated writer class that is used to generate JavaBeans from a set of BeanConfig objects. This is basically a convenient way of allowing a user to generate some beans from a database connection without having to write all the code to generate every line of the bean. Instead, a user can create some BeanConfigs, set some simple method names and types, then invoke the BeanWriter on this set on BeanConfigs to do all the bog-standard stuff.

Version:
0.2
Author:
Tony Burdett
See Also:
BeanConfig

Constructor Summary
BeanWriter(java.io.File rootDirectory, java.lang.String packageName)
           
 
Method Summary
 void closeFileStream()
           
 java.lang.String getDatabaseName()
           
 void openFileStream(java.lang.String className)
           
 void setDatabaseName(java.lang.String databaseName)
           
 void writeBeans(java.util.Set<BeanConfig> configs)
           
 void writeManager(java.lang.Class queryManager, java.lang.String... params)
           
 void writeManager(java.lang.String queryManagerClassName, java.util.List<java.lang.String> managerStatements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanWriter

public BeanWriter(java.io.File rootDirectory,
                  java.lang.String packageName)
Method Detail

openFileStream

public void openFileStream(java.lang.String className)
                    throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

closeFileStream

public void closeFileStream()
                     throws java.io.IOException
Throws:
java.io.IOException

writeBeans

public void writeBeans(java.util.Set<BeanConfig> configs)
                throws BeanGenerationException
Throws:
BeanGenerationException

writeManager

public void writeManager(java.lang.Class queryManager,
                         java.lang.String... params)
                  throws BeanGenerationException
Throws:
BeanGenerationException

writeManager

public void writeManager(java.lang.String queryManagerClassName,
                         java.util.List<java.lang.String> managerStatements)
                  throws BeanGenerationException
Throws:
BeanGenerationException

getDatabaseName

public java.lang.String getDatabaseName()

setDatabaseName

public void setDatabaseName(java.lang.String databaseName)


Copyright © 2010. All Rights Reserved.