1 package example.cmp.transaction; 2 3 import java.io.Serializable; 4 import java.util.Enumeration; 5 6 import javax.ejb.*; 7 import javax.naming.InitialContext; 8 import javax.naming.NamingException; 9 import javax.sql.DataSource; 10 11 import com.caucho.ejb.AbstractEntityBean; 12 13 import java.util.Collection; 14 15 18 public abstract class CourseBean extends AbstractEntityBean { 19 20 21 24 public abstract int getId(); 25 26 29 public abstract String getName(); 30 31 34 public abstract void setName(String val); 35 36 40 public abstract void setMaxStudentAmount(int amount); 41 42 46 public abstract int getMaxStudentAmount(); 47 48 52 abstract public Collection getStudentList(); 53 54 57 public boolean isFull() 58 { 59 int studentCount = getStudentList().size(); 60 if (studentCount == getMaxStudentAmount()) 61 return true; 62 return false; 63 } 64 } 65 | Popular Tags |