example.cmp.select
Interface Student

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface Student
extends javax.ejb.EJBLocalObject

Local interface for the Student bean.

 CREATE TABLE select_student (
   name VARCHAR(250) NOT NULL,
   gender VARCHAR(6) NOT NULL,
   house VARCHAR(250) NOT NULL,
 
   PRIMARY KEY(name)
 );
 
In this example, the gender field is not exposed in the local interface (for no reason other to demonstrate that it's possible). The getGender and setGender methods are still in the StudentBean implementation, but they're not accessible to clients.

The getName method must always be available because it's the primary key, and the getHouse and setHouse methods must always be in the local interface because relation methods must be available to the persistence manager..


Method Summary
 House getHouse()
          Returns the House that this Student belongs to (CMR field).
 java.lang.String getName()
          Returns the student's name (the primary key).
 void setHouse(House house)
          sets the House that this Student is to belong to (CMR field).
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

getName

public java.lang.String getName()
Returns the student's name (the primary key).

getHouse

public House getHouse()
Returns the House that this Student belongs to (CMR field).

setHouse

public void setHouse(House house)
sets the House that this Student is to belong to (CMR field).
Parameters:
house - new House that this Student will belong to.