我有一个使用Spring Framework 3.2.14和Java 8开发的应用程序,其中使用TimerTask计划任务。这工作得很好。当我将应用程序迁移到spring框架4.3.0时,作业没有被安排。我得到一个空指针异常。经过进一步调查,我发现TimerTask的lock属性没有设置为true。该如何解决?
这是bean定义
<bean id="JobSchedular" class="com.irissoftware.energyengine.scheduler.JobSchedular">
<constructor-arg ref="MarketingService" />
<constructor-arg ref="JobDelegate" />
<constructor-arg ref="jobEventNotificationDispatcher" />
<constructor-arg ref="unsubscribeDelegate" />
<property name="transactionManager" ref="transactionManager" />
</bean>
<bean scope="prototype" id="JobService" class="com.irissoftware.energyengine.service.schedular.SchedularService">
<property name="jobRepository" ref="JobRepository" />
<property name="productRepository" ref="IProductRepository" />
</bean>
<bean scope="prototype" id="ReceiveQuoteButNoOrderJob" class="com.irissoftware.energyengine.scheduler.jobs.ReceiveQuoteButNoOrderJob">
<property name="name" value="RECEIVED_QUOTE_BUT_NO_ORDER" />
<property name="delegate" ref="JobDelegate" />
<property name="unsubscribeDelegate" ref="unsubscribeDelegate" />
<property name="schedular" ref="JobSchedular" />
<property name="mailDispatcher" ref="jobEventNotificationDispatcher"/>
</bean>
这里是安排时间的方法 private void scheduleJob(JobSchedule schedule){ 职位= getJob(schedule);
try {
scheduleJobByExecutionType(job);
logger.debug(">>>>>>>>>>>>>>>>>>> Schedule Job---"+schedule.getClientId()+" --- "+schedule.getJobType());
// Save job to database
logger.debug(job.getSchedule());
try {
jobDelegate.saveJobSchedule(job.getSchedule());
logger.debug(">>>>>>>>>>>>>>>>>>> Job saved to database.");
} catch (ServiceException se) {
logger.error(se.getMessage(), se);
}
} catch (Exception e) {
logger.error("Error !!!! Occured in Job scheduling >>>>>>>>", e);
}
}
这是JobSchedule
public class JobSchedule extends BaseBusinessObject implements Serializable {
/**
*
*/
private static final long serialVersionUID = -7603795998411779980L;
// Properties
private Long id;
private Integer jobType;
private Date scheduleDate;
private Date reScheduleDate;
private Long timeToRun;
private String email;
private Long customerId;
private Long orderId;
private String mobileMail;
private Long clientId;
private String mailType;
private Long prospectDetailId;
private Long referralDetailId;
private ClientMarketingRule clientMarketRule;
//Setter and getters
public Long getProspectDetailId() {
return prospectDetailId;
}
public void setProspectDetailId(Long prospectDetailId) {
this.prospectDetailId = prospectDetailId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getJobType() {
return jobType;
}
public void setJobType(Integer jobType) {
this.jobType = jobType;
}
public Long getTimeToRun() {
return timeToRun;
}
public void setTimeToRun(Long timeToRun) {
this.timeToRun = timeToRun;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getClientId() {
return clientId;
}
public void setClientId(Long clientId) {
this.clientId = clientId;
}
public Date getScheduleDate() {
return scheduleDate;
}
public void setScheduleDate(Date scheduleDate) {
this.scheduleDate = scheduleDate;
}
public ClientMarketingRule getClientMarketRule() {
return clientMarketRule;
}
public void setClientMarketRule(ClientMarketingRule clientMarketRule) {
this.clientMarketRule = clientMarketRule;
}
@Override
public String toString() {
StringBuffer sbf = new StringBuffer();
sbf.append("ID >"+id);
sbf.append(", jobType>"+jobType);
sbf.append(", mailType >"+mailType);
return sbf.toString();
}
/**
*
*/
public JobSchedule() {
// TODO Auto-generated constructor stub
}
public String getMailType() {
return mailType;
}
public void setMailType(String mailType) {
this.mailType = mailType;
}
public Long getReferralDetailId() {
return referralDetailId;
}
public void setReferralDetailId(Long referralDetailId) {
this.referralDetailId = referralDetailId;
}
public Date getReScheduleDate() {
return reScheduleDate;
}
public void setReScheduleDate(Date reScheduleDate) {
this.reScheduleDate = reScheduleDate;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getMobileMail() {
return mobileMail;
}
public void setMobileMail(String mobileMail) {
this.mobileMail = mobileMail;
}
}
这是getJob方法
private Job getJob(JobSchedule schedule) {
Job job = null;
int jobType = schedule.getJobType();
switch (jobType) {
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_1:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_1");
break;
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_2:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_2");
break;
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_3:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_3");
break;
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_4:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_4");
break;
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_5:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_5");
break;
case Job.JOB_TYPE_REGISTERED_BUT_NO_ORDER_6:
job = (NoOrderAfterRegistrationJob)context.getBean("NoOrderAfterRegistrationJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("REG_BUT_NO_ORDER_6");
break;
case Job.JOB_TYPE_RETENTION_RULE_180:
job = (RetentionJob)context.getBean("RetentionJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("RETENTION_RULE_180");
break;
case Job.JOB_TYPE_RETENTION_RULE_190:
job = (RetentionJob)context.getBean("RetentionJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("RETENTION_RULE_190");
break;
case Job.JOB_TYPE_RETENTION_RULE_200:
job = (RetentionJob)context.getBean("RetentionJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("RETENTION_RULE_200");
break;
case Job.JOB_TYPE_RETENTION_RULE_210:
job = (RetentionJob)context.getBean("RetentionJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("RETENTION_RULE_210");
break;
case Job.JOB_TYPE_RETENTION_RULE_240:
job = (RetentionJob)context.getBean("RetentionJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("RETENTION_RULE_240");
break;
case Job.JOB_TYPE_CALCELED_BUT_NO_ORDER:
job = (CanceledButNoOrderJob)context.getBean("CanceledButNoOrderJob");
//job = new CanceledButNoOrderJob();
job.setName("CANCEL_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_NEWS_SIGNUP_BUT_NOT_REGISTER:
job = (NotRegisterAfterNewsletterSignupJob)context.getBean("NotRegisterAfterNewsletterSignupJob");
//job = new NotRegisterAfterNewsletterSignupJob();
job.setName("NOT_REGISTER_AFTER_NEWSELTTER_SIGNUP");
break;
case Job.JOB_TYPE_NO_ORDER_WITH_IN_TIME_1:
job = (NoOrderWithInTimeJob)context.getBean("NoOrderWithInTimeJob");
//job = new NoOrderWithInTimeJob();
job.setName("NO_ORDER_WITHIN_TIME");
break;
case Job.JOB_TYPE_NO_ORDER_WITH_IN_TIME_2:
job = (NoOrderWithInTimeJob)context.getBean("NoOrderWithInTimeJob");
//job = new NoOrderWithInTimeJob();
job.setName("NO_ORDER_WITHIN_TIME");
break;
case Job.JOB_TYPE_NO_ORDER_WITH_IN_TIME_3:
job = (NoOrderWithInTimeJob)context.getBean("NoOrderWithInTimeJob");
//job = new NoOrderWithInTimeJob();
job.setName("NO_ORDER_WITHIN_TIME");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_1:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_2:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_3:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_4:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_1:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_2:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_3:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_4:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_1:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_2:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_3:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_4:
job = (ReceiveQuoteButNoOrderJob)context.getBean("ReceiveQuoteButNoOrderJob");
//job = new ReceiveQuoteButNoOrderJob();
//job.setName("RECEIVED_QUOTE_BUT_NO_ORDER");
break;
case Job.JOB_TYPE_REFERRRAL_NOT_REGISTERED_1:
job = (ReferralNotRegisteredJob)context.getBean("ReferralNotRegisteredJob");
//job = new ReferralNotRegisteredJob();
job.setName("REFERRALS_NOT REGISTER");
break;
case Job.JOB_TYPE_REFERRRAL_NOT_REGISTERED_2:
job = (ReferralNotRegisteredJob)context.getBean("ReferralNotRegisteredJob");
//job = new ReferralNotRegisteredJob();
job.setName("REFERRALS_NOT REGISTER");
break;
case Job.JOB_TYPE_REFERRRAL_NOT_REGISTERED_3:
job = (ReferralNotRegisteredJob)context.getBean("ReferralNotRegisteredJob");
//job = new ReferralNotRegisteredJob();
job.setName("REFERRALS_NOT REGISTER");
break;
case Job.JOB_TYPE_REFERRRAL_NOT_REGISTERED_4:
job = (ReferralNotRegisteredJob)context.getBean("ReferralNotRegisteredJob");
//job = new ReferralNotRegisteredJob();
job.setName("REFERRALS_NOT REGISTER");
break;
case Job.JOB_TYPE_THANK_YOU_MAIL_ON_SEASON_START:
job = (ThankYouOnSeasonStartAndEndJob)context.getBean("ThankYouOnSeasonStartAndEndJob");
//job = new ThankYouOnSeasonStartAndEndJob();
job.setName("THANK_YOU_MAIL_SEASON_STRAT");
break;
case Job.JOB_TYPE_THANK_YOU_MAIL_ON_SEASON_END:
job = (Job) context.getBean("ThankYouOnSeasonStartAndEndJob");
//job = new ThankYouOnSeasonStartAndEndJob();
job.setName("THANK_YOU_MAIL_SEASON_END");
break;
case Job.JOB_TYPE_CLIENT_ANNIVERSARY_NOTIFICATION:
job = (ClientAnniversaryNotificationJob)context.getBean("ClientAnniversaryNotificationJob");
//job = new ClientAnniversaryNotificationJob();
job.setName("CLIENT_ANNIVERSARY_NOTIFICATION");
break;
case Job.JOB_TYPE_REGISTRATION_PROMO_EXPIRES:
job = (RegistrationPromoExpiresJob)context.getBean("RegistrationPromoExpiresJob");
//job = new ClientAnniversaryNotificationJob();
job.setName("REGISTRATION_PROMO_EXPIRES");
break;
case Job.JOB_TYPE_CREDIT_REMINDER:
job = (CreditReminderJob)context.getBean("CreditReminderJob");
//job = new ClientAnniversaryNotificationJob();
job.setName("CREDIT_REMINDER");
break;
case Job.JOB_TYPE_INCOMPLETE_ORDER:
job = (IncompleteOrderJob)context.getBean("IncompleteOrderJob");
//job = new IncompleteOrderJob();
job.setName("INCOMPLETE_ORDER");
break;
case Job.JOB_TYPE_SCHEDULE_ORDER:
job = (ScheduleDeliveryEmailJob)context.getBean("ScheduleDeliveryEmailJob");
job.setName("SCHEDULE_DELIVERY_EMAIL");
break;
case Job.JOB_TYPE_ANNIVERSARY_1:
job = (AnniversaryJob)context.getBean("AnniversaryJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("ANNIVERSARY_RULE_1");
break;
case Job.JOB_TYPE_ANNIVERSARY_5:
job = (AnniversaryJob)context.getBean("AnniversaryJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("ANNIVERSARY_RULE_5");
break;
case Job.JOB_TYPE_ANNIVERSARY_10:
job = (AnniversaryJob)context.getBean("AnniversaryJob");
//job = new NoOrderAfterRegistrationJob();
job.setName("ANNIVERSARY_RULE_10");
break;
case Job.JOB_TYPE_INSPECTION_REMINDER_1:
job = (InspectionReminderJob)context.getBean("InspectionReminderJob");
//job = new IncompleteOrderJob();
job.setName("INSPECTION_REMINDER_ORDER");
break;
case Job.JOB_TYPE_INSPECTION_REMINDER_2:
job = (InspectionReminderJob)context.getBean("InspectionReminderJob");
//job = new IncompleteOrderJob();
job.setName("INSPECTION_REMINDER_ORDER");
break;
case Job.JOB_TYPE_INSPECTION_REMINDER_3:
job = (InspectionReminderJob)context.getBean("InspectionReminderJob");
//job = new IncompleteOrderJob();
job.setName("INSPECTION_REMINDER_ORDER");
break;
case Job.JOB_TYPE_ERP_SCHEDULE_ORDER:
job = (ScheduleDeliveryErpJob)context.getBean("ScheduleDeliveryErpJob");
//job = new IncompleteOrderJob();
job.setName("SCHEDULE_DELIVERY_ERP_JOB");
break;
case Job.JOB_TYPE_ERP_POST_ORDER:
job = (PostDeliveryErpJob)context.getBean("PostDeliveryErpJob");
//job = new IncompleteOrderJob();
job.setName("POST_DELIVERY_ERP_JOB");
break;
}
job.setSchedule(schedule);
job.setSchedular(this);
return job;
}
这是工作对象
package com.irissoftware.energyengine.scheduler.jobs;
import java.util.TimerTask;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.transaction.PlatformTransactionManager;
public abstract class Job extends TimerTask {
public static final int EXECUTION_TYPE_ONE_TIME = 0;
public static final int EXECUTION_TYPE_ON_INTERVAL = 1;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_1 = 101;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_2 = 102;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_3 = 103;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_4 = 104;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_5 = 105;
public static final int JOB_TYPE_REGISTERED_BUT_NO_ORDER_6 = 106;
public static final int JOB_TYPE_CALCELED_BUT_NO_ORDER = 2;
public static final int JOB_TYPE_NEWS_SIGNUP_BUT_NOT_REGISTER = 3;
public static final int JOB_TYPE_NO_ORDER_WITH_IN_TIME_1 = 401;
public static final int JOB_TYPE_NO_ORDER_WITH_IN_TIME_2 = 402;
public static final int JOB_TYPE_NO_ORDER_WITH_IN_TIME_3 = 403;
public static final int JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_1 = 501;
public static final int JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_2 = 502;
public static final int JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_3 = 503;
public static final int JOB_TYPE_RECIEVE_QUOTE_BUT_NO_ORDER_4 = 504;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_1 = 511;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_2 = 512;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_3 = 513;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_NO_ORDER_4 = 514;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_1 = 521;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_2 = 522;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_3 = 523;
public static final int JOB_TYPE_RECIEVE_QUOTE_REG_ORDER_4 = 524;
public static final int JOB_TYPE_REFERRRAL_NOT_REGISTERED_1 = 601;
public static final int JOB_TYPE_REFERRRAL_NOT_REGISTERED_2 = 602;
public static final int JOB_TYPE_REFERRRAL_NOT_REGISTERED_3 = 603;
public static final int JOB_TYPE_REFERRRAL_NOT_REGISTERED_4 = 604;
public static final int JOB_TYPE_RETENTION_RULE_180 = 201;
public static final int JOB_TYPE_RETENTION_RULE_190 = 202;
public static final int JOB_TYPE_RETENTION_RULE_200 = 203;
public static final int JOB_TYPE_RETENTION_RULE_210 = 204;
public static final int JOB_TYPE_RETENTION_RULE_240 = 205;
public static final int JOB_TYPE_THANK_YOU_MAIL_ON_SEASON_START = 7;
public static final int JOB_TYPE_THANK_YOU_MAIL_ON_SEASON_END = 8;
public static final int JOB_TYPE_CLIENT_ANNIVERSARY_NOTIFICATION = 9;
public static final int JOB_TYPE_REGISTRATION_PROMO_EXPIRES = 10;
public static final int JOB_TYPE_CREDIT_REMINDER = 11;
public static final int JOB_TYPE_INCOMPLETE_ORDER = 12;
public static final int JOB_TYPE_ANNIVERSARY_1 = 301;
public static final int JOB_TYPE_ANNIVERSARY_5 = 302;
public static final int JOB_TYPE_ANNIVERSARY_10 = 303;
public static final int JOB_TYPE_SCHEDULE_ORDER = 13;
public static final int JOB_TYPE_INSPECTION_REMINDER_1 = 141;
public static final int JOB_TYPE_INSPECTION_REMINDER_2 = 142;
public static final int JOB_TYPE_INSPECTION_REMINDER_3 = 143;
public static final int JOB_TYPE_ERP_SCHEDULE_ORDER = 91;
public static final int JOB_TYPE_ERP_POST_ORDER = 92;
public static final int SCHEDULE_ERP_JOB_TIMEPERIOD = 60; // in minutes
public static final int POST_ERP_JOB_TIMEPERIOD = 60; // in minutes
// Properties
private BusinessObject bObject;
protected JobSchedule schedule;
private int executionType;
private String name;
protected JobSchedular schedular;
protected SchedularDelegate delegate;
protected UnsubscribeDelegate unsubscribeDelegate;
protected ManageReceivedOrderDelegate manageReceivedOrderDelegate;
protected ManageOrderDeliveryConfirmationDelegate manageOrderDeliveryConfirmationDelegate;
protected TankInspectionRule tankInspectionRule;
protected ServiceLocator serviceLocator;
protected INotificationDispatcher mailDispatcher;
protected ApplicationContext context;
protected PlatformTransactionManager transactionManager;
public ApplicationContext getContext() {
return context;
}
public void setContext(ApplicationContext context) {
this.context = context;
}
public PlatformTransactionManager getTransactionManager() {
return transactionManager;
}
public void setTransactionManager(PlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
}
public SchedularDelegate getDelegate() {
return delegate;
}
public void setDelegate(SchedularDelegate delegate) {
this.delegate = delegate;
}
public INotificationDispatcher getMailDispatcher() {
return mailDispatcher;
}
public void setMailDispatcher(INotificationDispatcher mailDispatcher) {
this.mailDispatcher = mailDispatcher;
}
// Setter and getters
public int getExecutionType() {
return executionType;
}
public void setExecutionType(int executionType) {
this.executionType = executionType;
}
public JobSchedule getSchedule() {
return schedule;
}
public void setSchedule(JobSchedule schedule) {
this.schedule = schedule;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public JobSchedular getSchedular() {
return schedular;
}
public void setSchedular(JobSchedular schedular) {
this.schedular = schedular;
}
public UnsubscribeDelegate getUnsubscribeDelegate() {
return unsubscribeDelegate;
}
public void setUnsubscribeDelegate(UnsubscribeDelegate unsubscribeDelegate) {
this.unsubscribeDelegate = unsubscribeDelegate;
}
/**
* @param object
*/
public Job(BusinessObject object) {
super();
bObject = object;
}
/**
*
*/
public Job() {
super();
}
public ManageReceivedOrderDelegate getManageReceivedOrderDelegate() {
return manageReceivedOrderDelegate;
}
public void setManageReceivedOrderDelegate(
ManageReceivedOrderDelegate manageReceivedOrderDelegate) {
this.manageReceivedOrderDelegate = manageReceivedOrderDelegate;
}
public TankInspectionRule getTankInspectionRule() {
return tankInspectionRule;
}
public void setTankInspectionRule(TankInspectionRule tankInspectionRule) {
this.tankInspectionRule = tankInspectionRule;
}
public ManageOrderDeliveryConfirmationDelegate getManageOrderDeliveryConfirmationDelegate() {
return manageOrderDeliveryConfirmationDelegate;
}
public void setManageOrderDeliveryConfirmationDelegate(
ManageOrderDeliveryConfirmationDelegate manageOrderDeliveryConfirmationDelegate) {
this.manageOrderDeliveryConfirmationDelegate = manageOrderDeliveryConfirmationDelegate;
}
public ServiceLocator getServiceLocator() {
return serviceLocator;
}
public void setServiceLocator(ServiceLocator serviceLocator) {
this.serviceLocator = serviceLocator;
}
}