001    package biz.wedoit4u.ejb.entity;
002    
003    import java.util.Collection;
004    import javax.ejb.CreateException;
005    import javax.ejb.EJBLocalHome;
006    import javax.ejb.FinderException;
007    
008    /**
009     * The local home interface to the entity bean that represents a record
010     * in the <code>customer_types</code> table.
011     *
012     * <p>Copyright 2003, Rakesh Vidyadharan and wedoit4u.biz</p>
013     *
014     * @author Rakesh Vidyadharan 16<sup><small>th</small></sup> September 2003
015     * @version $Id: CustomerTypes.java,v 1.3 2004/05/26 11:42:34 rakesh Exp $
016     */
017    public interface CustomerTypes extends EJBLocalHome
018    {
019      /**
020       * Create a new <code>customer_types</code> record with just the 
021       * values for the required columns.  This method obtains the next 
022       * <code>sequence</code> value for the <code>customer_type_id</code> 
023       * value, and sets the <code>customerType_id</code> value to 
024       * the <code>sequence value</code>.
025       *
026       * @see biz.wedoit4u.databeans.DatabaseHelper#getNextSequenceValue( String )
027       * @param type - The <code>type</code> value.
028       * @return CustomerType - An entity bean representing the new record.
029       * @throws CreateException - If errors are encountered while creating
030       *   the new record.
031       */
032      public CustomerType create( String type ) throws CreateException;
033    
034      /**
035       * Create a new <code>customer_types</code> record.  This method 
036       * obtains the next <code>sequence</code> value for the 
037       * <code>customer_id</code> value, and sets the <code>
038       * customer_type_id</code> value to the <code>sequence value</code>.
039       *
040       * @see biz.wedoit4u.databeans.DatabaseHelper#getNextSequenceValue( String )
041       * @param type - The <code>type</code> value.
042       * @param description - The <code>description</code> value.
043       * @return CustomerType - An entity bean representing the new record.
044       * @throws CreateException - If errors are encountered while creating
045       *   the new record.
046       */
047      public CustomerType create( String type, String description )
048          throws CreateException;
049    
050      /**
051       * Return the entity bean instance identified by the primary key
052       * value specified.
053       *
054       * @param customerTypeId - The customer_type_id value by which to 
055       *   find the appropriate bean instance.
056       * @return CustomerType - The appropriate entity bean instance.
057       * @throws FinderException - If errors are encountered while fetching
058       *   the appropriate instance.
059       */
060      public CustomerType findByPrimaryKey( int customerTypeId ) 
061        throws FinderException;
062    
063      /**
064       * Return the entity bean instance identified by the unique
065       * <code>type</code> value specified.
066       *
067       * @param type - The type value by which to find the 
068       *   appropriate bean instance.
069       * @return CustomerType - The appropriate entity bean instance.
070       * @throws FinderException - If errors are encountered while fetching
071       *   the appropriate instance.
072       */
073      public CustomerType findByType( String type ) throws FinderException;
074    
075      /**
076       * Return all the entity beans that represent all the rows in the
077       * <code>customer_types</code> table.
078       *
079       * @return Collection - The collection of entity bean instances.
080       * @throws FinderException - If errors are encountered while fetching
081       *   the appropriate instance.
082       */
083      public Collection findAll() throws FinderException;
084    }