📄 object_tokenbeanfunctionset_3a23ec87.java
字号:
/* select object(o) from Object_Token o where o.company_id = ?1 and o.user_id=?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.\"USER_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 (user_id) { 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); } /** * FindUserTokenForUpdate */ public javax.resource.cci.Record FindUserTokenForUpdate(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.user_id=?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.\"USER_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 (user_id) { 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); } /** * FindUserSessionToken */ public javax.resource.cci.Record FindUserSessionToken(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.user_id = ?2 and o.session_id =?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.\"USER_ID\" = ?) 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 (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 ?3 (session_id) { 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); } /** * FindUserSessionTokenForUpdate */ public javax.resource.cci.Record FindUserSessionTokenForUpdate(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.user_id = ?2 and o.session_id =?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.\"USER_ID\" = ?) 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 (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 ?3 (session_id) { 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); } /** * FindByPrimaryKey */ public javax.resource.cci.Record FindByPrimaryKey(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException { PreparedStatement pstmt = null; ResultSet result=null; try { pstmt = prepareStatement(connection,"SELECT T1.COMPANY_ID, T1.TABLE_NAME, T1.RECORD_KEY, T1.PROGRAM_ID, T1.USER_ID, T1.SESSION_ID, T1.TOKEN_DATETIME, T1.TABLE_LOCK FROM WKEXS.OBJECT_TOKEN T1 WHERE T1.COMPANY_ID = ? AND T1.TABLE_NAME = ? AND T1.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 RECORD_KEY { String tempString; tempString=(String)inputRecord.get(1); if(tempString==null) pstmt.setNull(3,java.sql.Types.VARCHAR); else pstmt.setString(3,tempString); } // For column TABLE_NAME { String tempString; tempString=(String)inputRecord.get(2); 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); } /** * FindByPrimaryKeyForUpdate */ public javax.resource.cci.Record FindByPrimaryKeyForUpdate(IndexedRecord inputRecord, Object connection, WSInteractionSpec interactionSpec) throws DataStoreAdapterException { PreparedStatement pstmt = null; ResultSet result=null; try { pstmt = prepareStatement(connection,"SELECT T1.COMPANY_ID, T1.TABLE_NAME, T1.RECORD_KEY, T1.PROGRAM_ID, T1.USER_ID, T1.SESSION_ID, T1.TOKEN_DATETIME, T1.TABLE_LOCK FROM WKEXS.OBJECT_TOKEN T1 WHERE T1.COMPANY_ID = ? AND T1.TABLE_NAME = ? AND T1.RECORD_KEY = ? FOR UPDATE "); // 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 RECORD_KEY { String tempString; tempString=(String)inputRecord.get(1); if(tempString==null) pstmt.setNull(3,java.sql.Types.VARCHAR); else pstmt.setString(3,tempString); } // For column TABLE_NAME { String tempString; tempString=(String)inputRecord.get(2); 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); } /** * Object_TokenBeanFunctionSet_3a23ec87 */ public Object_TokenBeanFunctionSet_3a23ec87() { functionHash=new java.util.HashMap(16); functionHash.put("Create",new Integer(0)); functionHash.put("Remove",new Integer(1)); functionHash.put("Store",new Integer(2)); functionHash.put("StoreUsingOCC",new Integer(3)); functionHash.put("FindTableToken",new Integer(4)); functionHash.put("FindTableTokenForUpdate",new Integer(5)); functionHash.put("FindTableLock",new Integer(6)); functionHash.put("FindTableLockForUpdate",new Integer(7)); functionHash.put("FindByUserRecordKey",new Integer(8)); functionHash.put("FindByUserRecordKeyForUpdate",new Integer(9)); functionHash.put("FindUserToken",new Integer(10)); functionHash.put("FindUserTokenForUpdate",new Integer(11)); functionHash.put("FindUserSessionToken",new Integer(12)); functionHash.put("FindUserSessionTokenForUpdate",new Integer(13)); functionHash.put("FindByPrimaryKey",new Integer(14)); functionHash.put("FindByPrimaryKeyForUpdate",new Integer(15)); } /** * execute */ public Record execute(WSInteractionSpec interactionSpec, IndexedRecord inputRecord, Object connection) throws javax.resource.ResourceException { String functionName=interactionSpec.getFunctionName(); Record outputRecord=null; int functionIndex=((Integer)functionHash.get(functionName)).intValue(); switch (functionIndex) { case 0: Create(inputRecord,connection,interactionSpec); break; case 1: Remove(inputRecord,connection,interactionSpec); break; case 2: Store(inputRecord,connection,interactionSpec); break; case 3: StoreUsingOCC(inputRecord,connection,interactionSpec); break; case 4: outputRecord=FindTableToken(inputRecord,connection,interactionSpec); break; case 5: outputRecord=FindTableTokenForUpdate(inputRecord,connection,interactionSpec); break; case 6: outputRecord=FindTableLock(inputRecord,connection,interactionSpec); break; case 7: outputRecord=FindTableLockForUpdate(inputRecord,connection,interactionSpec); break; case 8: outputRecord=FindByUserRecordKey(inputRecord,connection,interactionSpec); break; case 9: outputRecord=FindByUserRecordKeyForUpdate(inputRecord,connection,interactionSpec); break; case 10: outputRecord=FindUserToken(inputRecord,connection,interactionSpec); break; case 11: outputRecord=FindUserTokenForUpdate(inputRecord,connection,interactionSpec); break; case 12: outputRecord=FindUserSessionToken(inputRecord,connection,interactionSpec); break; case 13: outputRecord=FindUserSessionTokenForUpdate(inputRecord,connection,interactionSpec); break; case 14: outputRecord=FindByPrimaryKey(inputRecord,connection,interactionSpec); break; case 15: outputRecord=FindByPrimaryKeyForUpdate(inputRecord,connection,interactionSpec); break; } return outputRecord; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -