edu.rice.rubis.beans
Interface CategoryHome
- All Superinterfaces:
- javax.ejb.EJBHome, java.rmi.Remote
- public interface CategoryHome
- extends javax.ejb.EJBHome
This is the Home interface of the Category Bean
Method Summary |
Category |
create(java.lang.String name)
This method is used to create a new Category Bean. |
java.util.Collection |
findAllCategories()
This method is used to retrieve all categories from the database! |
Category |
findByName(java.lang.String categoryName)
This method is used to retrieve a Category Bean from its name. |
Category |
findByPrimaryKey(CategoryPK id)
This method is used to retrieve a Category Bean from its primary key,
that is to say its id. |
Methods inherited from interface javax.ejb.EJBHome |
getEJBMetaData, getHomeHandle, remove, remove |
create
public Category create(java.lang.String name)
throws javax.ejb.CreateException,
java.rmi.RemoteException,
javax.ejb.RemoveException
- This method is used to create a new Category Bean. Note that the category
id is automatically generated by the database (AUTO_INCREMENT) on the
primary key.
- Parameters:
name
- Category name- Returns:
- pk primary key set to null
findByPrimaryKey
public Category findByPrimaryKey(CategoryPK id)
throws javax.ejb.FinderException,
java.rmi.RemoteException
- This method is used to retrieve a Category Bean from its primary key,
that is to say its id.
- Parameters:
id
- Category id (primary key)- Returns:
- the Category if found else null
findByName
public Category findByName(java.lang.String categoryName)
throws javax.ejb.FinderException,
java.rmi.RemoteException
- This method is used to retrieve a Category Bean from its name.
- Parameters:
categoryName
- Category name- Returns:
- the Category if found else null
findAllCategories
public java.util.Collection findAllCategories()
throws java.rmi.RemoteException,
javax.ejb.FinderException
- This method is used to retrieve all categories from the database!
- Returns:
- List of all categories (eventually empty)
Copyright © 2003 - ObjectWeb Consortium - All Rights Reserved.