All pastes #229282 Raw Edit

Someone

public text v1 · immutable
#229282 ·published 2006-10-30 16:02 UTC
rendered paste body
int alertId = AlertLoggingService.getInstance().insertAlertLog(alVO);       //get the ALERT ID OF THIS ISSUE

*******************************************************


  public int insertAlertLog(Object parameterObject) throws DaoException {
    return alDao.insertAlertLog(parameterObject);
  }

****************************************************


  public int insertAlertLog(Object parameterObject) throws DaoException {
    int c = 0;
    c = super.update("AlertLoggingSQL.insertAlertLog", parameterObject);
    System.out.println("C DATA: " + c);
    return c;
  }


*******************************************

  <typeAlias alias="alertLoggingVO" type="net.forcedata.asset.ibatis.domain.AlertLoggingVO" />  




  <insert id="insertAlertLog" parameterClass="alertLoggingVO">
    insert into alert_logging (id, timestamp, type, tag_id, mnemonic, location_str, category_str, upper_limit_alert, upper_limit, lower_limit, lower_limit_alert, measured_value)
    values(#id#, #timestamp#, #tagId#, #alertType#, #mnemonic#, #locationStr#, #categoryStr#, #upperLimitAlert#, #upperLimit#, #lowerLimit#, #lowerLimitAlert#, #measuredValue#)
    
    <selectKey keyProperty="id" resultClass="int">
      select LAST_INSERT_ID() as id
    </selectKey>
  </insert>