Skip to content

Commit 7315e8b

Browse files
committed
新增定时任务
1 parent 20bebea commit 7315e8b

File tree

27 files changed

+2473
-77
lines changed

27 files changed

+2473
-77
lines changed
Lines changed: 127 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,186 @@
1+
/*
2+
* Copyright 2015-2016 http://hsweb.me
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package org.hsweb.web.bean.po.quartz;
218

319
import org.hsweb.web.bean.po.GenericPo;
420

21+
/**
22+
* 定时调度任务
23+
* Created by hsweb-generator Sep 27, 2016 1:55:18 AM
24+
*/
525
public class QuartzJob extends GenericPo<String> {
26+
//任务名称
627
private String name;
7-
28+
//备注
829
private String remark;
9-
30+
//cron表达式
1031
private String cron;
11-
12-
private String script;
13-
14-
private String language = "groovy";
15-
16-
private boolean running;
17-
32+
//执行脚本
33+
private String script = "groovy";
34+
//脚本语言
35+
private String language;
36+
//是否启用
1837
private boolean enabled;
19-
20-
private boolean ready;
21-
22-
private long lastRunningStartTime;
23-
24-
private long lastRunningEndTime;
25-
26-
private String lastResult;
27-
38+
//启动参数
39+
private String parameters;
40+
//任务类型
41+
private byte type;
42+
43+
/**
44+
* 获取 任务名称
45+
*
46+
* @return String 任务名称
47+
*/
2848
public String getName() {
29-
return name;
49+
return this.name;
3050
}
3151

52+
/**
53+
* 设置 任务名称
54+
*
55+
* @param name 任务名称
56+
*/
3257
public void setName(String name) {
3358
this.name = name;
3459
}
3560

61+
/**
62+
* 获取 备注
63+
*
64+
* @return String 备注
65+
*/
3666
public String getRemark() {
37-
return remark;
67+
return this.remark;
3868
}
3969

70+
/**
71+
* 设置 备注
72+
*
73+
* @param remark 备注
74+
*/
4075
public void setRemark(String remark) {
4176
this.remark = remark;
4277
}
4378

79+
/**
80+
* 获取 cron表达式
81+
*
82+
* @return String cron表达式
83+
*/
4484
public String getCron() {
45-
return cron;
85+
return this.cron;
4686
}
4787

88+
/**
89+
* 设置 cron表达式
90+
*
91+
* @param cron cron表达式
92+
*/
4893
public void setCron(String cron) {
4994
this.cron = cron;
5095
}
5196

97+
/**
98+
* 获取 执行脚本
99+
*
100+
* @return String 执行脚本
101+
*/
52102
public String getScript() {
53-
return script;
103+
return this.script;
54104
}
55105

106+
/**
107+
* 设置 执行脚本
108+
*
109+
* @param script 执行脚本
110+
*/
56111
public void setScript(String script) {
57112
this.script = script;
58113
}
59114

115+
/**
116+
* 获取 脚本语言
117+
*
118+
* @return String 脚本语言
119+
*/
60120
public String getLanguage() {
61-
return language;
121+
return this.language;
62122
}
63123

124+
/**
125+
* 设置 脚本语言
126+
*
127+
* @param language 脚本语言
128+
*/
64129
public void setLanguage(String language) {
65130
this.language = language;
66131
}
67132

68-
public boolean isRunning() {
69-
return running;
70-
}
71-
72-
public void setRunning(boolean running) {
73-
this.running = running;
74-
}
75-
133+
/**
134+
* 获取 是否启用
135+
*
136+
* @return long 是否启用
137+
*/
76138
public boolean isEnabled() {
77139
return enabled;
78140
}
79141

142+
/**
143+
* 设置 是否启用
144+
*
145+
* @param enabled 是否启用
146+
*/
80147
public void setEnabled(boolean enabled) {
81148
this.enabled = enabled;
82149
}
83150

84-
public long getLastRunningStartTime() {
85-
return lastRunningStartTime;
86-
}
87-
88-
public void setLastRunningStartTime(long lastRunningStartTime) {
89-
this.lastRunningStartTime = lastRunningStartTime;
90-
}
91-
92-
public long getLastRunningEndTime() {
93-
return lastRunningEndTime;
151+
/**
152+
* 获取 启动参数
153+
*
154+
* @return String 启动参数
155+
*/
156+
public String getParameters() {
157+
return this.parameters;
94158
}
95159

96-
public void setLastRunningEndTime(long lastRunningEndTime) {
97-
this.lastRunningEndTime = lastRunningEndTime;
160+
/**
161+
* 设置 启动参数
162+
*
163+
* @param parameters 启动参数
164+
*/
165+
public void setParameters(String parameters) {
166+
this.parameters = parameters;
98167
}
99168

100-
public String getLastResult() {
101-
return lastResult;
169+
/**
170+
* 获取 任务类型
171+
*
172+
* @return long 任务类型
173+
*/
174+
public byte getType() {
175+
return this.type;
102176
}
103177

104-
public void setLastResult(String lastResult) {
105-
this.lastResult = lastResult;
178+
/**
179+
* 设置 任务类型
180+
*
181+
* @param type 任务类型
182+
*/
183+
public void setType(byte type) {
184+
this.type = type;
106185
}
107-
}
186+
}

0 commit comments

Comments
 (0)