001/* 002 * ============================================================================ 003 * Copyright © 2002-2026 by Thomas Thrien. 004 * All Rights Reserved. 005 * ============================================================================ 006 * 007 * Licensed to the public under the agreements of the GNU Lesser General Public 008 * License, version 3.0 (the "License"). You may obtain a copy of the License at 009 * 010 * http://www.gnu.org/licenses/lgpl.html 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 015 * License for the specific language governing permissions and limitations 016 * under the License. 017 */ 018 019package org.tquadrat.foundation.sql.internal; 020 021import static org.apiguardian.api.API.Status.INTERNAL; 022 023import java.io.Serial; 024import java.io.Serializable; 025 026import org.apiguardian.api.API; 027import org.tquadrat.foundation.annotation.ClassVersion; 028 029/** 030 * A variable for an 031 * {@link org.tquadrat.foundation.sql.EnhancedPreparedStatement EnhancedPreparedStatement}. 032 * 033 * @param name The name of the variable. 034 * @param position The position for this variable in the 035 * {@link java.sql.PreparedStatement}. 036 * 037 * @extauthor Thomas Thrien - thomas.thrien@tquadrat.org 038 * @version $Id: StatementVariable.java 1161 2026-03-16 21:00:45Z tquadrat $ 039 * @since 0.0.1 040 * 041 * @UMLGraph.link 042 */ 043@ClassVersion( sourceVersion = "$Id: StatementVariable.java 1161 2026-03-16 21:00:45Z tquadrat $" ) 044@API( status = INTERNAL, since = "0.0.1" ) 045@SuppressWarnings( "doclint:missing" ) 046public record StatementVariable( String name, int position ) implements Serializable 047/* 048 * Due to a known bug in Javadoc will the fields of the record cause a warning 049 * about a missing @serial tag in the Javadoc comment. 050 */ 051{ 052 /*------------------------*\ 053 ====** Static Initialisations **=========================================== 054 \*------------------------*/ 055 /** 056 * The serial version UID for objects of this class: {@value}. 057 * 058 * @hidden 059 */ 060 @Serial 061 private static final long serialVersionUID = 1L; 062 063 /*---------*\ 064 ====** Methods **========================================================== 065 \*---------*/ 066 /** 067 * {@inheritDoc} 068 */ 069 @Override 070 public final String toString() 071 { 072 final var retValue = getClass().getName() + 073 " [Name: " + name + 074 ", Position: " + position + 075 "]"; 076 077 //---* Done *---------------------------------------------------------- 078 return retValue; 079 } // toString() 080} 081// record StatementVariable 082 083/* 084 * End of File 085 */