1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!--NewPage--> 3<HTML> 4<HEAD> 5<!-- Generated by javadoc (build 1.6.0_35) on Fri Oct 05 20:53:29 PDT 2012 --> 6<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<TITLE> 8JsonIdentityInfo (Jackson-annotations 2.1.0 API) 9</TITLE> 10 11<META NAME="date" CONTENT="2012-10-05"> 12 13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> 14 15<SCRIPT type="text/javascript"> 16function windowTitle() 17{ 18 if (location.href.indexOf('is-external=true') == -1) { 19 parent.document.title="JsonIdentityInfo (Jackson-annotations 2.1.0 API)"; 20 } 21} 22</SCRIPT> 23<NOSCRIPT> 24</NOSCRIPT> 25 26</HEAD> 27 28<BODY BGCOLOR="white" onload="windowTitle();"> 29<HR> 30 31 32<!-- ========= START OF TOP NAVBAR ======= --> 33<A NAME="navbar_top"><!-- --></A> 34<A HREF="#skip-navbar_top" title="Skip navigation links"></A> 35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 36<TR> 37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 38<A NAME="navbar_top_firstrow"><!-- --></A> 39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 40 <TR ALIGN="center" VALIGN="top"> 41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/fasterxml/jackson/annotation/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonIdentityInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 48 </TR> 49</TABLE> 50</TD> 51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><script type="text/javascript"><!-- 52google_ad_client = "pub-1467773697956887"; 53/* Jackson-ad-small */ 54google_ad_slot = "6699487946"; 55google_ad_width = 234; 56google_ad_height = 60; 57//--> 58</script> 59<script type="text/javascript" 60src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 61</script> 62</TD> 63</TR> 64 65<TR> 66<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 67 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A> 68 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD> 69<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 70 <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top"><B>FRAMES</B></A> 71 <A HREF="JsonIdentityInfo.html" target="_top"><B>NO FRAMES</B></A> 72 <SCRIPT type="text/javascript"> 73 <!-- 74 if(window==top) { 75 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 76 } 77 //--> 78</SCRIPT> 79<NOSCRIPT> 80 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 81</NOSCRIPT> 82 83 84</FONT></TD> 85</TR> 86<TR> 87<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 88 SUMMARY: <A HREF="#annotation_type_required_element_summary">REQUIRED</A> | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 89<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 90DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 91</TR> 92</TABLE> 93<A NAME="skip-navbar_top"></A> 94<!-- ========= END OF TOP NAVBAR ========= --> 95 96<HR> 97<!-- ======== START OF CLASS DATA ======== --> 98<H2> 99<FONT SIZE="-1"> 100com.fasterxml.jackson.annotation</FONT> 101<BR> 102Annotation Type JsonIdentityInfo</H2> 103<HR> 104<DL> 105<DT><PRE><FONT SIZE="-1"><A HREF="http://download.oracle.com/javase/1.5.0/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/1.5.0/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/1.5.0/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/1.5.0/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/1.5.0/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/1.5.0/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/1.5.0/docs/api/java/lang/annotation/ElementType.html?is-external=true#PARAMETER" title="class or interface in java.lang.annotation">PARAMETER</A>}) 106<A HREF="http://download.oracle.com/javase/1.5.0/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/1.5.0/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/1.5.0/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</A>) 107</FONT>public @interface <B>JsonIdentityInfo</B></DL> 108</PRE> 109 110<P> 111Annotation used for indicating that values of annotated type 112 or property should be serializing so that instances either 113 contain additional object identifier (in addition actual object 114 properties), or as a reference that consists of an object id 115 that refers to a full serialization. In practice this is done 116 by serializing the first instance as full object and object 117 identity, and other references to the object as reference values. 118<p> 119 There are two main approaches to generating object identifier: 120 either using a generator (either one of standard ones, or a custom 121 generator), or using a value of a property. The latter case is 122 indicated by using a placeholder generator marker 123 <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. 124 Object id has to be serialized as a property in case of POJOs; 125 object identity is currently NOT support for JSON Array types 126 (Java arrays or Lists) or Java Map types. 127<p> 128 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> 129 indicates that no Object Id should be included or used: it is included 130 to allow suppressing Object Ids using mix-in annotations. 131<P> 132 133<P> 134<DL> 135<DT><B>Since:</B></DT> 136 <DD>2.0</DD> 137</DL> 138<HR> 139 140<P> 141<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== --> 142 143<A NAME="annotation_type_required_element_summary"><!-- --></A> 144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 145<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 146<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 147<B>Required Element Summary</B></FONT></TH> 148</TR> 149<TR BGCOLOR="white" CLASS="TableRowColor"> 150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 151<CODE> <A HREF="http://download.oracle.com/javase/1.5.0/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></FONT></TD> 152<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#generator()">generator</A></B></CODE> 153 154<BR> 155 Generator to use for producing Object Identifier for objects: 156 either one of pre-defined generators from 157 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerator</CODE></A>, or a custom generator.</TD> 158</TR> 159</TABLE> 160 <!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 161 162<A NAME="annotation_type_optional_element_summary"><!-- --></A> 163<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 164<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 165<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 166<B>Optional Element Summary</B></FONT></TH> 167</TR> 168<TR BGCOLOR="white" CLASS="TableRowColor"> 169<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 170<CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> 171<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#property()">property</A></B></CODE> 172 173<BR> 174 Name of JSON property in which Object Id will reside: also, 175 if "from property" marker generator is used, identifies 176 property that will be accessed to get type id.</TD> 177</TR> 178<TR BGCOLOR="white" CLASS="TableRowColor"> 179<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 180<CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?></CODE></FONT></TD> 181<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#scope()">scope</A></B></CODE> 182 183<BR> 184 Scope is used to define applicability of an Object Id: all ids 185 must be unique within their scope; where scope is defined 186 as combination of this value and generator type.</TD> 187</TR> 188</TABLE> 189 190<P> 191 192<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 193 194<A NAME="annotation_type_element_detail"><!-- --></A> 195<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 196<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 197<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 198<B>Element Detail</B></FONT></TH> 199</TR> 200</TABLE> 201 202<A NAME="generator()"><!-- --></A><H3> 203generator</H3> 204<PRE> 205public abstract <A HREF="http://download.oracle.com/javase/1.5.0/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><?>> <B>generator</B></PRE> 206<DL> 207<DD>Generator to use for producing Object Identifier for objects: 208 either one of pre-defined generators from 209 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerator</CODE></A>, or a custom generator. 210 Defined as class to instantiate. 211<p> 212 Note that special type 213 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerators.None</CODE></A> 214 can be used to disable inclusion of Object Ids. 215<P> 216<DD><DL> 217</DL> 218</DD> 219<DD><DL> 220</DL> 221</DL> 222<A NAME="property()"><!-- --></A><H3> 223property</H3> 224<PRE> 225public abstract <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>property</B></PRE> 226<DL> 227<DD>Name of JSON property in which Object Id will reside: also, 228 if "from property" marker generator is used, identifies 229 property that will be accessed to get type id. 230 If a property is used, name must match its external 231 name (one defined by annotation, or derived from accessor 232 name as per Java Bean Introspection rules). 233<p> 234 Default value is <code>@id</code>. 235<P> 236<DD><DL> 237</DL> 238</DD> 239<DD><DL> 240</DL> 241<DL> 242<DT><B>Default:</B><DD>"@id"</DD> 243</DL> 244</DL> 245<HR> 246 247<A NAME="scope()"><!-- --></A><H3> 248scope</H3> 249<PRE> 250public abstract <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> <B>scope</B></PRE> 251<DL> 252<DD>Scope is used to define applicability of an Object Id: all ids 253 must be unique within their scope; where scope is defined 254 as combination of this value and generator type. 255 Comparison is simple equivalence, meaning that both type 256 generator type and scope class must be the same. 257<p> 258 Scope is used for determining how many generators are needed; 259 more than one scope is typically only needed if external Object Ids 260 have overlapping value domains (i.e. are only unique within some 261 limited scope) 262<P> 263<DD><DL> 264</DL> 265</DD> 266<DD><DL> 267</DL> 268<DL> 269<DT><B>Default:</B><DD>java.lang.Object.class</DD> 270</DL> 271</DL> 272<!-- ========= END OF CLASS DATA ========= --> 273<HR> 274 275 276<!-- ======= START OF BOTTOM NAVBAR ====== --> 277<A NAME="navbar_bottom"><!-- --></A> 278<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 279<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 280<TR><td rowspan='3'><script type="text/javascript"><!-- 281google_ad_client = "pub-1467773697956887"; 282/* Jackson-ad-small */ 283google_ad_slot = "6699487946"; 284google_ad_width = 234; 285google_ad_height = 60; 286//--> 287</script> 288<script type="text/javascript" 289src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 290</script> 291<!-- GA --> 292<script type="text/javascript"> 293var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 294document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 295</script> 296<script type="text/javascript"> 297try { 298var pageTracker = _gat._getTracker("UA-140287-6"); 299pageTracker._trackPageview(); 300} catch(err) {} 301</script> 302</td> 303<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 304<A NAME="navbar_bottom_firstrow"><!-- --></A> 305<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 306 <TR ALIGN="center" VALIGN="top"> 307 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../com/fasterxml/jackson/annotation/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 308 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 309 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JsonIdentityInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 310 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 311 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 312 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 313 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 314 </TR> 315</TABLE> 316</TD> 317<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 318</EM> 319</TD> 320</TR> 321 322<TR> 323<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 324 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A> 325 <A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityReference.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD> 326<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 327 <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top"><B>FRAMES</B></A> 328 <A HREF="JsonIdentityInfo.html" target="_top"><B>NO FRAMES</B></A> 329 <SCRIPT type="text/javascript"> 330 <!-- 331 if(window==top) { 332 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 333 } 334 //--> 335</SCRIPT> 336<NOSCRIPT> 337 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> 338</NOSCRIPT> 339 340 341</FONT></TD> 342</TR> 343<TR> 344<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 345 SUMMARY: <A HREF="#annotation_type_required_element_summary">REQUIRED</A> | <A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD> 346<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 347DETAIL: <A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD> 348</TR> 349</TABLE> 350<A NAME="skip-navbar_bottom"></A> 351<!-- ======== END OF BOTTOM NAVBAR ======= --> 352 353<HR> 354Copyright © 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved. 355</BODY> 356</HTML> 357