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; 025import java.sql.SQLType; 026 027import org.apiguardian.api.API; 028import org.tquadrat.foundation.annotation.ClassVersion; 029 030/** 031 * <p>{@summary A value for an 032 * {@link org.tquadrat.foundation.sql.EnhancedPreparedStatement }.} 033 * 034 * @param parameterName The name of the parameter. 035 * @param type The SQL type. 036 * @param value A String representation of the value; it can be 037 * {@code null} if the value is {@code null}, but it could be also the 038 * value of 039 * {@link org.tquadrat.foundation.lang.CommonConstants#NULL_STRING}. 040 * 041 * @extauthor Thomas Thrien - thomas.thrien@tquadrat.org 042 * @version $Id: StatementValue.java 1161 2026-03-16 21:00:45Z tquadrat $ 043 * @since 0.0.1 044 * 045 * @UMLGraph.link 046 */ 047@ClassVersion( sourceVersion = "$Id: StatementValue.java 1161 2026-03-16 21:00:45Z tquadrat $" ) 048@API( status = INTERNAL, since = "0.0.1" ) 049@SuppressWarnings( "doclint:missing" ) 050/* 051 * Due to a known bug in Javadoc will the fields of the record cause a warning 052 * about a missing @serial tag in the Javadoc comment. 053 */ 054public record StatementValue( String parameterName, SQLType type, String value ) implements Serializable 055{ 056 /*------------------------*\ 057 ====** Static Initialisations **=========================================== 058 \*------------------------*/ 059 /** 060 * The serial version UID for objects of this class: {@value}. 061 * 062 * @hidden 063 */ 064 @Serial 065 private static final long serialVersionUID = 1L; 066 067 /*---------*\ 068 ====** Methods **========================================================== 069 \*---------*/ 070 /** 071 * {@inheritDoc} 072 */ 073 @Override 074 public final String toString() 075 { 076 final var retValue = getClass().getName() + 077 " [Parameter: " + parameterName + 078 ", Type: " + type.getName() + 079 ", Value: " + value + 080 "]"; 081 082 //---* Done *---------------------------------------------------------- 083 return retValue; 084 } // toString() 085} 086// record StatementValue 087 088/* 089 * End of File 090 */