pt.moredata.netbeans.modules.moredatatemplates.wizard
Class ConnectionActions

java.lang.Object
  extended bypt.moredata.netbeans.modules.moredatatemplates.wizard.ConnectionActions

public class ConnectionActions
extends java.lang.Object

Implementation of the connection actions to get information for the code generation. The goal of this class is to have the information about only database connections.

Author:
Sérgio Ferreira

Constructor Summary
ConnectionActions()
           
 
Method Summary
 void closeConnection(WizardConnectionProgress jdialog)
          Connect to the data source choosed by the user and get information about tables and columns Get a list of information about the tables and views to use in the wizard.
 void createConnection(WizardConnectionProgress jdialog)
          Connect to the data source choosed by the user and get information about tables and columns Get a list of information about the tables and views to use in the wizard.
 java.util.ArrayList getSchemasNames(WizardConnectionProgress jdialog)
          Load the schemas names from database.
 java.util.ArrayList getTableInformation(WizardConnectionProgress jdialog)
          Load the information of the table in the connections using the parameters filled in the text fields
 boolean isConnected()
          Getter for property connected.
 void setData(Data data)
          Setter for property data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionActions

public ConnectionActions()
Method Detail

createConnection

public void createConnection(WizardConnectionProgress jdialog)
                      throws java.sql.SQLException,
                             java.lang.ClassNotFoundException
Connect to the data source choosed by the user and get information about tables and columns Get a list of information about the tables and views to use in the wizard.

Parameters:
jdialog - The dialog used to show the table being readed.
Returns:
Description of the Return Value
Throws:
java.sql.SQLException - An error ocurred in an SQL action.
java.lang.ClassNotFoundException

getTableInformation

public java.util.ArrayList getTableInformation(WizardConnectionProgress jdialog)
                                        throws java.sql.SQLException
Load the information of the table in the connections using the parameters filled in the text fields

Parameters:
jdialog - The dialog used as progress bar
Returns:
A ArrayList of DataTableInfo.
Throws:
java.sql.SQLException

getSchemasNames

public java.util.ArrayList getSchemasNames(WizardConnectionProgress jdialog)
                                    throws java.sql.SQLException
Load the schemas names from database.

Parameters:
jdialog - The dialog used as progress bar
Returns:
A ArrayList of schemas names.
Throws:
java.sql.SQLException

closeConnection

public void closeConnection(WizardConnectionProgress jdialog)
                     throws java.sql.SQLException,
                            java.lang.ClassNotFoundException
Connect to the data source choosed by the user and get information about tables and columns Get a list of information about the tables and views to use in the wizard.

Parameters:
jdialog - The dialog used to show the table being readed.
Returns:
Description of the Return Value
Throws:
java.sql.SQLException - An error ocurred in an SQL action.
java.lang.ClassNotFoundException

isConnected

public boolean isConnected()
                    throws java.sql.SQLException
Getter for property connected.

Returns:
Value of property connected.
Throws:
java.sql.SQLException

setData

public void setData(Data data)
Setter for property data.

Parameters:
data - New value of property data.