⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 object_tokenbeanfunctionset_3a23ec87.java

📁 j2ee源码
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
package com.leeman.common.dao.websphere_deploy.ORACLE_V9_1;import com.ibm.websphere.rsadapter.WSInteractionSpec;import com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException;import javax.resource.cci.Record;import javax.resource.cci.IndexedRecord;import java.sql.*;/** * Object_TokenBeanFunctionSet_3a23ec87 */public class Object_TokenBeanFunctionSet_3a23ec87 extends com.ibm.ws.rsadapter.cci.WSResourceAdapterBase implements com.ibm.websphere.rsadapter.DataAccessFunctionSet {	private java.util.HashMap functionHash;	/**	 * Create	 */	public void Create(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		try {			pstmt = prepareStatement(connection,"INSERT INTO WKEXS.OBJECT_TOKEN (COMPANY_ID, TABLE_NAME, RECORD_KEY, PROGRAM_ID, USER_ID, SESSION_ID, TOKEN_DATETIME, TABLE_LOCK) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");			// For column COMPANY_ID			{				String tempString;				tempString=(String)inputRecord.get(0);				if(tempString==null)					pstmt.setNull(1,java.sql.Types.VARCHAR);				else					pstmt.setString(1,tempString);			}			// For column TABLE_NAME			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For column RECORD_KEY			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			// For column PROGRAM_ID			{				String tempString;				tempString=(String)inputRecord.get(3);				if(tempString==null)					pstmt.setNull(4,java.sql.Types.VARCHAR);				else					pstmt.setString(4,tempString);			}			// For column USER_ID			{				String tempString;				tempString=(String)inputRecord.get(4);				if(tempString==null)					pstmt.setNull(5,java.sql.Types.VARCHAR);				else					pstmt.setString(5,tempString);			}			// For column SESSION_ID			{				String tempString;				tempString=(String)inputRecord.get(5);				if(tempString==null)					pstmt.setNull(6,java.sql.Types.VARCHAR);				else					pstmt.setString(6,tempString);			}			// For column TOKEN_DATETIME			{				java.sql.Timestamp tempTimestamp;				tempTimestamp=(java.sql.Timestamp)inputRecord.get(6);				if(tempTimestamp==null)					pstmt.setNull(7,java.sql.Types.TIMESTAMP);				else					pstmt.setTimestamp(7,tempTimestamp);			}			// For column TABLE_LOCK			{				String tempString;				tempString=(String)inputRecord.get(7);				if(tempString==null)					pstmt.setNull(8,java.sql.Types.VARCHAR);				else					pstmt.setString(8,tempString);			}			if (pstmt.executeUpdate()==0)				throw new DataStoreAdapterException("DSA_ERROR",new javax.ejb.NoSuchEntityException(), this.getClass());		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		finally {			try {				if(pstmt != null) {					returnPreparedStatement(connection, pstmt);				}			}			catch (SQLException ignored)			{}		}	}	/**	 * Remove	 */	public void Remove(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		try {			pstmt = prepareStatement(connection,"DELETE FROM WKEXS.OBJECT_TOKEN  WHERE COMPANY_ID = ? AND TABLE_NAME = ? AND RECORD_KEY = ?");			// For column COMPANY_ID			{				String tempString;				tempString=(String)inputRecord.get(0);				if(tempString==null)					pstmt.setNull(1,java.sql.Types.VARCHAR);				else					pstmt.setString(1,tempString);			}			// For column TABLE_NAME			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For column RECORD_KEY			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			if (pstmt.executeUpdate()==0)				throw new DataStoreAdapterException("DSA_ERROR",new javax.ejb.NoSuchEntityException(), this.getClass());		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		finally {			try {				if(pstmt != null) {					returnPreparedStatement(connection, pstmt);				}			}			catch (SQLException ignored)			{}		}	}	/**	 * Store	 */	public void Store(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		try {			pstmt = prepareStatement(connection,"UPDATE WKEXS.OBJECT_TOKEN  SET PROGRAM_ID = ?, USER_ID = ?, SESSION_ID = ?, TOKEN_DATETIME = ?, TABLE_LOCK = ? WHERE COMPANY_ID = ? AND TABLE_NAME = ? AND RECORD_KEY = ?");			// For column COMPANY_ID			{				String tempString;				tempString=(String)inputRecord.get(0);				if(tempString==null)					pstmt.setNull(6,java.sql.Types.VARCHAR);				else					pstmt.setString(6,tempString);			}			// For column TABLE_NAME			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(7,java.sql.Types.VARCHAR);				else					pstmt.setString(7,tempString);			}			// For column RECORD_KEY			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(8,java.sql.Types.VARCHAR);				else					pstmt.setString(8,tempString);			}			// For column PROGRAM_ID			{				String tempString;				tempString=(String)inputRecord.get(3);				if(tempString==null)					pstmt.setNull(1,java.sql.Types.VARCHAR);				else					pstmt.setString(1,tempString);			}			// For column USER_ID			{				String tempString;				tempString=(String)inputRecord.get(4);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For column SESSION_ID			{				String tempString;				tempString=(String)inputRecord.get(5);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			// For column TOKEN_DATETIME			{				java.sql.Timestamp tempTimestamp;				tempTimestamp=(java.sql.Timestamp)inputRecord.get(6);				if(tempTimestamp==null)					pstmt.setNull(4,java.sql.Types.TIMESTAMP);				else					pstmt.setTimestamp(4,tempTimestamp);			}			// For column TABLE_LOCK			{				String tempString;				tempString=(String)inputRecord.get(7);				if(tempString==null)					pstmt.setNull(5,java.sql.Types.VARCHAR);				else					pstmt.setString(5,tempString);			}			if (pstmt.executeUpdate()==0)				throw new DataStoreAdapterException("DSA_ERROR",new javax.ejb.NoSuchEntityException(), this.getClass());		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		finally {			try {				if(pstmt != null) {					returnPreparedStatement(connection, pstmt);				}			}			catch (SQLException ignored)			{}		}	}	/**	 * StoreUsingOCC	 */	public void StoreUsingOCC(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		try {			pstmt = prepareStatement(connection,"UPDATE WKEXS.OBJECT_TOKEN  SET PROGRAM_ID = ?, USER_ID = ?, SESSION_ID = ?, TOKEN_DATETIME = ?, TABLE_LOCK = ? WHERE COMPANY_ID = ? AND TABLE_NAME = ? AND RECORD_KEY = ?");			// For column COMPANY_ID			{				String tempString;				tempString=(String)inputRecord.get(0);				if(tempString==null)					pstmt.setNull(6,java.sql.Types.VARCHAR);				else					pstmt.setString(6,tempString);			}			// For column TABLE_NAME			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(7,java.sql.Types.VARCHAR);				else					pstmt.setString(7,tempString);			}			// For column RECORD_KEY			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(8,java.sql.Types.VARCHAR);				else					pstmt.setString(8,tempString);			}			// For column PROGRAM_ID			{				String tempString;				tempString=(String)inputRecord.get(3);				if(tempString==null)					pstmt.setNull(1,java.sql.Types.VARCHAR);				else					pstmt.setString(1,tempString);			}			// For column USER_ID			{				String tempString;				tempString=(String)inputRecord.get(4);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For column SESSION_ID			{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -