com.compomics.util.db
Class DBAccessorGenerator

java.lang.Object
  extended by com.compomics.util.db.DBAccessorGenerator

public class DBAccessorGenerator
extends Object

This class generates an Object that can be used for access to a given table in a JDBC accessible RDBMS.

Author:
Lennart Martens

Constructor Summary
DBAccessorGenerator()
          Default constructor.
 
Method Summary
static void main(String[] args)
          The main method allows to run this tool from the command-line.
 void startGenerator(String aDriver, String aUrl, String aTable, String aPackageName)
          This method starts the generator for the specified parameters.
 void startGenerator(String aDriver, String aUrl, String aTable, String aUser, String aPassword, String aPackageName, boolean aDebug)
          This method starts the generator for the specified parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBAccessorGenerator

public DBAccessorGenerator()
Default constructor.

Method Detail

startGenerator

public void startGenerator(String aDriver,
                           String aUrl,
                           String aTable,
                           String aPackageName)
                    throws GeneratorException
This method starts the generator for the specified parameters.

Parameters:
aDriver - String with the JDBC database driver class.
aUrl - String with the URL for the database.
aTable - String with the tablename to generate the accessor object for.
aPackageName - String with the packagename for the generated class. Can be empty String.
Throws:
GeneratorException

startGenerator

public void startGenerator(String aDriver,
                           String aUrl,
                           String aTable,
                           String aUser,
                           String aPassword,
                           String aPackageName,
                           boolean aDebug)
                    throws GeneratorException
This method starts the generator for the specified parameters.

Parameters:
aDriver - String with the JDBC database driver class.
aUrl - String with the URL for the database.
aTable - String with the tablename to generate the accessor object for.
aUser - String with the username for the DB connection. This can be 'null'.
aPassword - String with the password for the specified user. This can be 'null'.
aPackageName - String with the output packagename. This can be empty String.
aDebug - boolean to indicate whether output should be given to stdout.
Throws:
GeneratorException - whenever something goes wrong.

main

public static void main(String[] args)
The main method allows to run this tool from the command-line.



Copyright © 2011. All Rights Reserved.