Class AnyTest


  • public class AnyTest
    extends Object
    Provides example methods to illustrate the polymorphic types any, anyarray, and anyelement.
    • Constructor Summary

      Constructors 
      Constructor Description
      AnyTest()  
    • Constructor Detail

    • Method Detail

      • logAny

        @Function(schema="javatest",
                  effects=IMMUTABLE,
                  onNullInput=RETURNS_NULL)
        public static void logAny​(@SQLType("pg_catalog.any")
                                  Object param)
                           throws SQLException
        Log (at INFO level) the Java class received for the passed argument.
        Throws:
        SQLException
      • logAnyElement

        @Function(schema="javatest",
                  effects=IMMUTABLE,
                  onNullInput=RETURNS_NULL,
                  type="pg_catalog.anyelement")
        public static Object logAnyElement​(@SQLType("pg_catalog.anyelement")
                                           Object param)
                                    throws SQLException
        Log (at INFO level) the Java class received for the passed argument, and return the same value.
        Throws:
        SQLException
      • makeArray

        @Function(schema="javatest",
                  effects=IMMUTABLE,
                  onNullInput=RETURNS_NULL,
                  type="pg_catalog.anyarray")
        public static Object[] makeArray​(@SQLType("pg_catalog.anyelement")
                                         Object param)
        Return the Java object received for the passed argument, wrapped in a one-element array with the object's class as its element type.