ACTION CLASS:
int alertId = AlertLoggingService.getInstance().insertAlertLog(alVO); //get the ALERT ID OF THIS ISSUE
System.out.println("ALERT ID: " + alertId);
********************************************************
SERVICE CLASS:
public int insertAlertLog(Object parameterObject) throws DaoException {
return alDao.insertAlertLog(parameterObject);
}
*************************************************************************
DAO CLASS:
public int insertAlertLog(Object parameterObject) throws DaoException {
return super.insert("AlertLoggingSQL.insertAlertLog", parameterObject);
}
*******************************************************************
SQL MAP:
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#)
select LAST_INSERT_ID() as id