Class MockArray<T>

  • All Implemented Interfaces:
    java.sql.Array

    public class MockArray<T>
    extends java.lang.Object
    implements java.sql.Array
    A mock Array.
    Author:
    Lukas Eder
    See Also:
    MockConnection
    • Constructor Summary

      Constructors 
      Constructor Description
      MockArray​(SQLDialect dialect, T[] array, java.lang.Class<? extends T[]> type)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void free()  
      T[] getArray()  
      T[] getArray​(long index, int count)  
      T[] getArray​(long index, int count, java.util.Map<java.lang.String,​java.lang.Class<?>> map)  
      T[] getArray​(java.util.Map<java.lang.String,​java.lang.Class<?>> map)  
      int getBaseType()  
      java.lang.String getBaseTypeName()  
      java.sql.ResultSet getResultSet()  
      java.sql.ResultSet getResultSet​(long index, int count)  
      java.sql.ResultSet getResultSet​(long index, int count, java.util.Map<java.lang.String,​java.lang.Class<?>> map)  
      java.sql.ResultSet getResultSet​(java.util.Map<java.lang.String,​java.lang.Class<?>> map)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MockArray

        public MockArray​(SQLDialect dialect,
                         T[] array,
                         java.lang.Class<? extends T[]> type)
    • Method Detail

      • getBaseTypeName

        public java.lang.String getBaseTypeName()
        Specified by:
        getBaseTypeName in interface java.sql.Array
      • getBaseType

        public int getBaseType()
        Specified by:
        getBaseType in interface java.sql.Array
      • getArray

        public T[] getArray()
        Specified by:
        getArray in interface java.sql.Array
      • getArray

        public T[] getArray​(java.util.Map<java.lang.String,​java.lang.Class<?>> map)
        Specified by:
        getArray in interface java.sql.Array
      • getArray

        public T[] getArray​(long index,
                            int count)
                     throws java.sql.SQLException
        Specified by:
        getArray in interface java.sql.Array
        Throws:
        java.sql.SQLException
      • getArray

        public T[] getArray​(long index,
                            int count,
                            java.util.Map<java.lang.String,​java.lang.Class<?>> map)
                     throws java.sql.SQLException
        Specified by:
        getArray in interface java.sql.Array
        Throws:
        java.sql.SQLException
      • getResultSet

        public java.sql.ResultSet getResultSet()
        Specified by:
        getResultSet in interface java.sql.Array
      • getResultSet

        public java.sql.ResultSet getResultSet​(java.util.Map<java.lang.String,​java.lang.Class<?>> map)
        Specified by:
        getResultSet in interface java.sql.Array
      • getResultSet

        public java.sql.ResultSet getResultSet​(long index,
                                               int count)
                                        throws java.sql.SQLException
        Specified by:
        getResultSet in interface java.sql.Array
        Throws:
        java.sql.SQLException
      • getResultSet

        public java.sql.ResultSet getResultSet​(long index,
                                               int count,
                                               java.util.Map<java.lang.String,​java.lang.Class<?>> map)
                                        throws java.sql.SQLException
        Specified by:
        getResultSet in interface java.sql.Array
        Throws:
        java.sql.SQLException
      • free

        public void free()
        Specified by:
        free in interface java.sql.Array