|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DatabaseAction
This stateless session bean provides methods that deal with adding or modifying data in the wedoit4u database. This allows us to ensure that the entity beans are deployed only as local interfaces and are insulated from all presentation logic.
The following code sample shows one way of using the methods in this session bean:
String customerTypeId = request.getParameter( "customerTypeId" );
String type = request.getParameter( "type" );
String description = request.getParameter( "description" );
try
{
DatabaseAction df = SessionBeanProvider.getDatabaseAction();
int customerTypeId = df.editCustomerType( Integer.parseInt( customerTypeId ), type, description );
}
catch ( Exception ex )
{
// Do error processing.
}
Copyright 2003, wedoit4u.biz
SessionBeanProvider.getDatabaseAction()| Method Summary | |
|---|---|
CategoryBean |
editCategory(int categoryId,
int customerId,
java.lang.String menuName,
java.lang.String longName,
java.lang.String brief,
java.lang.String picture,
java.lang.String description)
Create/edit a record in the categories table. |
ContentBean |
editContent(int contentId,
int categoryId,
java.lang.String title,
java.lang.String brief,
java.lang.String picture,
java.lang.String body)
Create/edit a record in the contents table. |
CustomerBean |
editCustomer(int customerId,
java.lang.String username,
java.lang.String password,
java.lang.String email,
java.lang.String domain,
java.lang.String active,
java.lang.String activationDate,
java.lang.String expirationDate,
int customerTypeId)
Create/edit a record in the customers table. |
CustomerTypeBean |
editCustomerType(int customerTypeId,
java.lang.String type,
java.lang.String description,
int partnerId)
Create/edit a record in the customer_types table. |
| Methods inherited from interface javax.ejb.EJBLocalObject |
|---|
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
| Method Detail |
|---|
CustomerTypeBean editCustomerType(int customerTypeId,
java.lang.String type,
java.lang.String description,
int partnerId)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException
customer_types table.
customerTypeId - - The customer_type_id to
use to find the entity bean instance. If this value is
0, then a new record will be added to the database,
otherwise, the existing record will be updated with the specified
values of type and description.type - - The type value.description - - The description value.partnerId - - The partner_id value.
customer_type_id value if a
new record was created, or the passed in value.
javax.ejb.CreateException - - If exceptions are encountered while
creating a new entity bean instance.
javax.ejb.FinderException - - If exceptions are encountered while
finding the specified entity bean instance.
javax.naming.NamingException - - If exceptions are encountered while
finding the CustomerTypes
home interface.CustomerType
CustomerBean editCustomer(int customerId,
java.lang.String username,
java.lang.String password,
java.lang.String email,
java.lang.String domain,
java.lang.String active,
java.lang.String activationDate,
java.lang.String expirationDate,
int customerTypeId)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException
customers table.
customerId - - The customer_id to
use to find the entity bean instance. If this value is
0, then a new record will be added to the database,
otherwise, the existing record will be updated with the specified
values of type and description.username - - The username value.password - - The password value.email - - The email value.domain - - The domain value.active - - The active value.activationDate - - The activation_date
value in SQLTimestamp (yyyy-mm-dd hh:MM:ss) format.expirationDate - - The expiration_date
value in SQLTimestamp (yyyy-mm-dd hh:MM:ss) format.customerTypeId - - The customer_type_id
value.
customer_type_id value.
javax.ejb.CreateException - - If exceptions are encountered while
creating a new entity bean instance.
javax.ejb.FinderException - - If exceptions are encountered while
finding the specified entity bean instance.
javax.naming.NamingException - - If exceptions are encountered while
finding the CustomerTypes
home interface.Customer
CategoryBean editCategory(int categoryId,
int customerId,
java.lang.String menuName,
java.lang.String longName,
java.lang.String brief,
java.lang.String picture,
java.lang.String description)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException
categories table.
categoryId - - The category_id to use to
find the entity bean instance. If this value is 0
then a new record will be added to the database, otherwise the
existing record will be updated with the specified information.customerId - - The customer_id value.menuName - - The menu_name value.longName - - The long_name value.brief - - The brief value.
This value may be null.picture - - The picture value.
This value may be null.description - - The description value.
This value may be null.
category_id value.
javax.ejb.CreateException - - If exceptions are encountered while
creating a new entity bean instance.
javax.ejb.FinderException - - If exceptions are encountered while
finding the specified entity bean instance.
javax.naming.NamingException - - If exceptions are encountered while
finding the Categories
home interface.Category
ContentBean editContent(int contentId,
int categoryId,
java.lang.String title,
java.lang.String brief,
java.lang.String picture,
java.lang.String body)
throws javax.ejb.CreateException,
javax.ejb.FinderException,
javax.naming.NamingException
contents table.
contentId - - The content_id to use to
find the entity bean instance. If this value is 0
then a new record will be added to the database, otherwise the
existing record will be updated with the specified information.categoryId - - The category_id value.title - - The title value.brief - - The brief value.
This value may be null.picture - - The picture value.
This value may be null.body - - The body value.
This value may be null.
content_id value.
javax.ejb.CreateException - - If exceptions are encountered while
creating a new entity bean instance.
javax.ejb.FinderException - - If exceptions are encountered while
finding the specified entity bean instance.
javax.naming.NamingException - - If exceptions are encountered while
finding the Contents
home interface.Content
|
Rakesh API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||