> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GenericRecord

> GenericRecord — Kinetica Java API

<div className="kinetica-javadoc">
  <div className="header">
    <div className="sub-title"><span className="package-label-in-type">Package</span> <a href="/content/api/java/com/gpudb/package-summary">com.gpudb</a></div>
    <h1 title="Class GenericRecord" className="title">Class GenericRecord</h1>
  </div>

  <div className="inheritance" title="Inheritance Tree">
    <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">java.lang.Object</a>

    <div className="inheritance">
      <a href="/content/api/java/com/gpudb/RecordBase" title="class in com.gpudb">com.gpudb.RecordBase</a>
      <div className="inheritance">com.gpudb.GenericRecord</div>
    </div>
  </div>

  <div className="section class-description" id="class-description">
    <div className="dl notes">
      <div className="dt">All Implemented Interfaces:</div>
      <div className="dd"><code><a href="/content/api/java/com/gpudb/Record" title="interface in com.gpudb">Record</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" className="external-link">Serializable</a></code>, <code>org.apache.avro.generic.GenericContainer</code>, <code>org.apache.avro.generic.IndexedRecord</code></div>
    </div>

    <hr />

    <div className="type-signature"><span className="modifiers">public final class </span><span className="element-name type-name-label">GenericRecord</span> <span className="extends-implements">extends <a href="/content/api/java/com/gpudb/RecordBase" title="class in com.gpudb">RecordBase</a> implements <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" className="external-link">Serializable</a></span></div>
    <div className="block">An object that contains <a href="/content/api/java/com/gpudb/Record" title="interface in com.gpudb"><code>Record</code></a> data based on a GPUdb <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a> specified at runtime. GPUdb functions that return non-dynamic data will use generic records by default in the absence of a specified type descriptor or known type.</div>

    <div className="dl notes">
      <div className="dt">See Also:</div>

      <div className="dd">
        <ul className="tag-list">
          <li><a href="/content/api/java/serialized-form#com.gpudb.GenericRecord">Serialized Form</a></li>
        </ul>
      </div>
    </div>
  </div>

  <div className="section summary">
    <ul className="summary-list">
      <li>
        <div className="section constructor-summary" id="constructor-summary">
          <h2>Constructor Summary</h2>
          <div className="caption"><span>Constructors</span></div>

          <div className="summary-table two-column-summary">
            <div className="table-header col-first">Constructor</div>
            <div className="table-header col-last">Description</div>
            <div className="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(com.gpudb.Type)" className="member-name-link">GenericRecord</a><wbr />(<a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb">Type</a> type)</code></div>

            <div className="col-last even-row-color">
              <div className="block">Creates a new generic record based on the specified GPUdb <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a>.</div>
            </div>
          </div>
        </div>
      </li>

      <li>
        <div className="section method-summary" id="method-summary">
          <h2>Method Summary</h2>

          <div id="method-summary-table">
            <div className="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabIndex="0" className="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabIndex="-1" className="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabIndex="-1" className="table-tab">Concrete Methods</button></div>

            <div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
              <div className="summary-table three-column-summary">
                <div className="table-header col-first">Modifier and Type</div>
                <div className="table-header col-second">Method</div>
                <div className="table-header col-last">Description</div>
                <div className="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a></code></div>
                <div className="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#get(int)" className="member-name-link">get</a><wbr />(int index)</code></div>

                <div className="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
                  <div className="block">Returns the value of the specified field.</div>
                </div>

                <div className="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb">Type</a></code></div>
                <div className="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getType()" className="member-name-link">getType</a>()</code></div>

                <div className="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
                  <div className="block">Returns the GPUdb <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a> of the record.</div>
                </div>

                <div className="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
                <div className="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#put(int,java.lang.Object)" className="member-name-link">put</a><wbr />(int index, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a> value)</code></div>

                <div className="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
                  <div className="block">Sets the value of the specified field.</div>
                </div>
              </div>
            </div>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-com.gpudb.RecordBase">Methods inherited from class com.gpudb.<a href="/content/api/java/com/gpudb/RecordBase" title="class in com.gpudb">RecordBase</a></h3>
            <code><a href="/content/api/java/com/gpudb/RecordBase#equals(java.lang.Object)">equals</a>, <a href="/content/api/java/com/gpudb/RecordBase#get(java.lang.String)">get</a>, <a href="/content/api/java/com/gpudb/RecordBase#getArray(int)">getArray</a>, <a href="/content/api/java/com/gpudb/RecordBase#getArray(java.lang.String)">getArray</a>, <a href="/content/api/java/com/gpudb/RecordBase#getBytes(int)">getBytes</a>, <a href="/content/api/java/com/gpudb/RecordBase#getBytes(java.lang.String)">getBytes</a>, <a href="/content/api/java/com/gpudb/RecordBase#getDataMap()">getDataMap</a>, <a href="/content/api/java/com/gpudb/RecordBase#getDouble(int)">getDouble</a>, <a href="/content/api/java/com/gpudb/RecordBase#getDouble(java.lang.String)">getDouble</a>, <a href="/content/api/java/com/gpudb/RecordBase#getFloat(int)">getFloat</a>, <a href="/content/api/java/com/gpudb/RecordBase#getFloat(java.lang.String)">getFloat</a>, <a href="/content/api/java/com/gpudb/RecordBase#getInt(int)">getInt</a>, <a href="/content/api/java/com/gpudb/RecordBase#getInt(java.lang.String)">getInt</a>, <a href="/content/api/java/com/gpudb/RecordBase#getJson(int)">getJson</a>, <a href="/content/api/java/com/gpudb/RecordBase#getJson(java.lang.String)">getJson</a>, <a href="/content/api/java/com/gpudb/RecordBase#getLong(int)">getLong</a>, <a href="/content/api/java/com/gpudb/RecordBase#getLong(java.lang.String)">getLong</a>, <a href="/content/api/java/com/gpudb/RecordBase#getSchema()">getSchema</a>, <a href="/content/api/java/com/gpudb/RecordBase#getString(int)">getString</a>, <a href="/content/api/java/com/gpudb/RecordBase#getString(java.lang.String)">getString</a>, <a href="/content/api/java/com/gpudb/RecordBase#getVector(int)">getVector</a>, <a href="/content/api/java/com/gpudb/RecordBase#getVector(java.lang.String)">getVector</a>, <a href="/content/api/java/com/gpudb/RecordBase#hashCode()">hashCode</a>, <a href="/content/api/java/com/gpudb/RecordBase#put(java.lang.String,java.lang.Object)">put</a>, <a href="/content/api/java/com/gpudb/RecordBase#putArray(int,java.lang.Object)">putArray</a>, <a href="/content/api/java/com/gpudb/RecordBase#putArray(java.lang.String,java.lang.Object)">putArray</a>, <a href="/content/api/java/com/gpudb/RecordBase#putBytes(int,java.lang.Object)">putBytes</a>, <a href="/content/api/java/com/gpudb/RecordBase#putBytes(java.lang.String,java.lang.Object)">putBytes</a>, <a href="/content/api/java/com/gpudb/RecordBase#putDateTime(int,java.lang.Object)">putDateTime</a>, <a href="/content/api/java/com/gpudb/RecordBase#putDateTime(int,java.lang.Object,java.util.TimeZone)">putDateTime</a>, <a href="/content/api/java/com/gpudb/RecordBase#putDateTime(java.lang.String,java.lang.Object)">putDateTime</a>, <a href="/content/api/java/com/gpudb/RecordBase#putDateTime(java.lang.String,java.lang.Object,java.util.TimeZone)">putDateTime</a>, <a href="/content/api/java/com/gpudb/RecordBase#putDecimal(java.lang.String,java.lang.Object)">putDecimal</a>, <a href="/content/api/java/com/gpudb/RecordBase#putJson(int,java.lang.Object)">putJson</a>, <a href="/content/api/java/com/gpudb/RecordBase#putJson(java.lang.String,java.lang.Object)">putJson</a>, <a href="/content/api/java/com/gpudb/RecordBase#putVector(int,java.lang.Object)">putVector</a>, <a href="/content/api/java/com/gpudb/RecordBase#putVector(java.lang.String,java.lang.Object)">putVector</a>, <a href="/content/api/java/com/gpudb/RecordBase#toString()">toString</a></code>
          </div>

          <div className="inherited-list">
            <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a></h3>
            <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" className="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" className="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" className="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" className="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" className="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" className="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" className="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" className="external-link">wait</a></code>
          </div>
        </div>
      </li>
    </ul>
  </div>

  <div className="section details">
    <ul className="details-list">
      <li>
        <div className="section constructor-details" id="constructor-detail">
          <h2>Constructor Details</h2>

          <ul className="member-list">
            <li>
              <div className="section detail" id="<init>(com.gpudb.Type)">
                <h3>GenericRecord</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="element-name">GenericRecord</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb">Type</a> type)</span></div>
                <div className="block">Creates a new generic record based on the specified GPUdb <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a>. Note that generic records can also be created using <a href="/content/api/java/com/gpudb/Type#newInstance()"><code>Type.newInstance()</code></a>.</div>

                <div className="dl notes">
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>type</code> - the GPUdb type</div>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </li>

      <li>
        <div className="section method-details" id="method-detail">
          <h2>Method Details</h2>

          <ul className="member-list">
            <li>
              <div className="section detail" id="getType()">
                <h3>getType</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb">Type</a></span> <span className="element-name">getType</span>()</div>
                <div className="block"><span className="description-from-type-label">Description copied from interface: <code><a href="/content/api/java/com/gpudb/Record#getType()">Record</a></code></span></div>
                <div className="block">Returns the GPUdb <a href="/content/api/java/com/gpudb/Type" title="class in com.gpudb"><code>Type</code></a> of the record.</div>

                <div className="dl notes">
                  <div className="dt">Specified by:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/Record#getType()">getType</a></code> in interface <code><a href="/content/api/java/com/gpudb/Record" title="interface in com.gpudb">Record</a></code></div>
                  <div className="dt">Returns:</div>
                  <div className="dd">the GPUdb type</div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="get(int)">
                <h3>get</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a></span> <span className="element-name">get</span><wbr /><span className="parameters">(int index)</span></div>
                <div className="block"><span className="description-from-type-label">Description copied from interface: <code><a href="/content/api/java/com/gpudb/Record#get(int)">Record</a></code></span></div>
                <div className="block">Returns the value of the specified field.</div>

                <div className="dl notes">
                  <div className="dt">Specified by:</div>
                  <div className="dd"><code>get</code> in interface <code>org.apache.avro.generic.IndexedRecord</code></div>
                  <div className="dt">Specified by:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/Record#get(int)">get</a></code> in interface <code><a href="/content/api/java/com/gpudb/Record" title="interface in com.gpudb">Record</a></code></div>
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>index</code> - the index of the field</div>
                  <div className="dt">Returns:</div>
                  <div className="dd">the value of the field</div>
                </div>
              </div>
            </li>

            <li>
              <div className="section detail" id="put(int,java.lang.Object)">
                <h3>put</h3>
                <div className="member-signature"><span className="modifiers">public</span> <span className="return-type">void</span> <span className="element-name">put</span><wbr /><span className="parameters">(int index, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" className="external-link">Object</a> value)</span></div>
                <div className="block"><span className="description-from-type-label">Description copied from interface: <code><a href="/content/api/java/com/gpudb/Record#put(int,java.lang.Object)">Record</a></code></span></div>
                <div className="block">Sets the value of the specified field.</div>

                <div className="dl notes">
                  <div className="dt">Specified by:</div>
                  <div className="dd"><code>put</code> in interface <code>org.apache.avro.generic.IndexedRecord</code></div>
                  <div className="dt">Specified by:</div>
                  <div className="dd"><code><a href="/content/api/java/com/gpudb/Record#put(int,java.lang.Object)">put</a></code> in interface <code><a href="/content/api/java/com/gpudb/Record" title="interface in com.gpudb">Record</a></code></div>
                  <div className="dt">Parameters:</div>
                  <div className="dd"><code>index</code> - the index of the field</div>
                  <div className="dd"><code>value</code> - the new value</div>
                </div>
              </div>
            </li>
          </ul>
        </div>
      </li>
    </ul>
  </div>
</div>
