1 package example.cmp.select; 2 3 import java.rmi.*; 4 import java.util.*; 5 import javax.ejb.*; 6 7 /** 8 * Local interface for the Student bean. 9 * 10 * <code><pre> 11 * CREATE TABLE select_student ( 12 * name VARCHAR(250) NOT NULL, 13 * gender VARCHAR(6) NOT NULL, 14 * house VARCHAR(250) NOT NULL, 15 * 16 * PRIMARY KEY(name) 17 * ); 18 * </pre></code> 19 * 20 * In this example, the gender field is not exposed in the 21 * local interface (for no reason other to demonstrate that 22 * it's possible). The getGender and setGender methods are still 23 * in the StudentBean implementation, but they're not accessible 24 * to clients. 25 * 26 * <p>The getName method must always be available because 27 * it's the primary key, and the getHouse and setHouse methods must always 28 * be in the local interface because relation methods must be available to 29 * the persistence manager.. 30 */ 31 public interface Student extends EJBLocalObject { 32 /** 33 * Returns the student's name (the primary key). 34 */ 35 public String getName(); 36 37 /** 38 * Returns the <code>House</code> that this Student belongs to (CMR field). 39 */ 40 public House getHouse(); 41 42 /** 43 * sets the <code>House</code> that this Student is to belong to (CMR field). 44 * 45 * @param house new House that this Student will belong to. 46 */ 47 public void setHouse(House house); 48 } 49