1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_55) on Thu Jan 01 15:31:15 PST 2015 --> 6<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> 7<title>JsonIdentityInfo (Jackson-annotations 2.5.0 API)</title> 8<meta name="date" content="2015-01-01"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10</head> 11<body> 12<script type="text/javascript"><!-- 13 if (location.href.indexOf('is-external=true') == -1) { 14 parent.document.title="JsonIdentityInfo (Jackson-annotations 2.5.0 API)"; 15 } 16//--> 17</script> 18<noscript> 19<div>JavaScript is disabled on your browser.</div> 20</noscript> 21<!-- ========= START OF TOP NAVBAR ======= --> 22<div class="topNav"><a name="navbar_top"> 23<!-- --> 24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 25<!-- --> 26</a> 27<ul class="navList" title="Navigation"> 28<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/JsonIdentityInfo.html">Use</a></li> 31<li><a href="package-tree.html">Tree</a></li> 32<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 33<li><a href="../../../../index-all.html">Index</a></li> 34<li><a href="../../../../help-doc.html">Help</a></li> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 39<li><a href="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top">Frames</a></li> 44<li><a href="JsonIdentityInfo.html" target="_top">No Frames</a></li> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 62<ul class="subNavList"> 63<li>Summary: </li> 64<li><a href="#annotation_type_required_element_summary">Required</a> | </li> 65<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 66</ul> 67<ul class="subNavList"> 68<li>Detail: </li> 69<li><a href="#annotation_type_element_detail">Element</a></li> 70</ul> 71</div> 72<a name="skip-navbar_top"> 73<!-- --> 74</a></div> 75<!-- ========= END OF TOP NAVBAR ========= --> 76<!-- ======== START OF CLASS DATA ======== --> 77<div class="header"> 78<div class="subTitle">com.fasterxml.jackson.annotation</div> 79<h2 title="Annotation Type JsonIdentityInfo" class="title">Annotation Type JsonIdentityInfo</h2> 80</div> 81<div class="contentContainer"> 82<div class="description"> 83<ul class="blockList"> 84<li class="blockList"> 85<hr> 86<br> 87<pre><a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>={<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#ANNOTATION_TYPE" title="class or interface in java.lang.annotation">ANNOTATION_TYPE</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</a>}) 88<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>=<a href="http://download.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 89public @interface <span class="strong">JsonIdentityInfo</span></pre> 90<div class="block">Annotation used for indicating that values of annotated type 91 or property should be serializing so that instances either 92 contain additional object identifier (in addition actual object 93 properties), or as a reference that consists of an object id 94 that refers to a full serialization. In practice this is done 95 by serializing the first instance as full object and object 96 identity, and other references to the object as reference values. 97<p> 98 There are two main approaches to generating object identifier: 99 either using a generator (either one of standard ones, or a custom 100 generator), or using a value of a property. The latter case is 101 indicated by using a placeholder generator marker 102 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.PropertyGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.PropertyGenerator</code></a>; former by using explicit generator. 103 Object id has to be serialized as a property in case of POJOs; 104 object identity is currently NOT support for JSON Array types 105 (Java arrays or Lists) or Java Map types. 106<p> 107 Finally, note that generator type of <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.None</code></a> 108 indicates that no Object Id should be included or used: it is included 109 to allow suppressing Object Ids using mix-in annotations.</div> 110<dl><dt><span class="strong">Since:</span></dt> 111 <dd>2.0</dd></dl> 112</li> 113</ul> 114</div> 115<div class="summary"> 116<ul class="blockList"> 117<li class="blockList"> 118<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== --> 119<ul class="blockList"> 120<li class="blockList"><a name="annotation_type_required_element_summary"> 121<!-- --> 122</a> 123<h3>Required Element Summary</h3> 124<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Required Element Summary table, listing required elements, and an explanation"> 125<caption><span>Required Elements</span><span class="tabEnd"> </span></caption> 126<tr> 127<th class="colFirst" scope="col">Modifier and Type</th> 128<th class="colLast" scope="col">Required Element and Description</th> 129</tr> 130<tr class="altColor"> 131<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?>></code></td> 132<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#generator()">generator</a></strong></code> 133<div class="block">Generator to use for producing Object Identifier for objects: 134 either one of pre-defined generators from 135 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerator</code></a>, or a custom generator.</div> 136</td> 137</tr> 138</table> 139</li> 140</ul> 141<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 142<ul class="blockList"> 143<li class="blockList"><a name="annotation_type_optional_element_summary"> 144<!-- --> 145</a> 146<h3>Optional Element Summary</h3> 147<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 148<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 149<tr> 150<th class="colFirst" scope="col">Modifier and Type</th> 151<th class="colLast" scope="col">Optional Element and Description</th> 152</tr> 153<tr class="altColor"> 154<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 155<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#property()">property</a></strong></code> 156<div class="block">Name of JSON property in which Object Id will reside: also, 157 if "from property" marker generator is used, identifies 158 property that will be accessed to get type id.</div> 159</td> 160</tr> 161<tr class="rowColor"> 162<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation">ObjectIdResolver</a>></code></td> 163<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#resolver()">resolver</a></strong></code> 164<div class="block">Resolver to use for producing POJO from Object Identifier.</div> 165</td> 166</tr> 167<tr class="altColor"> 168<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 169<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#scope()">scope</a></strong></code> 170<div class="block">Scope is used to define applicability of an Object Id: all ids 171 must be unique within their scope; where scope is defined 172 as combination of this value and generator type.</div> 173</td> 174</tr> 175</table> 176</li> 177</ul> 178</li> 179</ul> 180</div> 181<div class="details"> 182<ul class="blockList"> 183<li class="blockList"> 184<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 185<ul class="blockList"> 186<li class="blockList"><a name="annotation_type_element_detail"> 187<!-- --> 188</a> 189<h3>Element Detail</h3> 190<a name="generator()"> 191<!-- --> 192</a> 193<ul class="blockListLast"> 194<li class="blockList"> 195<h4>generator</h4> 196<pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?>> generator</pre> 197<div class="block">Generator to use for producing Object Identifier for objects: 198 either one of pre-defined generators from 199 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerator</code></a>, or a custom generator. 200 Defined as class to instantiate. 201<p> 202 Note that special type 203 <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><code>ObjectIdGenerators.None</code></a> 204 can be used to disable inclusion of Object Ids.</div> 205</li> 206</ul> 207<a name="property()"> 208<!-- --> 209</a> 210<ul class="blockList"> 211<li class="blockList"> 212<h4>property</h4> 213<pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> property</pre> 214<div class="block">Name of JSON property in which Object Id will reside: also, 215 if "from property" marker generator is used, identifies 216 property that will be accessed to get type id. 217 If a property is used, name must match its external 218 name (one defined by annotation, or derived from accessor 219 name as per Java Bean Introspection rules). 220<p> 221 Default value is <code>@id</code>.</div> 222<dl> 223<dt>Default:</dt> 224<dd>"@id"</dd> 225</dl> 226</li> 227</ul> 228<a name="resolver()"> 229<!-- --> 230</a> 231<ul class="blockList"> 232<li class="blockList"> 233<h4>resolver</h4> 234<pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><? extends <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdResolver.html" title="interface in com.fasterxml.jackson.annotation">ObjectIdResolver</a>> resolver</pre> 235<div class="block">Resolver to use for producing POJO from Object Identifier. 236 <p> 237 Default value is <a href="../../../../com/fasterxml/jackson/annotation/SimpleObjectIdResolver.html" title="class in com.fasterxml.jackson.annotation"><code>SimpleObjectIdResolver</code></a></div> 238<dl><dt><span class="strong">Since:</span></dt> 239 <dd>2.4</dd></dl> 240<dl> 241<dt>Default:</dt> 242<dd>com.fasterxml.jackson.annotation.SimpleObjectIdResolver.class</dd> 243</dl> 244</li> 245</ul> 246<a name="scope()"> 247<!-- --> 248</a> 249<ul class="blockListLast"> 250<li class="blockList"> 251<h4>scope</h4> 252<pre>public abstract <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> scope</pre> 253<div class="block">Scope is used to define applicability of an Object Id: all ids 254 must be unique within their scope; where scope is defined 255 as combination of this value and generator type. 256 Comparison is simple equivalence, meaning that both type 257 generator type and scope class must be the same. 258<p> 259 Scope is used for determining how many generators are needed; 260 more than one scope is typically only needed if external Object Ids 261 have overlapping value domains (i.e. are only unique within some 262 limited scope)</div> 263<dl> 264<dt>Default:</dt> 265<dd>java.lang.Object.class</dd> 266</dl> 267</li> 268</ul> 269</li> 270</ul> 271</li> 272</ul> 273</div> 274</div> 275<!-- ========= END OF CLASS DATA ========= --> 276<!-- ======= START OF BOTTOM NAVBAR ====== --> 277<div class="bottomNav"><a name="navbar_bottom"> 278<!-- --> 279</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 280<!-- --> 281</a> 282<ul class="navList" title="Navigation"> 283<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 284<li class="navBarCell1Rev">Class</li> 285<li><a href="class-use/JsonIdentityInfo.html">Use</a></li> 286<li><a href="package-tree.html">Tree</a></li> 287<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 288<li><a href="../../../../index-all.html">Index</a></li> 289<li><a href="../../../../help-doc.html">Help</a></li> 290</ul> 291</div> 292<div class="subNav"> 293<ul class="navList"> 294<li><a href="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 295<li><a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 296</ul> 297<ul class="navList"> 298<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top">Frames</a></li> 299<li><a href="JsonIdentityInfo.html" target="_top">No Frames</a></li> 300</ul> 301<ul class="navList" id="allclasses_navbar_bottom"> 302<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 303</ul> 304<div> 305<script type="text/javascript"><!-- 306 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 307 if(window==top) { 308 allClassesLink.style.display = "block"; 309 } 310 else { 311 allClassesLink.style.display = "none"; 312 } 313 //--> 314</script> 315</div> 316<div> 317<ul class="subNavList"> 318<li>Summary: </li> 319<li><a href="#annotation_type_required_element_summary">Required</a> | </li> 320<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 321</ul> 322<ul class="subNavList"> 323<li>Detail: </li> 324<li><a href="#annotation_type_element_detail">Element</a></li> 325</ul> 326</div> 327<a name="skip-navbar_bottom"> 328<!-- --> 329</a></div> 330<!-- ======== END OF BOTTOM NAVBAR ======= --> 331<p class="legalCopy"><small>Copyright © 2014-2015 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> 332</body> 333</html> 334