Rakesh API

biz.wedoit4u.databeans
Class PartnerStyleHelper

java.lang.Object
  extended by biz.wedoit4u.databeans.PartnerStyleHelper

final class PartnerStyleHelper
extends java.lang.Object

A helper class that provides convenient methods to interact with the partner_styles 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

Version:
$Id: PartnerStyleHelper.java,v 1.2 2004/05/26 11:42:32 rakesh Exp $
Author:
Rakesh Vidyadharan 03rd March 2004

Field Summary
(package private) static java.lang.String ALL_PARTNER_STYLES
          The statement that is executed to fetch all the records from the partner_styles table.
(package private) static java.lang.String DELETE_PARTNER_STYLES
          The delete statement to be executed to delete a record in the partner_styles table.
(package private) static java.lang.String FIND_BY_CUSTOMER
          The statement that is executed to fetch all the records from the partner_styles table for the specified partner_id.
(package private) static java.lang.String INSERT_PARTNER_STYLES
          The statement that is executed to insert a new record into the partner_styles table.
(package private) static java.lang.String SELECT_PARTNER_STYLES
          The statement that is executed to fetch a specific record from the partner_styles table.
(package private) static java.lang.String UPDATE_PARTNER_STYLES
          The update statement to be executed to update a record in the partner_styles table.
 
Constructor Summary
private PartnerStyleHelper()
          Default constructor.
 
Method Summary
(package private) static void delete(int styleClassId, 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 PartnerStylesPK objects that represent all the records in the partner_styles table.
(package private) static java.util.Collection findByPartner(int partnerId)
          Return a Collection of PartnerStylesPK objects that represent all the records in the partner_styles table that are associated with the specified partner_id.
(package private) static void insert(int styleClassId, int partnerId, java.lang.String color, java.lang.String fontFamily, java.lang.String fontWeight, java.lang.String fontSize, java.lang.String backgroundColor, java.lang.String textAlign, java.lang.String verticalAlign, java.lang.String width, java.lang.String height, java.lang.String borderStyle, java.lang.String borderWidth, int paddingTop, int paddingLeft, int paddingRight, int paddingBottom, java.lang.String textDecoration)
          Insert a new record into the partner_styles table with the values specified.
(package private) static void select(PartnerStyleBean sab)
          Select the specified record from the partner_styles table.
(package private) static void update(PartnerStyleBean sab)
          Update the values in the partner_styles 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

ALL_PARTNER_STYLES

static final java.lang.String ALL_PARTNER_STYLES
The statement that is executed to fetch all the records from the partner_styles table.

See Also:
Constant Field Values

FIND_BY_CUSTOMER

static final java.lang.String FIND_BY_CUSTOMER
The statement that is executed to fetch all the records from the partner_styles table for the specified partner_id.

See Also:
Constant Field Values

INSERT_PARTNER_STYLES

static final java.lang.String INSERT_PARTNER_STYLES
The statement that is executed to insert a new record into the partner_styles table.

See Also:
Constant Field Values

SELECT_PARTNER_STYLES

static final java.lang.String SELECT_PARTNER_STYLES
The statement that is executed to fetch a specific record from the partner_styles table.

See Also:
Constant Field Values

UPDATE_PARTNER_STYLES

static final java.lang.String UPDATE_PARTNER_STYLES
The update statement to be executed to update a record in the partner_styles table.

See Also:
Constant Field Values

DELETE_PARTNER_STYLES

static final java.lang.String DELETE_PARTNER_STYLES
The delete statement to be executed to delete a record in the partner_styles table.

See Also:
Constant Field Values
Constructor Detail

PartnerStyleHelper

private PartnerStyleHelper()
Default constructor. Cannot be instantiated.

Method Detail

findAll

static final java.util.Collection findAll()
                                   throws java.sql.SQLException,
                                          javax.naming.NamingException
Return a Collection of PartnerStylesPK objects that represent all the records in the partner_styles table.

Returns:
Collection - The collection of primary key values.
Throws:
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.

findByPartner

static final java.util.Collection findByPartner(int partnerId)
                                         throws java.sql.SQLException,
                                                javax.naming.NamingException
Return a Collection of PartnerStylesPK objects that represent all the records in the partner_styles table that are associated with the specified partner_id.

Parameters:
partnerId - - The partner_id value for which the matching primary key values are to be fetched.
Returns:
Collection - The collection of primary key values.
Throws:
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.

select

static final void select(PartnerStyleBean sab)
                  throws java.sql.SQLException,
                         javax.naming.NamingException
Select the specified record from the partner_styles table. The values selected from the database are used to set the values of the bean fields.

Parameters:
sab - - The java bean instance that represents the record. The primary key value to use to look up the record is obtained from this bean.
Throws:
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.

insert

static final void insert(int styleClassId,
                         int partnerId,
                         java.lang.String color,
                         java.lang.String fontFamily,
                         java.lang.String fontWeight,
                         java.lang.String fontSize,
                         java.lang.String backgroundColor,
                         java.lang.String textAlign,
                         java.lang.String verticalAlign,
                         java.lang.String width,
                         java.lang.String height,
                         java.lang.String borderStyle,
                         java.lang.String borderWidth,
                         int paddingTop,
                         int paddingLeft,
                         int paddingRight,
                         int paddingBottom,
                         java.lang.String textDecoration)
                  throws java.sql.SQLException,
                         javax.naming.NamingException
Insert a new record into the partner_styles table with the values specified.

Parameters:
styleClassId - - The primary key value to use.
partnerId - - The primary key value to use.
color - - The color style attribute.
fontFamily - - The font-family style attribute.
fontWeight - - The font-weight style attribute.
fontSize - - The font-size style attribute.
backgroundColor - - The background-color style attribute.
textAlign - - The text-align style attribute.
verticalAlign - - The vertical-align style attribute.
width - - The width style attribute.
height - - The height style attribute.
borderStyle - - The border-style style attribute.
borderWidth - - The border-width style attribute.
paddingTop - - The padding-top style attribute.
paddingLeft - - The padding-left style attribute.
paddingRight - - The padding-right style attribute.
paddingBottom - - The padding-bottom style attribute.
textDecoration - - The text-decoration style attribute.
Throws:
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.

update

static final void update(PartnerStyleBean sab)
                  throws java.sql.SQLException,
                         javax.naming.NamingException
Update the values in the partner_styles table with the specified values.

Parameters:
sab - - The java bean that represents a record in the database.
Throws:
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.

delete

static final void delete(int styleClassId,
                         int partnerId)
                  throws java.sql.SQLException,
                         javax.naming.NamingException
Delete the record from the database identified by the primary key value specified.

Parameters:
styleClassId - - The style_class_id primary key value.
partnerId - - The partner_id primary key value.
Throws:
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

Copyright © 2002-2005 - Rakesh Vidyadharan