Đang chuẩn bị liên kết để tải về tài liệu:
Enterprise Java and UML 2nd Edition PHẦN 1
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
OMG PRESS CT Arrington, Syed Rayhan ™ TimeEntryEntityBean TimeEntryInt.java TimeEntryLocal.java is the local interface for the TimeEntry entity bean. It defines the locally accessible methods for the TimeEntry entity bean. This is shown in Figure 01. TimeEntryLocal + getHours() : int + getDate() : Date + getChargeCode() : ChargeCodeLocal + getTimecard() : TimecardLocal + setHours(hours : int) + setDate(day : Date) + setChargeCode(code : ChargeCodeLocal) Figure 01 Local interface of the TimeEntry entity bean. package com.wiley.compBooks.EJwithUML.TimeCardDomain; import java.util.*; import javax.ejb.*; /** * The TimeEntryInt is the interface that ties the Bean with the Remote 1 2 TimeEntryEntityBean * interface to provide compile time type checking. */ public interface TimeEntryInt {. | OMG PRESS Enterprise Java and UML 2nd Edition CT Arrington Syed Rayhan TimeEntryEntityBean TimeEntryInt.java TimeEntryLocal.java is the local interface for the TimeEntry entity bean. It defines the locally accessible methods for the TimeEntry entity bean. This is shown in Figure 01. EntityLocal TimeEntryLocal getHours int getDate Date getChargeCode ChargeCodeLocal getTimecard TimecardLocal setHours hours int setDate day Date setChargeCode code ChargeCodeLocal Figure 01 Local interface of the TimeEntry entity bean. package com.wiley.compBooks.EJwithUML.TimeCardDomain import java.util. import javax.ejb. The TimeEntryInt is the interface that ties the Bean with the Remote 1 2 TimeEntryEntityBean interface to provide compile time type checking. public interface TimeEntryInt Answers a ChargeCode for this TimeEntry. public ChargeCodeLocal getChargeCode Answers the hour charged in this TimeEntry. public int getHours Answers the day the time is entered for. public Date getDate Answers the timecard it belongs to. public TimecardLocal getTimecard sets a ChargeCode for this TimeEntry. public void setChargeCode ChargeCodeLocal ccode sets the hour charged in this TimeEntry. public void setHours int hours sets the day the time is entered for. public void setDate Date date TimeEntryLocal.java TimeEntryLocal.java is the local EJB interface that inherits from TimeEntryInt and hence the body is empty. This is in line with what we have set as our implementation strategy for all of our EJBs. package com.wiley.compBooks.EJwithUML.TimeCardDomain import java.util. import javax.ejb. The TimeEntry bean holds a single time entry. TimeEntryLocal is the local interface through which local clients access the underlying entity bean. public interface TimeEntryLocal extends EJBLocalObject TimeEntryInt