Class NonNullParameter<T>

  • Type Parameters:
    T - value type
    All Implemented Interfaces:
    Parameter

    public class NonNullParameter<T>
    extends Parameter<T>
    Parameter wrapper for primitive, knowing that value cannot be null, permitting fast path for few methods.
    • Constructor Detail

      • NonNullParameter

        public NonNullParameter​(Codec<T> codec,
                                T value)
    • Method Detail

      • encodeText

        public void encodeText​(Writer encoder,
                               Context context)
                        throws java.io.IOException,
                               java.sql.SQLException
        Description copied from interface: Parameter
        Encode parameter in text format
        Specified by:
        encodeText in interface Parameter
        Overrides:
        encodeText in class Parameter<T>
        Parameters:
        encoder - packet writer
        context - connection context
        Throws:
        java.io.IOException - if socket error occurs
        java.sql.SQLException - if other kind of error occurs
      • isNull

        public boolean isNull()
        Description copied from interface: Parameter
        is parameter null
        Specified by:
        isNull in interface Parameter
        Overrides:
        isNull in class Parameter<T>
        Returns:
        is null