@Override public ProcessLogInfo execute(String[] params){
  try {
    ProcessLogInfo processLogInfo=new ProcessLogInfo();
    CommandLine commandLine=getCommandLine(params,PARAMS_STRUCTURE);
    String pId=commandLine.getOptionValue("process-id");
    LOGGER.debug("processId is " + pId);
    String logCat=commandLine.getOptionValue("log-category");
    LOGGER.debug("log category is " + logCat);
    String message=commandLine.getOptionValue("message");
    LOGGER.debug("message is " + message);
    String mId=commandLine.getOptionValue("message-id");
    LOGGER.debug("message id is" + mId);
    String iRef=commandLine.getOptionValue("instance-ref");
    LOGGER.debug("instance ref is " + iRef);
    String addTs=commandLine.getOptionValue("add-ts");
    LOGGER.debug("add ts " + addTs);
    processLogInfo.setProcessId(Integer.parseInt(pId));
    processLogInfo.setLogCategory(logCat);
    processLogInfo.setMessage(message);
    processLogInfo.setMessageId(mId);
    processLogInfo.setInstanceRef(Long.parseLong(iRef));
    processLogInfo.setAddTs(Timestamp.valueOf(addTs));
    com.wipro.ats.bdre.md.dao.jpa.ProcessLog processLog=new com.wipro.ats.bdre.md.dao.jpa.ProcessLog();
    processLog.setAddTs(Timestamp.valueOf(addTs));
    processLog.setInstanceRef(Long.parseLong(iRef));
    processLog.setLogCategory(logCat);
    processLog.setMessage(message);
    processLog.setMessageId(mId);
    Process process=new Process();
    process.setProcessId(Integer.parseInt(pId));
    processLog.setProcess(process);
    Long logId=processLogDAO.insert(processLog);
    processLogInfo.setLogId(logId);
    return processLogInfo;
  }
 catch (  Exception e) {
    LOGGER.error("Error occurred",e);
    throw new MetadataException(e);
  }
}

@ Override public ProcessLogInfo execute ( String [ ] params ) { try { ProcessLogInfo processLogInfo = new ProcessLogInfo ( ) ; CommandLine commandLine = getCommandLine ( params , PARAMS_STRUCTURE ) ; String pId = commandLine . getOptionValue ( "process-id" ) ; LOGGER . debug ( "processId is " + pId ) ; String logCat = commandLine . getOptionValue ( "log-category" ) ; LOGGER . debug ( "log category is " + logCat ) ; String message = commandLine . getOptionValue ( "message" ) ; LOGGER . debug ( "message is " + message ) ; String mId = commandLine . getOptionValue ( "message-id" ) ; LOGGER . debug ( "message id is" + mId ) ; String iRef = commandLine . getOptionValue ( "instance-ref" ) ; LOGGER . debug ( "instance ref is " + iRef ) ; String addTs = commandLine . getOptionValue ( "add-ts" ) ; LOGGER . debug ( "add ts " + addTs ) ; processLogInfo . setProcessId ( Integer . parseInt ( pId ) ) ; processLogInfo . setLogCategory ( logCat ) ; processLogInfo . setMessage ( message ) ; processLogInfo . setMessageId ( mId ) ; processLogInfo . setInstanceRef ( Long . parseLong ( iRef ) ) ; processLogInfo . setAddTs ( Timestamp . valueOf ( addTs ) ) ; com . wipro . ats . bdre . md . dao . jpa . ProcessLog processLog = new com . wipro . ats . bdre . md . dao . jpa . ProcessLog ( ) ; processLog . setAddTs ( Timestamp . valueOf ( addTs ) ) ; processLog . setInstanceRef ( Long . parseLong ( iRef ) ) ; processLog . setLogCategory ( logCat ) ; processLog . setMessage ( message ) ; processLog . setMessageId ( mId ) ; Process process = new Process ( ) ; process . setProcessId ( Integer . parseInt ( pId ) ) ; processLog . setProcess ( process ) ; Long logId = processLogDAO . insert ( processLog ) ; processLogInfo . setLogId ( logId ) ; return processLogInfo ; } catch ( Exception e ) { LOGGER . error ( "Error occurred" , e ) ; throw new MetadataException ( e ) ; } }
this method runs addprocesslogproc proc in mysql .
