|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.wedoit4u.databeans.PartnerHelper
final class PartnerHelper
A helper class that provides convenient methods to interact with
the partners table. This class is meant to
be used from the DatabaseHelper class, or other classes
in this package only.
Copyright 2004, Rakesh Vidyadharan and wedoit4u.biz
| Field Summary | |
|---|---|
(package private) static java.lang.String |
ALL_PARTNERS
The statement that is executed to fetch all the records from the partners table. |
(package private) static java.lang.String |
DELETE_PARTNERS
The delete statement to be executed to delete a record in the partners table identified by the primary key value. |
(package private) static java.lang.String |
FIND_BY_USERNAME_AND_PASSWORD
The statement that is executed to fetch the matching record from the partner table for the specified username
value. |
(package private) static java.lang.String |
INSERT_PARTNERS
The statement that is executed to insert a new record into the partners table. |
(package private) static java.lang.String |
PARTNER_ID_SEQUENCE
The sequence set in the database for the
partner_id primary key column. |
(package private) static java.lang.String |
SELECT_PARTNERS
The statement that is executed to fetch a specific record from the partners table. |
(package private) static java.lang.String |
UPDATE_PARTNERS
The update statement to be executed to update a record in the partners table. |
| Constructor Summary | |
|---|---|
private |
PartnerHelper()
Default constructor. |
| Method Summary | |
|---|---|
(package private) static void |
delete(int partnerId)
Delete the record from the database identified by the primary key value specified. |
(package private) static java.util.Collection |
findAll()
Return a Collection of Integer values
that represent all the primary key values in the
partners table. |
(package private) static int |
findByUsernameAndPassword(java.lang.String username,
java.lang.String password)
Select the record from the partners table that has
the specified username and password
values. |
(package private) static int |
insert(int partnerId,
java.lang.String username,
java.lang.String password,
char active,
java.util.Date expirationDate,
java.lang.String partnerName,
java.lang.String description,
java.lang.String email,
java.lang.String telephone,
java.lang.String mobilePhone)
Insert a new record into the partners table
with the values specified. |
(package private) static void |
select(PartnerBean pb)
Select the specified record from the partners
table. |
(package private) static void |
update(PartnerBean pb)
Update the values in the partners table with
the specified values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String PARTNER_ID_SEQUENCE
sequence set in the database for the
partner_id primary key column.
static final java.lang.String ALL_PARTNERS
partners table.
static final java.lang.String FIND_BY_USERNAME_AND_PASSWORD
partner table for the specified username
value.
static final java.lang.String INSERT_PARTNERS
partners table.
static final java.lang.String SELECT_PARTNERS
partners table.
static final java.lang.String UPDATE_PARTNERS
partners table.
static final java.lang.String DELETE_PARTNERS
partners table identified by the primary key value.
| Constructor Detail |
|---|
private PartnerHelper()
| Method Detail |
|---|
static final java.util.Collection findAll()
throws java.sql.SQLException,
javax.naming.NamingException
Collection of Integer values
that represent all the primary key values in the
partners table.
java.sql.SQLException - - If errors are encountered while fetching
the records from the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
static final int findByUsernameAndPassword(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException,
javax.naming.NamingException
partners table that has
the specified username and password
values.
username - - The username value.password - - The username value.
java.sql.SQLException - - If errors are encountered while fetching
the record from the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
static final void select(PartnerBean pb)
throws java.sql.SQLException,
javax.naming.NamingException
partners
table. The values selected from the database are used to set the
values of the bean fields.
pb - - The java bean instance that represents the
record. The primary key value to use to look up the record is
obtained from this bean.
java.sql.SQLException - - If errors are encountered while fetching
the record from the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
static final int insert(int partnerId,
java.lang.String username,
java.lang.String password,
char active,
java.util.Date expirationDate,
java.lang.String partnerName,
java.lang.String description,
java.lang.String email,
java.lang.String telephone,
java.lang.String mobilePhone)
throws java.sql.SQLException,
javax.naming.NamingException
partners table
with the values specified.
partnerId - - The primary key values to use. If this
is 0, then the next value from the PARTNER_ID_SEQUENCE is used.username - - The username value.password - - The password value.active - - The active value.expirationDate - - The expiration_date value.partnerName - - The partner_name value.description - - The description value.email - - The email value.telephone - - The telephone value.mobilePhone - - The mobile_phone value.
java.sql.SQLException - - If database errors are encountered while
writing to the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
static final void update(PartnerBean pb)
throws java.sql.SQLException,
javax.naming.NamingException
partners table with
the specified values.
pb - - The java bean that represents a
record in the database.
java.sql.SQLException - - If database errors are encountered while
writing to the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
static final void delete(int partnerId)
throws java.sql.SQLException,
javax.naming.NamingException
partnerId - - The partner_id
primary key value.
java.sql.SQLException - - If database errors are encountered while
writing to the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||