|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.wedoit4u.databeans.SitePropertyHelper
final class SitePropertyHelper
A helper class that provides convenient methods to interact with
the site_properties table. This class is meant to
be used from the DatabaseHelper class, or other classes
in this package only.
Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz
| Field Summary | |
|---|---|
(package private) static java.lang.String |
ALL_SITE_PROPERTIES
The statement that is executed to fetch all the records from the site_properties table. |
(package private) static java.lang.String |
DELETE_SITE_PROPERTIES
The delete statement that is executed to delete a record in the site_properties table identified by the primary key value. |
(package private) static java.lang.String |
INSERT_SITE_PROPERTIES
The statement that is executed to insert a new record into the site_properties table. |
(package private) static java.lang.String |
NULL_CLOBS
The statement that is used to empty the contents of the header and footer clob columns prior to
updating them. |
(package private) static java.lang.String |
SELECT_SITE_PROPERTIES
The statement that is executed to fetch a specific record from the site_properties table. |
(package private) static java.lang.String |
UPDATE_CLOBS
The statement that is used to set the value of the header
and footer clob columns. |
(package private) static java.lang.String |
UPDATE_SITE_PROPERTIES
The update statement to be executed to update a record in the content_types table. |
| Constructor Summary | |
|---|---|
private |
SitePropertyHelper()
Default constructor. |
| Method Summary | |
|---|---|
(package private) static void |
delete(int customerId)
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
site_properties table. |
(package private) static void |
insert(int customerId,
int topRail,
int leftRail,
int rightRail,
int bottomRail)
Insert a new record into the site_properties table
with the values specified. |
(package private) static void |
insert(int customerId,
int topRail,
int leftRail,
int rightRail,
int bottomRail,
java.lang.String header,
java.lang.String footer)
Insert a new record into the site_properties table
with the values specified. |
private static void |
nullClobFields(int customerId)
Reset the header and footer column values
to empty strings. |
(package private) static void |
select(SitePropertyBean spb)
Select the specified record from the site_properties
table. |
(package private) static void |
update(SitePropertyBean spb)
Update the values in the site_properties table with
the specified values. |
private static void |
updateClobFields(int customerId,
java.lang.String header,
java.lang.String footer)
Write the specified string values to the header and
footer clob columns. |
| 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 ALL_SITE_PROPERTIES
site_properties table.
static final java.lang.String INSERT_SITE_PROPERTIES
site_properties table.
static final java.lang.String SELECT_SITE_PROPERTIES
site_properties table.
static final java.lang.String UPDATE_SITE_PROPERTIES
content_types table.
static final java.lang.String DELETE_SITE_PROPERTIES
site_properties table identified by the primary key value.
static final java.lang.String NULL_CLOBS
header and footer clob columns prior to
updating them.
static final java.lang.String UPDATE_CLOBS
header
and footer clob columns.
| Constructor Detail |
|---|
private SitePropertyHelper()
| 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
site_properties 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 void select(SitePropertyBean spb)
throws java.sql.SQLException,
javax.naming.NamingException
site_properties
table. The values selected from the database are used to set the
values of the bean fields.
spb - - 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 void insert(int customerId,
int topRail,
int leftRail,
int rightRail,
int bottomRail)
throws java.sql.SQLException,
javax.naming.NamingException
site_properties table
with the values specified. The header and
footer columns are set to singe spaces.
customerId - - The primary key value to use.topRail - - The top_rail value.leftRail - - The left_rail value.rightRail - - The right_rail value.bottomRail - - The bottom_rail 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.nullClobFields( int )
static final void insert(int customerId,
int topRail,
int leftRail,
int rightRail,
int bottomRail,
java.lang.String header,
java.lang.String footer)
throws java.sql.SQLException,
javax.naming.NamingException
site_properties table
with the values specified.
customerId - - The primary key value to use.topRail - - The top_rail value.leftRail - - The left_rail value.rightRail - - The right_rail value.bottomRail - - The bottom_rail value.header - - The header value.footer - - The footer 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.insert( int, int, int, int, int ),
updateClobFields( int, String, String )
static final void update(SitePropertyBean spb)
throws java.sql.SQLException,
javax.naming.NamingException
site_properties table with
the specified values.
spb - - 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.nullClobFields( int ),
updateClobFields( int, String, String )
private static final void nullClobFields(int customerId)
throws java.sql.SQLException,
javax.naming.NamingException
header and footer column values
to empty strings.
customerId - - The primary key value whose body is to
be updated.
java.sql.SQLException - - If errors are encountered while writing
to the database.
javax.naming.NamingException - - If errors are encountered while getting
a connection from the connection pool.
private static final void updateClobFields(int customerId,
java.lang.String header,
java.lang.String footer)
throws java.sql.SQLException,
javax.naming.NamingException
header and
footer clob columns.
Note: The existings contents in the header
and footer columns should be truncated prior to
invoking this method if you wish to have the desired content in
the columns. This method will set the first header.length()
and footer.length() characters of the
header and footer columns respectively
to the strings specified.
customerId - - The primary key value whose body is to
be updated.header - - The new header value.footer - - The new footer value.
java.sql.SQLException - - If 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 customerId)
throws java.sql.SQLException,
javax.naming.NamingException
customerId - - The customer_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 | |||||||||