|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbiz.wedoit4u.databeans.PartnerStyleBean
public class PartnerStyleBean
A Java Bean that represents a record in the partner_styles
table. This bean is used to cache the values read
from the database, and to make modifications you need to the bean
fields, and then send it back to the database for updating the
associated record. All instances of this class are cached into a
Map object that is stored in the
System.getProperties() object under a property with
name CACHE_NAME. All instances variables are public except
the primary key columns style_class_id
and partner_id.
Copyright 2004, Rakesh Vidyadharan
| Field Summary | |
|---|---|
java.lang.String |
backgroundColor
The value in the background_color column. |
java.lang.String |
borderStyle
The value in the border_style column. |
java.lang.String |
borderWidth
The value in the border_width column. |
private static java.util.Map |
cache
The Map that is used to cache instances
of this bean. |
static java.lang.String |
CACHE_NAME
A constant that denotes the name of the system property at which all instances of this class are cached. |
java.lang.String |
color
The value in the color column. |
java.lang.String |
fontFamily
The value in the font_family column. |
java.lang.String |
fontSize
The value in the font_size column. |
java.lang.String |
fontWeight
The value in the font_weight column. |
java.lang.String |
height
The value in the height column. |
private static java.lang.Object |
lockObject
An object that is used to synchronise modifications
to the system cache of instances of these beans. |
int |
paddingBottom
The value in the padding_bottom column. |
int |
paddingLeft
The value in the padding_left column. |
int |
paddingRight
The value in the padding_right column. |
int |
paddingTop
The value in the padding_top column. |
private int |
partnerId
The value in the partner_id column. |
private int |
styleClassId
The value in the style_class_id column. |
java.lang.String |
textAlign
The value in the text_align column. |
java.lang.String |
textDecoration
The value in the text_decoration column. |
java.lang.String |
verticalAlign
The value in the vertical_align column. |
java.lang.String |
width
The value in the width column. |
| Constructor Summary | |
|---|---|
private |
PartnerStyleBean()
The default constructor. |
| Method Summary | |
|---|---|
static PartnerStyleBean |
create(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)
Create a new instance of the bean that may be used to create a corresponding record in the style_attributes table. |
static void |
delete(PartnerStyleBean sab)
Delete the specified instance of this class from the system cache as well as from the database. |
static java.util.Collection |
findAll()
Return a Collection of bean instances that represent
all the records in the style_attributes table. |
static java.util.Collection |
findByPartner(int partnerId)
Return a Collection of bean instances that represent
all the records in the style_attributes table that
are associated with the specified partner_id. |
static PartnerStyleBean |
getInstance(PartnerStylesPK pk)
Fetch the instance of the bean identified by the primary
key value specified. |
int |
getPartnerId()
Returns partnerId. |
int |
getStyleClassId()
Returns styleClassId. |
void |
save()
Write back all the values in the bean fields to the database. |
static void |
setInstance(PartnerStyleBean sab)
Add the specified bean instance to the system cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.Object lockObject
synchronise modifications
to the system cache of instances of these beans.
private static final java.util.Map cache
Map that is used to cache instances
of this bean.
public static final java.lang.String CACHE_NAME
private int styleClassId
style_class_id column. This column
is part of the compound primary key for this table.
private int partnerId
partner_id column. This column is
part of the compound primary key for this table.
public java.lang.String color
color column.
public java.lang.String fontFamily
font_family column.
public java.lang.String fontWeight
font_weight column.
public java.lang.String fontSize
font_size column.
public java.lang.String backgroundColor
background_color column.
public java.lang.String textAlign
text_align column.
public java.lang.String verticalAlign
vertical_align column.
public java.lang.String width
width column.
public java.lang.String height
height column.
public java.lang.String borderStyle
border_style column.
public java.lang.String borderWidth
border_width column.
public int paddingTop
padding_top column.
public int paddingLeft
padding_left column.
public int paddingRight
padding_right column.
public int paddingBottom
padding_bottom column.
public java.lang.String textDecoration
text_decoration column.
| Constructor Detail |
|---|
private PartnerStyleBean()
| Method Detail |
|---|
public static final PartnerStyleBean create(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 CMAException
style_attributes table.
Note: The compound primary key components styleClassId and partnerId are both foreign key
references to the style_classes.style_class_id
and partners.partner_id columns.
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.
CMAException - - If an attempt is made to create an instance
of the object that already exists, as identified by the
styleClassId value.
public static final void delete(PartnerStyleBean sab)
throws CMAException
sab - - The bean instance that is to be
removed.
CMAException - - If errors are encountered while removing
the associated record in the database.PartnerStyleHelper.delete( int, int )
public void save()
throws CMAException
style_attributes table are
updated with the values in the bean fields.
CMAException - - If errors are encountered while writing
the values to the database.
public static final java.util.Collection findAll()
throws CMAException
Collection of bean instances that represent
all the records in the style_attributes table.
CMAException - - If errors are encountered while fetching
all the bean instances.
public static final java.util.Collection findByPartner(int partnerId)
throws CMAException
Collection of bean instances that represent
all the records in the style_attributes table that
are associated with the specified partner_id.
partnerId - - The partner_id for which
all associated records are to be fetched.
CMAException - - If errors are encountered while fetching
all the bean instances.
public static final PartnerStyleBean getInstance(PartnerStylesPK pk)
throws CMAException
primary
key value specified. If the bean instance does not exist
in the cache, try to fetch it from the database.
pk - - The object representing the
compound primary key columns for this table.
CMAException - - If the specified bean instance is not
available in the system cache.public static final void setInstance(PartnerStyleBean sab)
Map
interface in that, if an entry with the same key already exists,
then that entry is replaced, or a new one created. This method
uses the lockObject to synchronise
modifications to the Map cache.
sab - - The instance that is being added to
the system cache.public final int getStyleClassId()
styleClassId.
public final int getPartnerId()
partnerId.
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||