wangting
2025-01-16 18c43123b51a1688ab4ae01fe3d171c7d92e619b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.vci.dbsync.entity;
/**
 * Copyright 2018-2118 the original author or authors.
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
 
import org.dom4j.Element;
 
import com.vci.dbsync.utils.Tool;
 
/**
 * @author liuyazhuang
 * @date 2018/9/11 10:13
 * @description 任务信息
 * @version 1.0.0
 */
public class JobInfo implements Serializable {
    private static final long serialVersionUID = -1907092113028096170L;
 
    //任务名称
    private String name;
    //任务表达式
    private String cron;
//    //源数据源sql
//    private String srcSql;
//    //目标数据表
//    private String destTable;
//    //目标表数据字段
//    private String destTableFields;
//    //目标表主键
//    private String destTableKey;
//    //目标表可更新的字段
//    private String destTableUpdate;
    
    private List<JobItem> lstJobItem = new ArrayList<JobItem>();
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getCron() {
        return cron;
    }
 
    public void setCron(String cron) {
        this.cron = cron;
    }
    
    public JobItem[] Items() {
        return lstJobItem.toArray(new JobItem[0]);
    }
 
    public void initJobItems(Element ejob) {
        try {
            for (@SuppressWarnings("rawtypes")
            Iterator it = ejob.elementIterator("item"); it.hasNext();) {
                lstJobItem.add((JobItem) Tool.elementInObject((Element) it.next(), new JobItem()));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
//    public String getSrcSql() {
//        return srcSql;
//    }
//
//    public void setSrcSql(String srcSql) {
//        this.srcSql = srcSql;
//    }
//
//    public String getDestTable() {
//        return destTable;
//    }
//
//    public void setDestTable(String destTable) {
//        this.destTable = destTable;
//    }
//
//    public String getDestTableFields() {
//        return destTableFields;
//    }
//
//    public void setDestTableFields(String destTableFields) {
//        this.destTableFields = destTableFields;
//    }
//
//    public String getDestTableKey() {
//        return destTableKey;
//    }
//
//    public void setDestTableKey(String destTableKey) {
//        this.destTableKey = destTableKey;
//    }
//
//    public String getDestTableUpdate() {
//        return destTableUpdate;
//    }
//
//    public void setDestTableUpdate(String destTableUpdate) {
//        this.destTableUpdate = destTableUpdate;
//    }
}