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.ast.statement.SQLErrorLoggingClause; 17 18 import hunt.sql.ast.SQLExpr; 19 import hunt.sql.ast.SQLName; 20 import hunt.sql.ast.SQLObjectImpl; 21 import hunt.sql.visitor.SQLASTVisitor; 22 23 public class SQLErrorLoggingClause : SQLObjectImpl { 24 25 private SQLName into; 26 private SQLExpr simpleExpression; 27 private SQLExpr limit; 28 29 override 30 public void accept0(SQLASTVisitor visitor) { 31 if (visitor.visit(this)) { 32 acceptChild(visitor, into); 33 acceptChild(visitor, simpleExpression); 34 acceptChild(visitor, limit); 35 } 36 visitor.endVisit(this); 37 } 38 39 public SQLName getInto() { 40 return into; 41 } 42 43 public void setInto(SQLName into) { 44 this.into = into; 45 } 46 47 public SQLExpr getSimpleExpression() { 48 return simpleExpression; 49 } 50 51 public void setSimpleExpression(SQLExpr simpleExpression) { 52 this.simpleExpression = simpleExpression; 53 } 54 55 public SQLExpr getLimit() { 56 return limit; 57 } 58 59 public void setLimit(SQLExpr limit) { 60 this.limit = limit; 61 } 62 63 override public SQLErrorLoggingClause clone() { 64 SQLErrorLoggingClause x = new SQLErrorLoggingClause(); 65 if (into !is null) { 66 x.setInto(into.clone()); 67 } 68 if (simpleExpression !is null) { 69 x.setSimpleExpression(simpleExpression.clone()); 70 } 71 if (limit !is null) { 72 x.setLimit(limit.clone()); 73 } 74 return x; 75 } 76 77 }