The completed Java source code for the jcdInsert Collaboration appears as follows:
package prjDB2_JCDjcdALL; public class jcdInsert { public com.stc.codegen.logger.Logger logger; public com.stc.codegen.alerter.Alerter alerter; public com.stc.codegen.util.CollaborationContext collabContext; public com.stc.codegen.util.TypeConverter typeConverter; public void receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, dtd.otdInputDTD630345798 .DB_employee otdInputDTD_DB_employee_1, otdDB2.OtdDB2OTD otdDB2_1 ) throws Throwable { FileClient_1.setText( "Inserting records in to db_employee table......" ); FileClient_1.write(); otdInputDTD_DB_employee_1.unmarshalFromString( input.getText() ); otdDB2_1.getDB_EMPLOYEE().insert(); for (int i1 = 0; i1 < otdInputDTD_DB_employee_1.countX_sequence_A(); i1 += 1) { otdDB2_1.getDB_EMPLOYEE().setEMP_NO( typeConverter.stringToShort( otdInputDTD_DB_employee_1.getX_sequence_A( i1 ).getEmpNo(), "#", false, 0 ) ); otdDB2_1.getDB_EMPLOYEE().setLAST_NAME( otdInputDTD_DB_employee_1. getX_sequence_A( i1 ).getLastname() ); otdDB2_1.getDB_EMPLOYEE().setFIRST_NAME( otdInputDTD_DB_employee_1. getX_sequence_A( i1 ).getFirstname() ); otdDB2_1.getDB_EMPLOYEE().setRATE( new java.math.BigDecimal( otdInputDTD_DB_employee_1.getX_sequence_A( i1 ).getRate() ) ); otdDB2_1.getDB_EMPLOYEE().setLAST_UPDATE( java.sql.Date.valueOf( otdInputDTD_DB_employee_1.getX_sequence_A( i1 ).getLastDate() ) ); otdDB2_1.getDB_EMPLOYEE().insertRow(); } FileClient_1.setText( "Insert Done." ); FileClient_1.write(); } } |
The above code has been wrapped for display purposes.