title: oracle.sql.DATUM is deprecated. What is its replacement?
body: <p>I inherited some legacy Java at work and it's making use of <code>oracle.sql</code> import. I've managed to import <code>java.sql</code> instead and make minor alterations to the class references of the legacy code, and everything seems to be working fine; however, I've stumbled upon a <code>Datum</code> object. I'm trying to find its equivalent in <code>java.sql</code> but I have no idea what <code>Datum</code> does, or what it even means. There does not appear to be a class inside of <code>java.sql</code> with <code>Datum</code> objects, so I'm wondering what is its replacement.</p>
  
  <p>I've checked out Oracle's documentation @ <a href="https://docs.oracle.com/database/121/JAJDB/oracle/sql/Datum.html" rel="nofollow noreferrer">https://docs.oracle.com/database/121/JAJDB/oracle/sql/Datum.html</a>
  and it's not very helpful, at least not to me.</p>
  
  <p><strong>Here's a snippet just for the purpose of seeing how the class was being used in the legacy</strong></p>
  
  <pre><code>  import oracle.sql.ARRAY;
    import oracle.sql.Datum;       
  
  
    ARRAY arr = getArray(dataRow, "FORM_DATA", false);
    Map&lt;String, String&gt; kvMap = new HashMap&lt;String, String&gt;();
    try {                 
          Datum[] dat = arr.getOracleArray();
           for (int i=0;i&lt;dat.length;i++){
               Object[] element = ((oracle.sql.STRUCT) dat[i]).getAttributes();
               String key = (String)element[0];
               String value = (String)element[1];
               kvMap.put(key, value); 
          }
      } catch (SQLException e) {
          Log.logError(this, e.getMessage());
      }
      ....
  </code></pre>
  
  <p>The <code>getOracleArray()</code> method can be seen here: <a href="https://docs.oracle.com/database/121/JAJDB/oracle/sql/ARRAY.html#getOracleArray_long__int_" rel="nofollow noreferrer">https://docs.oracle.com/database/121/JAJDB/oracle/sql/ARRAY.html#getOracleArray_long__int_</a></p>