Interstage Application Server J2EE ユーザーズガイド
目次 索引 前ページ次ページ

第3部 EJB編> 第12章 Entity Beanの実装> 12.2 Homeインタフェースの作成

12.2.1 記述例

 SampleHomeという名前のインタフェースを設定した場合の例を以下に示します。

package Sample; 

  import javax.ejb.*; 
  import java.rmi.RemoteException; 
  import java.util.*; 

  public interface SampleHome extends EJBHome
  {

      /* createメソッドの定義 */
      public SampleRemote create(Integer code, String name, String desc  ) 
                           throws CreateException, RemoteException; 

      /* findByPrimaryKeyメソッドの定義 */
      public SampleRemote findByPrimaryKey(SampleBeanPrimaryKey primaryKey) 
                           throws FinderException, RemoteException; 

      /* find<METHOD>メソッドの定義 */
      public Enumeration findSampleBigCode(Integer bigcode) 
                          throws FinderException, RemoteException;

/* find<METHOD>メソッドの定義 */ public Collection findSampleByName(String name) throws FinderException, RemoteException;
  }

目次 索引 前ページ次ページ

All Rights Reserved, Copyright(C) 富士通株式会社 2005