com.electricvine
Class DataSource

java.lang.Object
  |
  +--com.electricvine.DataSource

public class DataSource
extends java.lang.Object

Used for specifying properties to connect to a database. An Object of type DataSource is available through a property of App and ZipSearch objects. Its properties need to be set before using functions of App and ZipSearch objects.


Constructor Summary
DataSource()
          This initializes a new instance of DataSouce class.
 
Method Summary
protected  boolean createConnection()
           
 java.lang.String getCompanyIDField()
          This returns the set name of the company ID field in the Company table.
 boolean getCompanyIDIsString()
          This returns whether the ID field of the company table is a string.
 java.lang.String getCompanyStateField()
          Returns the set name of the state field from the company table.
 java.lang.String getCompanyTable()
          This returns the name of the company table that has been set.
 java.lang.String getCompanyZipField()
          This returns the set name of the zip code field in the company table.
 java.sql.Connection getConnection()
          This returns the conenction that has been set or an internally created connection
 java.lang.String getDriver()
           
 java.lang.String getLogTable()
          This returns the name of the log table in the database.
 java.lang.String getPassword()
          This returns the password that has been set.
 java.lang.String getURL()
           
 java.lang.String getUsername()
          Returns the user name that has been set.
 java.lang.String getZipCodeTable()
          This returns the name of the zip code table in the database.
 void setCompanyIDField(java.lang.String sCompanyIDField)
          This sets the name of the primary key column of the Companies table specified in 'CompanyTable' property.
 void setCompanyIDIsString(boolean bCompanyIDIsString)
          This must be set to true if the ID field of the company table is a string.
 void setCompanyStateField(java.lang.String sCompanyStateField)
          This sets the name of the state field in the company table.
 void setCompanyTable(java.lang.String sCompanyTable)
          This sets the name of the table that contains records of companies that will be returned as results of the ZipSearch.
 void setCompanyZipField(java.lang.String sCompanyZipField)
          This assigns the name of the 'Zip Code' column in the 'Companies' table specified in 'CompanyTable' property.
 void setConnection(java.sql.Connection oConn)
          Used to Specify Connection directy.
 void setDriver(java.lang.String sDriver)
          This sets the database driver.
 void setLogTable(java.lang.String sLogTable)
          This sets the name of the table that will be used for storing search statistics.
 void setPassword(java.lang.String sPassword)
          Sets the password used to open a database.
 void setURL(java.lang.String sURL)
          This sets the URL of the database.
 void setUsername(java.lang.String sUsername)
          This sets the username used to open a database.
 void setZipCodeTable(java.lang.String sZipCodeTable)
          This sets the name of the table that contains zip codes in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSource

public DataSource()
This initializes a new instance of DataSouce class.

Method Detail

getDriver

public java.lang.String getDriver()

setDriver

public void setDriver(java.lang.String sDriver)
This sets the database driver.

Parameters:
sDriver - Database driver

getURL

public java.lang.String getURL()

setURL

public void setURL(java.lang.String sURL)
This sets the URL of the database.

Parameters:
sURL - Database URL

getUsername

public java.lang.String getUsername()
Returns the user name that has been set.


setUsername

public void setUsername(java.lang.String sUsername)
This sets the username used to open a database.

Parameters:
sUsername - Database user name

getPassword

public java.lang.String getPassword()
This returns the password that has been set.


setPassword

public void setPassword(java.lang.String sPassword)
Sets the password used to open a database.

Parameters:
sPassword - Database password

setConnection

public void setConnection(java.sql.Connection oConn)
Used to Specify Connection directy. This method is used when Bullseye is integrated into a larger application which needs to manage connections outside of Bullseye.

Parameters:
oConn - Connection

getConnection

public java.sql.Connection getConnection()
This returns the conenction that has been set or an internally created connection


getZipCodeTable

public java.lang.String getZipCodeTable()
This returns the name of the zip code table in the database.


setZipCodeTable

public void setZipCodeTable(java.lang.String sZipCodeTable)
This sets the name of the table that contains zip codes in the database.

Parameters:
sZipCodeTable - Name of the zip code table

getCompanyTable

public java.lang.String getCompanyTable()
This returns the name of the company table that has been set.


setCompanyTable

public void setCompanyTable(java.lang.String sCompanyTable)
This sets the name of the table that contains records of companies that will be returned as results of the ZipSearch.

Parameters:
sCompanyTable - Sets the name of the company table

getLogTable

public java.lang.String getLogTable()
This returns the name of the log table in the database.


setLogTable

public void setLogTable(java.lang.String sLogTable)
This sets the name of the table that will be used for storing search statistics. Table data is used in a tracking component of Bullseye Pro. A sample table is located in the included EVIWeb.mdb database and is called evbe_SearchHits. If you want to log search statistics in your own database -- you need to create a table with the same columns as 'evbe_SearchHits' and specify its name in this property.

Parameters:
sLogTable - Name of the log table

getCompanyZipField

public java.lang.String getCompanyZipField()
This returns the set name of the zip code field in the company table.


setCompanyZipField

public void setCompanyZipField(java.lang.String sCompanyZipField)
This assigns the name of the 'Zip Code' column in the 'Companies' table specified in 'CompanyTable' property.

Parameters:
sCompanyZipField - Name of zip code field in the company table

getCompanyIDField

public java.lang.String getCompanyIDField()
This returns the set name of the company ID field in the Company table.


setCompanyIDField

public void setCompanyIDField(java.lang.String sCompanyIDField)
This sets the name of the primary key column of the Companies table specified in 'CompanyTable' property.

Parameters:
sCompanyIDField - Name of ID field in the company table

getCompanyIDIsString

public boolean getCompanyIDIsString()
This returns whether the ID field of the company table is a string.


setCompanyIDIsString

public void setCompanyIDIsString(boolean bCompanyIDIsString)
This must be set to true if the ID field of the company table is a string.

Parameters:
bCompanyIDIsString -

getCompanyStateField

public java.lang.String getCompanyStateField()
Returns the set name of the state field from the company table.


setCompanyStateField

public void setCompanyStateField(java.lang.String sCompanyStateField)
This sets the name of the state field in the company table.

Parameters:
sCompanyStateField - Name of state field in the company table

createConnection

protected boolean createConnection()