KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibatis > sqlmap > engine > mapping > sql > SqlText


1 /*
2  * Copyright 2004 Clinton Begin
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 package com.ibatis.sqlmap.engine.mapping.sql;
17
18 import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMapping;
19
20 public class SqlText implements SqlChild {
21
22   private String JavaDoc text;
23   private boolean isWhiteSpace;
24   private boolean postParseRequired;
25
26   private ParameterMapping[] parameterMappings;
27
28   public String JavaDoc getText() {
29     return text;
30   }
31
32   public void setText(String JavaDoc text) {
33     this.text = text.replace('\r', ' ').replace('\n', ' ');
34     this.isWhiteSpace = text.trim().length() == 0;
35   }
36
37   public boolean isWhiteSpace() {
38     return isWhiteSpace;
39   }
40
41   public ParameterMapping[] getParameterMappings() {
42     return parameterMappings;
43   }
44
45   public void setParameterMappings(ParameterMapping[] parameterMappings) {
46     this.parameterMappings = parameterMappings;
47   }
48
49   public boolean isPostParseRequired() {
50     return postParseRequired;
51   }
52
53   public void setPostParseRequired(boolean postParseRequired) {
54     this.postParseRequired = postParseRequired;
55   }
56   
57 }
58
59
Popular Tags