Rakesh API

biz.wedoit4u.ejb.entity
Interface Categories

All Superinterfaces:
javax.ejb.EJBLocalHome

public interface Categories
extends javax.ejb.EJBLocalHome

The local home interface to the entity bean that represents a record in the categories table.

Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz

Version:
$Id: Categories.java,v 1.3 2004/05/26 11:42:33 rakesh Exp $
Author:
Rakesh Vidyadharan 9th September 2003

Method Summary
 Category create(Customer customer, java.lang.String menuName, java.lang.String longName)
          Create a new category record with just the required values.
 Category create(Customer customer, java.lang.String menuName, java.lang.String longName, java.lang.String brief, java.lang.String picture, java.lang.String description)
          Create a new category record with all the column values.
 java.util.Collection findAll()
          Return a Collection of entity bean instances that represent all the records in the categories table.
 java.util.Collection findByCustomer(Customer customer)
          Return a Collection of entity bean instances that match the customer_id specified.
 Category findByPrimaryKey(int categoryId)
          Return the entity bean instance that represents the record in the categories table identified by the primary key column (category_id).
 
Methods inherited from interface javax.ejb.EJBLocalHome
remove
 

Method Detail

create

Category create(Customer customer,
                java.lang.String menuName,
                java.lang.String longName)
                throws javax.ejb.CreateException
Create a new category record with just the required values. This method obtains the next sequence value for the category_id value, and sets the category_id value to the sequence value.

Parameters:
customer - - The reference to the entity bean that represents a record in the customer table. This will be used to set the foreign key customer_id column.
menuName - - The value for the menu_name column.
longName - - The value for the long_name column.
Throws:
javax.ejb.CreateException - - If errors are encountered while creating the new record.
See Also:
DatabaseHelper.getNextSequenceValue( String )

create

Category create(Customer customer,
                java.lang.String menuName,
                java.lang.String longName,
                java.lang.String brief,
                java.lang.String picture,
                java.lang.String description)
                throws javax.ejb.CreateException
Create a new category record with all the column values. This method obtains the next sequence value for the category_id value, and sets the category_id value to the sequence value.

Parameters:
customer - - The reference to the entity bean that represents a record in the customer table. This will be used to set the foreign key customer_id column.
menuName - - The value for the menu_name column.
longName - - The value for the long_name column.
brief - - The value for the brief column.
picture - - The value for the picture column.
description - - The value for the description column.
Throws:
javax.ejb.CreateException - - If errors are encountered while creating the new record.
See Also:
DatabaseHelper.getNextSequenceValue( String )

findByPrimaryKey

Category findByPrimaryKey(int categoryId)
                          throws javax.ejb.FinderException
Return the entity bean instance that represents the record in the categories table identified by the primary key column (category_id).

Parameters:
categoryId - - The primary key value based on which to look up the record.
Returns:
Collection - The collection of entity bean instances.
Throws:
javax.ejb.FinderException - - If errors are encountered while finding the appropriate bean instance.

findByCustomer

java.util.Collection findByCustomer(Customer customer)
                                    throws javax.ejb.FinderException
Return a Collection of entity bean instances that match the customer_id specified. This finder returns all the categories belonging to the specified customer.

Parameters:
customer - - The customer_id for which the matching bean instances are to be returned.
Throws:
javax.ejb.FinderException - - If errors are encountered while finding the appropriate bean instance.

findAll

java.util.Collection findAll()
                             throws javax.ejb.FinderException
Return a Collection of entity bean instances that represent all the records in the categories table.

Returns:
Collection - The collection of entity bean instances.
Throws:
javax.ejb.FinderException - - If errors are encountered while finding the appropriate bean instance.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan