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

📄 object_tokenbeanfunctionset_3a23ec87.java

📁 j2ee源码
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
				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);			}			IndexedRecord oldRecord = interactionSpec.getOldRecord();			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)			{}		}	}	/**	 * FindTableToken	 */	public javax.resource.cci.Record FindTableToken(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.table_name = ?2 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)");			// For ?1 (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 ?2 (table_name)			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindTableTokenForUpdate	 */	public javax.resource.cci.Record FindTableTokenForUpdate(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.table_name = ?2 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)  for update");			// For ?1 (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 ?2 (table_name)			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindTableLock	 */	public javax.resource.cci.Record FindTableLock(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.table_name = ?2 and  o.table_lock = ?3 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)  and  ( q1.\"TABLE_LOCK\" = ?)");			// For ?1 (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 ?2 (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 ?3 (table_lock)			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindTableLockForUpdate	 */	public javax.resource.cci.Record FindTableLockForUpdate(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.table_name = ?2 and  o.table_lock = ?3 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)  and  ( q1.\"TABLE_LOCK\" = ?)  for update");			// For ?1 (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 ?2 (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 ?3 (table_lock)			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindByUserRecordKey	 */	public javax.resource.cci.Record FindByUserRecordKey(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.record_key = ?2 and  o.table_name = ?3 and o.session_id = ?4 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"RECORD_KEY\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)  and  ( q1.\"SESSION_ID\" = ?)");			// For ?1 (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 ?2 (record_key)			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For ?3 (table_name)			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			// For ?4 (session_id)			{				String tempString;				tempString=(String)inputRecord.get(3);				if(tempString==null)					pstmt.setNull(4,java.sql.Types.VARCHAR);				else					pstmt.setString(4,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindByUserRecordKeyForUpdate	 */	public javax.resource.cci.Record FindByUserRecordKeyForUpdate(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {			/* select object(o) from Object_Token o where  o.company_id = ?1 and  o.record_key = ?2 and  o.table_name = ?3 and o.session_id = ?4 */			pstmt = prepareStatement(connection,"select  q1.\"COMPANY_ID\",  q1.\"TABLE_NAME\",  q1.\"RECORD_KEY\",  q1.\"PROGRAM_ID\",  q1.\"USER_ID\",  q1.\"SESSION_ID\",  q1.\"TOKEN_DATETIME\",  q1.\"TABLE_LOCK\" from WKEXS.OBJECT_TOKEN q1 where  ( q1.\"COMPANY_ID\" = ?)  and  ( q1.\"RECORD_KEY\" = ?)  and  ( q1.\"TABLE_NAME\" = ?)  and  ( q1.\"SESSION_ID\" = ?)  for update");			// For ?1 (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 ?2 (record_key)			{				String tempString;				tempString=(String)inputRecord.get(1);				if(tempString==null)					pstmt.setNull(2,java.sql.Types.VARCHAR);				else					pstmt.setString(2,tempString);			}			// For ?3 (table_name)			{				String tempString;				tempString=(String)inputRecord.get(2);				if(tempString==null)					pstmt.setNull(3,java.sql.Types.VARCHAR);				else					pstmt.setString(3,tempString);			}			// For ?4 (session_id)			{				String tempString;				tempString=(String)inputRecord.get(3);				if(tempString==null)					pstmt.setNull(4,java.sql.Types.VARCHAR);				else					pstmt.setString(4,tempString);			}			result = pstmt.executeQuery();		}		catch (SQLException e) {			throw new DataStoreAdapterException("DSA_ERROR", e ,this.getClass());		}		return createCCIRecord(connection, result);	}	/**	 * FindUserToken	 */	public javax.resource.cci.Record FindUserToken(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException {		PreparedStatement pstmt = null;		ResultSet result=null;		try {

⌨️ 快捷键说明

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