Class Addresses

java.lang.Object
  |
  +--Addresses

public class Addresses
extends java.lang.Object


Constructor Summary
Addresses()
          The constructor for the class.
 
Method Summary
 int addAddress(java.lang.String[] address)
          This method inserts a new address record
 java.sql.ResultSet getAddress(long addressID)
          This method returns an address record
 java.sql.ResultSet getAddresses()
          This method returns all address records
 int setAddress(java.lang.String[] address)
          This method updates an address record
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Addresses

public Addresses()
          throws java.lang.ClassNotFoundException,
                 java.sql.SQLException
The constructor for the class. It opens the database connection and initializes the statement
Throws:
java.lang.ClassNotFoundException -  
java.sql.SQLException -  
Method Detail

getAddress

public java.sql.ResultSet getAddress(long addressID)
                              throws java.sql.SQLException
This method returns an address record
Parameters:
addressID - the addressID for the address
Returns:
Resultset
Throws:
java.sql.SQLException -  

getAddresses

public java.sql.ResultSet getAddresses()
                                throws java.sql.SQLException
This method returns all address records
Returns:
Resultset
Throws:
java.sql.SQLException -  

setAddress

public int setAddress(java.lang.String[] address)
               throws java.sql.SQLException
This method updates an address record
Parameters:
address[] - a String array of the address details
Returns:
int the number of rows affected
Throws:
java.sql.SQLException -  

addAddress

public int addAddress(java.lang.String[] address)
               throws java.sql.SQLException
This method inserts a new address record
Parameters:
address[] - a String array of the address details
Returns:
int the number of rows affected
Throws:
java.sql.SQLException -