一个简单的EJB实例.用DB2连接.JSP页面.很好用.供大家学习

源代码在线查看: locationbeanextractor_176caeeb.java

软件大小: 2249 K
上传用户: face137
关键词: EJB DB2 JSP 连接
下载地址: 免注册下载 普通下载 VIP

相关代码

				package salesdb.websphere_deploy.DB2UDBNT_V8_1;								/**				 * LocationBeanExtractor_176caeeb				 */				public class LocationBeanExtractor_176caeeb extends com.ibm.ws.ejbpersistence.dataaccess.AbstractEJBExtractor {					/**					 * LocationBeanExtractor_176caeeb					 */					public LocationBeanExtractor_176caeeb() {						int[] pkCols={3};						setPrimaryKeyColumns(pkCols);										int[] dataCols={1,2,3,4};						setDataColumns(dataCols);					}					/**					 * extractData					 */					public com.ibm.ws.ejbpersistence.cache.DataCacheEntry extractData(com.ibm.ws.ejbpersistence.dataaccess.RawBeanData dataRow) throws com.ibm.ws.ejbpersistence.utilpm.ErrorProcessingResultCollectionRow, com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerInternalError {						int[] dataColumns = getDataColumns();										salesdb.websphere_deploy.DB2UDBNT_V8_1.LocationBeanCacheEntryImpl_176caeeb entry=							new salesdb.websphere_deploy.DB2UDBNT_V8_1.LocationBeanCacheEntryImpl_176caeeb();										entry.setDataForCITY(dataRow.getString(dataColumns[0]));						entry.setDataForSTATE(dataRow.getString(dataColumns[1]));						entry.setDataForZIPCODE(dataRow.getString(dataColumns[2]));						entry.setDataForAREACODE(dataRow.getString(dataColumns[3]));										return entry;					}					/**					 * extractPrimaryKey					 */					public Object extractPrimaryKey(com.ibm.ws.ejbpersistence.dataaccess.RawBeanData dataRow) throws com.ibm.ws.ejbpersistence.utilpm.ErrorProcessingResultCollectionRow, com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerInternalError {						int[] primaryKeyColumns = getPrimaryKeyColumns();										salesdb.LocationKey key=							new salesdb.LocationKey();										key.zipcode=dataRow.getString(primaryKeyColumns[0]);										return key;					}					/**					 * getHomeName					 */					public String getHomeName() {						return "Location";					}					/**					 * getChunkLength					 */					public int getChunkLength() {						return 4;					}				}							

相关资源