blob: 793f4c57d03f1ac8802de50fb5f27f6e29170b68 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>PdxInstance (Apache Geode 1.15.1)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PdxInstance (Apache Geode 1.15.1)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":18,"i9":6,"i10":6,"i11":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/geode/pdx/PdxInitializationException.html" title="class in org.apache.geode.pdx"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/pdx/PdxInstanceFactory.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/pdx/PdxInstance.html" target="_top">Frames</a></li>
<li><a href="PdxInstance.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.geode.pdx</div>
<h2 title="Interface PdxInstance" class="title">Interface PdxInstance</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx">WritablePdxInstance</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">PdxInstance</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">PdxInstance provides run time access to the fields of a PDX without deserializing the PDX.
Preventing deserialization saves time and memory and does not require the domain class. This
interface is implemented by GemFire. The PdxInstance implementation is a light weight wrapper
that simply refers to the raw bytes of the PDX that are kept in the cache. Applications can
choose to access PdxInstances instead of Java objects by configuring the Cache to prefer PDX
instances during deserialization. This can be done in <code>cache.xml</code> by setting the
attribute <code>read-serialized</code> to true on the <code>pdx</code> element. Or it can be done
programmatically using either the <a href="../../../../org/apache/geode/cache/CacheFactory.html#setPdxReadSerialized-boolean-"><code>setPdxReadSerialized</code></a> or <a href="../../../../org/apache/geode/cache/client/ClientCacheFactory.html#setPdxReadSerialized-boolean-"><code>client
setPdxReadSerialized</code></a> method. Once this preference is configured, then any time deserialization
of a PDX is done it will deserialize into a PdxInstance.
<P>
PdxInstances are immutable. If you want to change one call <a href="../../../../org/apache/geode/pdx/PdxInstance.html#createWriter--"><code>createWriter()</code></a>.
<p>
A PdxInstance's fields will always be those of the version it represents. So if you add a field
to your domain class you can end up with a PdxInstance for version 1 (that does not have the
field) and a PdxInstance for version 2. The PdxInstance for version 1 will not have the added
field and the PdxInstance for version 2 will have the field. This differs from deserialization of
a pdx back to a domain class. In that case if version 2 is deserializing version 1 PdxReader will
return a default value for the added field even though version 1 has no knowledge of it.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx">WritablePdxInstance</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#createWriter--">createWriter</a></span>()</code>
<div class="block">Creates and returns a <a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx"><code>WritablePdxInstance</code></a> whose initial values are those of this
PdxInstance.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#equals-java.lang.Object-">equals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;other)</code>
<div class="block">Returns true if the given object is equals to this instance.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#getClassName--">getClassName</a></span>()</code>
<div class="block">Return the full name of the class that this pdx instance represents.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#getField-java.lang.String-">getField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</code>
<div class="block">Reads the named field and returns its value.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#getFieldNames--">getFieldNames</a></span>()</code>
<div class="block">Return an unmodifiable list of the field names on this PdxInstance.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#getObject--">getObject</a></span>()</code>
<div class="block">Deserializes and returns the domain object that this instance represents.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#hasField-java.lang.String-">hasField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</code>
<div class="block">Checks if the named field exists and returns the result.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#hashCode--">hashCode</a></span>()</code>
<div class="block">Generates a hashCode based on the identity fields of this PdxInstance.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>default boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#isDeserializable--">isDeserializable</a></span>()</code>
<div class="block">Returns false if this instance will never be deserialized to a domain class.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#isEnum--">isEnum</a></span>()</code>
<div class="block">Returns true if this instance represents an enum.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#isIdentityField-java.lang.String-">isIdentityField</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</code>
<div class="block">Checks if the named field was <a href="../../../../org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-"><code>marked</code></a> as an identity
field.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/geode/pdx/PdxInstance.html#toString--">toString</a></span>()</code>
<div class="block">Prints out all of the identity fields of this PdxInstance.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getClassName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassName</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getClassName()</pre>
<div class="block">Return the full name of the class that this pdx instance represents.
An empty string will be returned if no class is associated with this instance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the class that this pdx instance represents.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 6.6.2</dd>
</dl>
</li>
</ul>
<a name="isEnum--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEnum</h4>
<pre>boolean&nbsp;isEnum()</pre>
<div class="block">Returns true if this instance represents an enum. Enum's have a String field named "name" and
an int field named "ordinal". It is ok to cast a PdxInstance that represents an enum to
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang"><code>Comparable</code></a>. PdxInstances representing enums are not writable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this instance represents an enum.</dd>
</dl>
</li>
</ul>
<a name="getObject--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getObject</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getObject()</pre>
<div class="block">Deserializes and returns the domain object that this instance represents.
If this instance is one that never deserializes then getObject returns "this".</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the deserialized domain object or "this" if this instance never deserializes</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/geode/pdx/PdxSerializationException.html" title="class in org.apache.geode.pdx">PdxSerializationException</a></code> - if the instance could not be deserialized</dd>
</dl>
</li>
</ul>
<a name="hasField-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasField</h4>
<pre>boolean&nbsp;hasField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</pre>
<div class="block">Checks if the named field exists and returns the result.
<p>
This can be useful when writing code that handles more than one version of a PDX class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fieldName</code> - the name of the field to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the named field exists; otherwise <code>false</code></dd>
</dl>
</li>
</ul>
<a name="getFieldNames--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFieldNames</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getFieldNames()</pre>
<div class="block">Return an unmodifiable list of the field names on this PdxInstance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an unmodifiable list of the field names on this PdxInstance</dd>
</dl>
</li>
</ul>
<a name="isIdentityField-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isIdentityField</h4>
<pre>boolean&nbsp;isIdentityField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</pre>
<div class="block">Checks if the named field was <a href="../../../../org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-"><code>marked</code></a> as an identity
field.
<p>
Note that if no fields have been marked then all the fields are used as identity fields even
though this method will return <code>false</code> since none of them have been <em>marked</em>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fieldName</code> - the name of the field to check</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the named field exists and was marked as an identify field;
otherwise <code>false</code></dd>
</dl>
</li>
</ul>
<a name="getField-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getField</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getField(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;fieldName)</pre>
<div class="block">Reads the named field and returns its value. If the field does not exist <code>null</code> is
returned.
<p>
A <code>null</code> result indicates that the field does not exist or that it exists and its
value is currently <code>null</code>. The <a href="../../../../org/apache/geode/pdx/PdxInstance.html#hasField-java.lang.String-"><code>hasField</code></a> method can be used
to figure out which if these two cases is true.
<p>
If an Object[] is deserialized by this call then that array's component type will be
<code>Object.class</code> instead of the original class that the array had when it was
serialized. This is done so that PdxInstance objects can be added to the array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>fieldName</code> - name of the field to read</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>If this instance has the named field then the field's value is returned, otherwise
<code>null</code> is returned.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/geode/pdx/PdxSerializationException.html" title="class in org.apache.geode.pdx">PdxSerializationException</a></code> - if the field could not be deserialized</dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>boolean&nbsp;equals(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;other)</pre>
<div class="block">Returns true if the given object is equals to this instance.
<p>
If <code>other</code> is not a PdxInstance then it is not equal to this instance. NOTE: Even if
<code>other</code> is the result of calling <a href="../../../../org/apache/geode/pdx/PdxInstance.html#getObject--"><code>getObject()</code></a> it will not be equal to this
instance.
<p>
Otherwise equality of two PdxInstances is determined as follows:
<ol>
<li>The domain class name must be equal for both PdxInstances
<li>Each identity field must be equal.
</ol>
If the domain class is not the empty string then
if one of the instances does not have a field that the other one does
then equals will assume it has the field with a default value.
If a PdxInstance has marked identity fields using
<a href="../../../../org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-"><code>markIdentityField</code></a> then only the marked identity
fields are its identity fields. Otherwise all its fields are identity fields.
<P>
An identity field is equal if all the following are true:
<ol>
<li>The field name is equal.
<li>The field type is equal.
<li>The field value is equal.
</ol>
<P>
If a field's type is <code>OBJECT</code> then its value must be deserialized to determine if it
is equals. If the deserialized object is an array then
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#deepEquals-java.lang.Object:A-java.lang.Object:A-" title="class or interface in java.util"><code>deepEquals</code></a> is used to determine
equality. Otherwise <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>equals</code></a> is used.
<P>
If a field's type is <code>OBJECT[]</code> then its value must be deserialized and
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#deepEquals-java.lang.Object:A-java.lang.Object:A-" title="class or interface in java.util"><code>deepEquals</code></a> is used to determine
equality.
<P>
For all other field types then the value does not need to be deserialized. Instead the
serialized raw bytes are compared and used to determine equality.
<P>
Note that any fields that have objects that do not override <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>equals</code></a> will cause equals to return false when you might have expected it to return true. The
only exceptions to this are those that call
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#deepEquals-java.lang.Object:A-java.lang.Object:A-" title="class or interface in java.util"><code>deepEquals</code></a> as noted above. You should
either override equals and hashCode in these cases or mark other fields as your identity
fields.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>other</code> - the other instance to compare to this.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this instance is equal to <code>other</code>.</dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>int&nbsp;hashCode()</pre>
<div class="block">Generates a hashCode based on the identity fields of this PdxInstance.
<p>
If a PdxInstance has marked identity fields using <a href="../../../../org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-"><code>markIdentityField</code></a> then only the marked identity fields are its identity fields. Otherwise all
its fields are identity fields.
<p>
If an identity field is of type <code>OBJECT</code> then it is deserialized. If the
deserialized object is an array then <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#deepHashCode-java.lang.Object:A-" title="class or interface in java.util"><code>deepHashCode</code></a> is used. Otherwise <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang"><code>hashCode</code></a> is used.
<p>
If an identity field is of type <code>OBJECT[]</code> this it is deserialized and
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html?is-external=true#deepHashCode-java.lang.Object:A-" title="class or interface in java.util"><code>deepHashCode</code></a> is used.
<p>
Otherwise the field is not deserialized and the raw bytes of its value are used to compute the
hash code.
<p>
The algorithm used to compute the hashCode is: hashCode = 1; foreach (field:
sortedIdentityFields()) { if (field.isDefaultValue()) continue; if (field.isArray()) { hashCode
= hashCode*31 + Arrays.deepHashCode(field); } else { hashCode = hashCode*31 + field.hashCode();
} } if (hashCode == 0) { hashCode = 1; }</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<div class="block">Prints out all of the identity fields of this PdxInstance.
<p>
If a PdxInstance has marked identity fields using <a href="../../../../org/apache/geode/pdx/PdxWriter.html#markIdentityField-java.lang.String-"><code>markIdentityField</code></a> then only the marked identity fields are its identity fields. Otherwise all
its fields are identity fields.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="createWriter--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createWriter</h4>
<pre><a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx">WritablePdxInstance</a>&nbsp;createWriter()</pre>
<div class="block">Creates and returns a <a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx"><code>WritablePdxInstance</code></a> whose initial values are those of this
PdxInstance. This call returns a copy of the current field values so modifications made to the
returned value will not modify this PdxInstance.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../../org/apache/geode/pdx/WritablePdxInstance.html" title="interface in org.apache.geode.pdx"><code>WritablePdxInstance</code></a></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - if the PdxInstance is an enum.</dd>
</dl>
</li>
</ul>
<a name="isDeserializable--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isDeserializable</h4>
<pre>default&nbsp;boolean&nbsp;isDeserializable()</pre>
<div class="block">Returns false if this instance will never be deserialized to a domain class.
Instances that never deserialize can be created using
<a href="../../../../org/apache/geode/pdx/PdxInstanceFactory.html#neverDeserialize--"><code>PdxInstanceFactory.neverDeserialize()</code></a> or by creating a factory with
an empty string as the class name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>false if this instance will never be deserialized to a domain class.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>Geode 1.9</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/geode/pdx/PdxInitializationException.html" title="class in org.apache.geode.pdx"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/geode/pdx/PdxInstanceFactory.html" title="interface in org.apache.geode.pdx"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/geode/pdx/PdxInstance.html" target="_top">Frames</a></li>
<li><a href="PdxInstance.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>