|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.electricvine.DataSource
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 |
public DataSource()
Method Detail |
public java.lang.String getDriver()
public void setDriver(java.lang.String sDriver)
sDriver
- Database driverpublic java.lang.String getURL()
public void setURL(java.lang.String sURL)
sURL
- Database URLpublic java.lang.String getUsername()
public void setUsername(java.lang.String sUsername)
sUsername
- Database user namepublic java.lang.String getPassword()
public void setPassword(java.lang.String sPassword)
sPassword
- Database passwordpublic void setConnection(java.sql.Connection oConn)
oConn
- Connectionpublic java.sql.Connection getConnection()
public java.lang.String getZipCodeTable()
public void setZipCodeTable(java.lang.String sZipCodeTable)
sZipCodeTable
- Name of the zip code tablepublic java.lang.String getCompanyTable()
public void setCompanyTable(java.lang.String sCompanyTable)
sCompanyTable
- Sets the name of the company tablepublic java.lang.String getLogTable()
public void setLogTable(java.lang.String sLogTable)
sLogTable
- Name of the log tablepublic java.lang.String getCompanyZipField()
public void setCompanyZipField(java.lang.String sCompanyZipField)
sCompanyZipField
- Name of zip code field in the company tablepublic java.lang.String getCompanyIDField()
public void setCompanyIDField(java.lang.String sCompanyIDField)
sCompanyIDField
- Name of ID field in the company tablepublic boolean getCompanyIDIsString()
public void setCompanyIDIsString(boolean bCompanyIDIsString)
bCompanyIDIsString
- public java.lang.String getCompanyStateField()
public void setCompanyStateField(java.lang.String sCompanyStateField)
sCompanyStateField
- Name of state field in the company tableprotected boolean createConnection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |