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; 018 019import java.sql.Types; 020 021/** 022 * Represents a returned update count from a stored procedure call. 023 * 024 * <p>Returned update counts - like all stored procedure 025 * parameters - <b>must</b> have names. 026 * 027 * @author Thomas Risberg 028 */ 029public class SqlReturnUpdateCount extends SqlParameter { 030 031 /** 032 * Create a new SqlReturnUpdateCount. 033 * @param name name of the parameter, as used in input and output maps 034 */ 035 public SqlReturnUpdateCount(String name) { 036 super(name, Types.INTEGER); 037 } 038 039 040 /** 041 * This implementation always returns {@code false}. 042 */ 043 @Override 044 public boolean isInputValueProvided() { 045 return false; 046 } 047 048 /** 049 * This implementation always returns {@code true}. 050 */ 051 @Override 052 public boolean isResultsParameter() { 053 return true; 054 } 055 056}