apps.email.db
Class JDBCAccountBuilder

java.lang.Object
  |
  +--apps.email.db.JDBCAccountBuilder

public class JDBCAccountBuilder
extends java.lang.Object

Builder class for creating an Account object. You can use the singleton reference of this object to query the database to get an Account object with the following call:
JDBCAccountBuilder.getInstance(appdb).queryByUserId(id);

See Also:
Account

Method Summary
static JDBCAccountBuilder getInstance(java.lang.String appdb)
          Gets a connection to a specific database.
 Account queryByUserId(int id)
          Returns the user's account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JDBCAccountBuilder getInstance(java.lang.String appdb)
Gets a connection to a specific database.
Parameters:
appdb - the name of the database
Returns:
an instance of JDBCAccountBuilder

queryByUserId

public Account queryByUserId(int id)
Returns the user's account. First creates the query string and then runs the query.
Parameters:
id - is the user's id
Returns:
an Account for the user