001/* 002 * Copyright 2002-2018 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.jdbc.core.metadata; 018 019/** 020 * Holder of meta-data for a specific parameter that is used for table processing. 021 * 022 * @author Thomas Risberg 023 * @since 2.5 024 * @see GenericTableMetaDataProvider 025 */ 026public class TableParameterMetaData { 027 028 private final String parameterName; 029 030 private final int sqlType; 031 032 private final boolean nullable; 033 034 035 /** 036 * Constructor taking all the properties. 037 */ 038 public TableParameterMetaData(String columnName, int sqlType, boolean nullable) { 039 this.parameterName = columnName; 040 this.sqlType = sqlType; 041 this.nullable = nullable; 042 } 043 044 045 /** 046 * Get the parameter name. 047 */ 048 public String getParameterName() { 049 return this.parameterName; 050 } 051 052 /** 053 * Get the parameter SQL type. 054 */ 055 public int getSqlType() { 056 return this.sqlType; 057 } 058 059 /** 060 * Get whether the parameter/column is nullable. 061 */ 062 public boolean isNullable() { 063 return this.nullable; 064 } 065 066}