Record Class SqlTypeMapping

java.lang.Object
java.lang.Record
org.ethelred.kiwiproc.processor.SqlTypeMapping
All Implemented Interfaces:
org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With

public record SqlTypeMapping(JDBCType jdbcType, Class<?> baseType, String accessorSuffix, boolean specialCase, boolean isNullable, @Nullable SqlTypeMapping componentType, @Nullable String componentDbType) extends Record implements org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With

    org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With.Consumer, org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With.Function<R extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
    SqlTypeMapping(JDBCType jdbcType, Class<?> baseType, String accessorSuffix)
     
    SqlTypeMapping(JDBCType jdbcType, Class<?> baseType, String accessorSuffix, boolean specialCase, boolean isNullable, @Nullable SqlTypeMapping componentType, @Nullable String componentDbType)
    Creates an instance of a SqlTypeMapping record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the accessorSuffix record component.
    Returns the value of the baseType record component.
    @Nullable String
    Returns the value of the componentDbType record component.
    @Nullable SqlTypeMapping
    Returns the value of the componentType record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    get(org.ethelred.kiwiproc.meta.ColumnMetaData columnMetaData)
     
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isNullable record component.
    Returns the value of the jdbcType record component.
     
    boolean
    Returns the value of the specialCase record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With

    accept, map, with, with, withAccessorSuffix, withBaseType, withComponentDbType, withComponentType, withIsNullable, withJdbcType, withSpecialCase
  • Constructor Details

    • SqlTypeMapping

      public SqlTypeMapping(JDBCType jdbcType, Class<?> baseType, String accessorSuffix)
    • SqlTypeMapping

      public SqlTypeMapping(JDBCType jdbcType, Class<?> baseType, String accessorSuffix, boolean specialCase, boolean isNullable, @Nullable SqlTypeMapping componentType, @Nullable String componentDbType)
      Creates an instance of a SqlTypeMapping record class.
      Parameters:
      jdbcType - the value for the jdbcType record component
      baseType - the value for the baseType record component
      accessorSuffix - the value for the accessorSuffix record component
      specialCase - the value for the specialCase record component
      isNullable - the value for the isNullable record component
      componentType - the value for the componentType record component
      componentDbType - the value for the componentDbType record component
  • Method Details

    • get

      public static SqlTypeMapping get(org.ethelred.kiwiproc.meta.ColumnMetaData columnMetaData)
    • kiwiType

      public KiwiType kiwiType()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • jdbcType

      public JDBCType jdbcType()
      Returns the value of the jdbcType record component.
      Specified by:
      jdbcType in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the jdbcType record component
    • baseType

      public Class<?> baseType()
      Returns the value of the baseType record component.
      Specified by:
      baseType in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the baseType record component
    • accessorSuffix

      public String accessorSuffix()
      Returns the value of the accessorSuffix record component.
      Specified by:
      accessorSuffix in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the accessorSuffix record component
    • specialCase

      public boolean specialCase()
      Returns the value of the specialCase record component.
      Specified by:
      specialCase in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the specialCase record component
    • isNullable

      public boolean isNullable()
      Returns the value of the isNullable record component.
      Specified by:
      isNullable in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the isNullable record component
    • componentType

      public @Nullable SqlTypeMapping componentType()
      Returns the value of the componentType record component.
      Specified by:
      componentType in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the componentType record component
    • componentDbType

      public @Nullable String componentDbType()
      Returns the value of the componentDbType record component.
      Specified by:
      componentDbType in interface org.ethelred.kiwiproc.processor.SqlTypeMappingBuilder.With
      Returns:
      the value of the componentDbType record component