Java Tutorial - Java Scipt : Creating the LocalUser Interface

Java Tutorial - Java Scipt :

Creating the LocalUser Interface

The local and remote interfaces expose the methods that can be used by the clients of the entity bean. The remote interface is only created for external clients. Because this is an entity bean, we normally only create a local interface
but here we will also create a remote interface for testing purposes. Session beans within the same container as the entity bean will use the local interface. When the bean is deployed, the container will create an object that implements this interface. This object is returned when the create() and findByXxx() methods are executed on the home interface. The following code shows the local interface:

package com.oldfriends.entity;
import java.lang.*;
import java.rmi.RemoteException;
public interface UserLocal extends javax.ejb.EJBLocalObject
public String getUserid();
// public void setUserid(Integer i);
public String getFirstName();
public void setFirstName( String firstName );
public String getLastName();
public void setLastName( String lastName );
public String getMi();
public void setMi( String mi );
public String getMaidenName();
public void setMaidenName( String maidenName );
public int getGradYear();
public void setGradYear( int year );
public String getLoginId();
public void setLoginId( String loginId );
public String getPassword();
public void setPassword( String password );
public String getEmail();
public void setEmail( String email );
The local interface for this bean simply exposes the getXxx() and setXxx() methods created in the abstract EJB class.