1    package com.instantbank.component.job.ejb;
2    
3    import javax.ejb.EJBHome;
4    import java.rmi.RemoteException;
5    import javax.ejb.CreateException;
6    import javax.ejb.FinderException;
7    
8    /**
9     *  home interface of Job EJB: models a job
10    *  (Entity BMP EJB, master-details)
11    *
12    * @author Instant-bank (Consuelo Franky)
13    * @created October 2002
14    */
15   public interface JobHome extends EJBHome {
16   
17     /**
18      *  Creates a new ejb instance (persistent).
19      *
20      * @param companyId current company
21      * @param userId current user
22      * @param name job name
23      * @param ftpPrimaryId a ftp location id of the company
24      *                          (it can be LetterTemplateGlobals.UNDEF)
25      * @param ftpAlternateId an alternate ftp location id of the company
26      *                          (it can be LetterTemplateGlobals.UNDEF)
27      * @return reference to the new instance EJB
28      * @exception CreateException
29      * @exception RemoteException
30      */
31     public Job create(String companyId, Long userId, String name,
32                       long ftpPrimaryId, long ftpAlternateId)
33        throws RemoteException, CreateException;
34   
35   
36     /**
37      *  Finds an existent ejb instance in the database
38      *
39      * @param jobId key value of instance
40      * @return reference to the instance EJB
41      * @exception FinderException
42      * @exception RemoteException
43      */
44     public Job findByPrimaryKey(Long jobId)
45        throws RemoteException, FinderException;
46   
47   
48     /**
49      *  Finds an existent ejb instance in the database
50      *
51      * @param companyId current company
52      * @param name job name
53      * @return reference to the instance EJB
54      * @exception FinderException
55      * @exception RemoteException
56      */
57     public Job findByName(String companyId, String name)
58        throws RemoteException, FinderException;
59   }
60