1 /*
2  * Copyright 2015-2018 HuntLabs.cn
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 module hunt.sql.dialect.mysql.ast.statement.MySqlEventSchedule;
17 
18 import hunt.sql.ast.SQLExpr;
19 import hunt.sql.dialect.mysql.ast.MySqlObject;
20 import hunt.sql.dialect.mysql.ast.MySqlObjectImpl;
21 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
22 
23 public class MySqlEventSchedule : MySqlObjectImpl {
24     alias accept0 = MySqlObjectImpl.accept0;
25     
26     private SQLExpr at;
27     private SQLExpr every;
28     private SQLExpr starts;
29     private SQLExpr ends;
30 
31     override
32     public void accept0(MySqlASTVisitor visitor) {
33         if (visitor.visit(this)) {
34             acceptChild(visitor, at);
35             acceptChild(visitor, every);
36             acceptChild(visitor, starts);
37             acceptChild(visitor, ends);
38         }
39         visitor.endVisit(this);
40     }
41 
42     public SQLExpr getAt() {
43         return at;
44     }
45 
46     public void setAt(SQLExpr x) {
47         if (x !is null) {
48             x.setParent(this);
49         }
50         this.at = x;
51     }
52 
53     public SQLExpr getEvery() {
54         return every;
55     }
56 
57     public void setEvery(SQLExpr x) {
58         if (x !is null) {
59             x.setParent(this);
60         }
61         this.every = x;
62     }
63 
64     public SQLExpr getStarts() {
65         return starts;
66     }
67 
68     public void setStarts(SQLExpr x) {
69         if (x !is null) {
70             x.setParent(this);
71         }
72         this.starts = x;
73     }
74 
75     public SQLExpr getEnds() {
76         return ends;
77     }
78 
79     public void setEnds(SQLExpr x) {
80         if (x !is null) {
81             x.setParent(this);
82         }
83         this.ends = x;
84     }
85 }