View Javadoc
1   /*
2    * Copyright 2002-2007 the original author or authors.
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  
17  package org.springframework.jdbc.core.metadata;
18  
19  /**
20   * Holder of metadata for a specific parameter that is used for call processing.
21   *
22   * @author Thomas Risberg
23   * @since 2.5
24   */
25  public class CallParameterMetaData {
26  	private String parameterName;
27  	private int parameterType;
28  	private int sqlType;
29  	private String typeName;
30  	private boolean nullable;
31  
32  	/**
33  	 * Constructor taking all the properties
34  	 */
35  	public CallParameterMetaData(String columnName, int columnType, int sqlType, String typeName, boolean nullable) {
36  		this.parameterName = columnName;
37  		this.parameterType = columnType;
38  		this.sqlType = sqlType;
39  		this.typeName = typeName;
40  		this.nullable = nullable;
41  	}
42  
43  
44  	/**
45  	 * Get the parameter name.
46  	 */
47  	public String getParameterName() {
48  		return parameterName;
49  	}
50  
51  	/**
52  	 * Get the parameter type.
53  	 */
54  	public int getParameterType() {
55  		return parameterType;
56  	}
57  
58  	/**
59  	 * Get the parameter SQL type.
60  	 */
61  	public int getSqlType() {
62  		return sqlType;
63  	}
64  
65  	/**
66  	 * Get the parameter type name.
67  	 */
68  	public String getTypeName() {
69  		return typeName;
70  	}
71  
72  	/**
73  	 * Get whether the parameter is nullable.
74  	 */
75  	public boolean isNullable() {
76  		return nullable;
77  	}
78  }