25 lines
825 B
Java
25 lines
825 B
Java
package com.tenwa.message;
|
|
|
|
import org.quartz.JobKey;
|
|
import org.quartz.impl.StdSchedulerFactory;
|
|
|
|
import jbo.sys.MSG_CONFIG;
|
|
|
|
import com.amarsoft.are.jbo.BizObject;
|
|
import com.amarsoft.are.jbo.JBOFactory;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
|
|
|
|
public class MsgTempletListHandler extends CommonHandler {
|
|
|
|
@Override
|
|
protected void beforeDelete(JBOTransaction tx, BizObject bo)
|
|
throws Exception {
|
|
String id = bo.getAttribute("id").getString();
|
|
BizObject boMC = JBOFactory.getBizObjectManager(MSG_CONFIG.CLASS_NAME,tx).createQuery("id=:id").setParameter("id",id).getSingleResult(false);
|
|
if(boMC != null){
|
|
StdSchedulerFactory.getDefaultScheduler().deleteJob(JobKey.jobKey(boMC.getAttribute("JOBNAME").getString(), QuartzJobMsg.MSG_GROUP_NAME));
|
|
}
|
|
}
|
|
}
|