📄 usersbeanfunctionset_789ae0b4.java
字号:
package com.leeman.wkexs.master.users.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.*;/** * UsersBeanFunctionSet_789ae0b4 */public class UsersBeanFunctionSet_789ae0b4 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.USERS (COMPANY_ID, USER_ID, NAME, PASSWORD, ACTIVE, EMAIL, ROLE_ID, DEPT_ID, POSITION, TELEPHONE, FAX, APPROVAL_PASSWORD, CREATE_DTTM, CREATE_BY, LAST_MODIFY_DTTM, LAST_MODIFY_BY) 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 USER_ID { String tempString; tempString=(String)inputRecord.get(1); if(tempString==null) pstmt.setNull(2,java.sql.Types.VARCHAR); else pstmt.setString(2,tempString); } // For column NAME { String tempString; tempString=(String)inputRecord.get(2); if(tempString==null) pstmt.setNull(3,java.sql.Types.VARCHAR); else pstmt.setString(3,tempString); } // For column PASSWORD { String tempString; tempString=(String)inputRecord.get(3); if(tempString==null) pstmt.setNull(4,java.sql.Types.VARCHAR); else pstmt.setString(4,tempString); } // For column ACTIVE { String tempString; tempString=(String)inputRecord.get(4); if(tempString==null) pstmt.setNull(5,java.sql.Types.VARCHAR); else pstmt.setString(5,tempString); } // For column EMAIL { String tempString; tempString=(String)inputRecord.get(5); if(tempString==null) pstmt.setNull(6,java.sql.Types.VARCHAR); else pstmt.setString(6,tempString); } // For column ROLE_ID { String tempString; tempString=(String)inputRecord.get(6); if(tempString==null) pstmt.setNull(7,java.sql.Types.VARCHAR); else pstmt.setString(7,tempString); } // For column DEPT_ID { String tempString; tempString=(String)inputRecord.get(7); if(tempString==null) pstmt.setNull(8,java.sql.Types.VARCHAR); else pstmt.setString(8,tempString); } // For column POSITION { String tempString; tempString=(String)inputRecord.get(8); if(tempString==null) pstmt.setNull(9,java.sql.Types.VARCHAR); else pstmt.setString(9,tempString); } // For column TELEPHONE { String tempString; tempString=(String)inputRecord.get(9); if(tempString==null) pstmt.setNull(10,java.sql.Types.VARCHAR); else pstmt.setString(10,tempString); } // For column FAX { String tempString; tempString=(String)inputRecord.get(10); if(tempString==null) pstmt.setNull(11,java.sql.Types.VARCHAR); else pstmt.setString(11,tempString); } // For column APPROVAL_PASSWORD { String tempString; tempString=(String)inputRecord.get(11); if(tempString==null) pstmt.setNull(12,java.sql.Types.VARCHAR); else pstmt.setString(12,tempString); } // For column CREATE_DTTM { java.sql.Timestamp tempTimestamp; tempTimestamp=(java.sql.Timestamp)inputRecord.get(12); if(tempTimestamp==null) pstmt.setNull(13,java.sql.Types.TIMESTAMP); else pstmt.setTimestamp(13,tempTimestamp); } // For column CREATE_BY { String tempString; tempString=(String)inputRecord.get(13); if(tempString==null) pstmt.setNull(14,java.sql.Types.VARCHAR); else pstmt.setString(14,tempString); } // For column LAST_MODIFY_DTTM { java.sql.Timestamp tempTimestamp; tempTimestamp=(java.sql.Timestamp)inputRecord.get(14); if(tempTimestamp==null) pstmt.setNull(15,java.sql.Types.TIMESTAMP); else pstmt.setTimestamp(15,tempTimestamp); } // For column LAST_MODIFY_BY { String tempString; tempString=(String)inputRecord.get(15); if(tempString==null) pstmt.setNull(16,java.sql.Types.VARCHAR); else pstmt.setString(16,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.USERS WHERE COMPANY_ID = ? AND USER_ID = ?"); // 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 USER_ID { String tempString; tempString=(String)inputRecord.get(1); if(tempString==null) pstmt.setNull(2,java.sql.Types.VARCHAR); else pstmt.setString(2,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.USERS SET NAME = ?, PASSWORD = ?, ACTIVE = ?, EMAIL = ?, ROLE_ID = ?, DEPT_ID = ?, POSITION = ?, TELEPHONE = ?, FAX = ?, APPROVAL_PASSWORD = ?, CREATE_DTTM = ?, CREATE_BY = ?, LAST_MODIFY_DTTM = ?, LAST_MODIFY_BY = ? WHERE COMPANY_ID = ? AND USER_ID = ?"); // For column COMPANY_ID { String tempString; tempString=(String)inputRecord.get(0); if(tempString==null) pstmt.setNull(15,java.sql.Types.VARCHAR); else pstmt.setString(15,tempString); } // For column USER_ID { String tempString; tempString=(String)inputRecord.get(1); if(tempString==null) pstmt.setNull(16,java.sql.Types.VARCHAR); else pstmt.setString(16,tempString); } // For column NAME { String tempString; tempString=(String)inputRecord.get(2); if(tempString==null) pstmt.setNull(1,java.sql.Types.VARCHAR); else pstmt.setString(1,tempString); } // For column PASSWORD { String tempString; tempString=(String)inputRecord.get(3); if(tempString==null) pstmt.setNull(2,java.sql.Types.VARCHAR); else pstmt.setString(2,tempString); } // For column ACTIVE { String tempString; tempString=(String)inputRecord.get(4); if(tempString==null) pstmt.setNull(3,java.sql.Types.VARCHAR); else pstmt.setString(3,tempString); } // For column EMAIL { String tempString; tempString=(String)inputRecord.get(5); if(tempString==null) pstmt.setNull(4,java.sql.Types.VARCHAR); else pstmt.setString(4,tempString); } // For column ROLE_ID { String tempString; tempString=(String)inputRecord.get(6); if(tempString==null) pstmt.setNull(5,java.sql.Types.VARCHAR); else pstmt.setString(5,tempString); } // For column DEPT_ID { String tempString; tempString=(String)inputRecord.get(7); if(tempString==null) pstmt.setNull(6,java.sql.Types.VARCHAR); else pstmt.setString(6,tempString); } // For column POSITION { String tempString; tempString=(String)inputRecord.get(8); if(tempString==null) pstmt.setNull(7,java.sql.Types.VARCHAR); else pstmt.setString(7,tempString); } // For column TELEPHONE { String tempString; tempString=(String)inputRecord.get(9); if(tempString==null) pstmt.setNull(8,java.sql.Types.VARCHAR); else pstmt.setString(8,tempString); } // For column FAX { String tempString; tempString=(String)inputRecord.get(10); if(tempString==null) pstmt.setNull(9,java.sql.Types.VARCHAR); else pstmt.setString(9,tempString); } // For column APPROVAL_PASSWORD { String tempString;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -