01: /*
02: * Copyright 2004 Clinton Begin
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 text;
23: private boolean isWhiteSpace;
24: private boolean postParseRequired;
25:
26: private ParameterMapping[] parameterMappings;
27:
28: public String getText() {
29: return text;
30: }
31:
32: public void setText(String 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(
46: ParameterMapping[] parameterMappings) {
47: this .parameterMappings = parameterMappings;
48: }
49:
50: public boolean isPostParseRequired() {
51: return postParseRequired;
52: }
53:
54: public void setPostParseRequired(boolean postParseRequired) {
55: this.postParseRequired = postParseRequired;
56: }
57:
58: }
|