• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_29) on Mon Mar 26 18:49:10 PDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<TITLE>
8JsonIdentityInfo (Jackson-annotations 2.0.0 API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-03-26">
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.0.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>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JsonIdentityInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="JsonIdentityInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91com.fasterxml.jackson.annotation</FONT>
92<BR>
93Annotation Type JsonIdentityInfo</H2>
94<HR>
95<DL>
96<DT><PRE><FONT SIZE="-1"><A HREF="http://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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>})
97<A HREF="http://docs.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://docs.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://docs.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>)
98</FONT>public @interface <B>JsonIdentityInfo</B></DL>
99</PRE>
100
101<P>
102Annotation used for indicating that values of annotated type
103 or property should be serializing so that instances either
104 contain additional object identifier (in addition actual object
105 properties), or as a reference that consists of an object id
106 that refers to a full serialization. In practice this is done
107 by serializing the first instance as full object and object
108 identity, and other references to the object as reference values.
109<p>
110 There are two main approaches to generating object identifier:
111 either using a generator (either one of standard ones, or a custom
112 generator), or using a value of a property. The latter case is
113 indicated by using a placeholder generator marker
114 <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.
115 Object id has to be serialized as a property in case of POJOs;
116 object identity is currently NOT support for JSON Array types
117 (Java arrays or Lists) or Java Map types.
118<p>
119 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>
120 indicates that no Object Id should be included or used: it is included
121 to allow suppressing Object Ids using mix-in annotations.
122<P>
123
124<P>
125<DL>
126<DT><B>Since:</B></DT>
127  <DD>2.0</DD>
128</DL>
129<HR>
130
131<P>
132<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->
133
134<A NAME="annotation_type_required_element_summary"><!-- --></A>
135<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
136<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
137<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
138<B>Required Element Summary</B></FONT></TH>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142<CODE>&nbsp;<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</A>&lt;?&gt;&gt;</CODE></FONT></TD>
143<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#generator()">generator</A></B></CODE>
144
145<BR>
146&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generator to use for producing Object Identifier for objects:
147 either one of pre-defined generators from
148 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerator</CODE></A>, or a custom generator.</TD>
149</TR>
150</TABLE>
151&nbsp;<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
152
153<A NAME="annotation_type_optional_element_summary"><!-- --></A>
154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
156<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
157<B>Optional Element Summary</B></FONT></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>&nbsp;<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
162<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#property()">property</A></B></CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of JSON property in which Object Id will reside: also,
166 if "from property" marker generator is used, identifies
167 property that will be accessed to get type id.</TD>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>&nbsp;<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;</CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html#scope()">scope</A></B></CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scope is used to define applicability of an Object Id: all ids
176 must be unique within their scope; where scope is defined
177 as combination of this value and generator type.</TD>
178</TR>
179</TABLE>
180&nbsp;
181<P>
182
183<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
184
185<A NAME="annotation_type_element_detail"><!-- --></A>
186<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
187<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
188<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
189<B>Element Detail</B></FONT></TH>
190</TR>
191</TABLE>
192
193<A NAME="generator()"><!-- --></A><H3>
194generator</H3>
195<PRE>
196public abstract <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</A>&lt;?&gt;&gt; <B>generator</B></PRE>
197<DL>
198<DD>Generator to use for producing Object Identifier for objects:
199 either one of pre-defined generators from
200 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerator</CODE></A>, or a custom generator.
201 Defined as class to instantiate.
202<p>
203 Note that special type
204 <A HREF="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation"><CODE>ObjectIdGenerators.None</CODE></A>
205 can be used to disable inclusion of Object Ids.
206<P>
207<DD><DL>
208</DL>
209</DD>
210<DD><DL>
211</DL>
212</DL>
213<A NAME="property()"><!-- --></A><H3>
214property</H3>
215<PRE>
216public abstract <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>property</B></PRE>
217<DL>
218<DD>Name of JSON property in which Object Id will reside: also,
219 if "from property" marker generator is used, identifies
220 property that will be accessed to get type id.
221 If a property is used, name must match its external
222 name (one defined by annotation, or derived from accessor
223 name as per Java Bean Introspection rules).
224<p>
225 Default value is <code>@id</code>.
226<P>
227<DD><DL>
228</DL>
229</DD>
230<DD><DL>
231</DL>
232<DL>
233<DT><B>Default:</B><DD>"@id"</DD>
234</DL>
235</DL>
236<HR>
237
238<A NAME="scope()"><!-- --></A><H3>
239scope</H3>
240<PRE>
241public abstract <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt; <B>scope</B></PRE>
242<DL>
243<DD>Scope is used to define applicability of an Object Id: all ids
244 must be unique within their scope; where scope is defined
245 as combination of this value and generator type.
246 Comparison is simple equivalence, meaning that both type
247 generator type and scope class must be the same.
248<p>
249 Scope is used for determining how many generators are needed;
250 more than one scope is typically only needed if external Object Ids
251 have overlapping value domains (i.e. are only unique within some
252 limited scope)
253<P>
254<DD><DL>
255</DL>
256</DD>
257<DD><DL>
258</DL>
259<DL>
260<DT><B>Default:</B><DD>java.lang.Object.class</DD>
261</DL>
262</DL>
263<!-- ========= END OF CLASS DATA ========= -->
264<HR>
265
266
267<!-- ======= START OF BOTTOM NAVBAR ====== -->
268<A NAME="navbar_bottom"><!-- --></A>
269<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
270<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
271<TR>
272<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
273<A NAME="navbar_bottom_firstrow"><!-- --></A>
274<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
275  <TR ALIGN="center" VALIGN="top">
276  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../com/fasterxml/jackson/annotation/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
277  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
278  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JsonIdentityInfo.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
279  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
280  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
281  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
282  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
283  </TR>
284</TABLE>
285</TD>
286<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
287</EM>
288</TD>
289</TR>
290
291<TR>
292<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
293&nbsp;<A HREF="../../../../com/fasterxml/jackson/annotation/JsonGetter.html" title="annotation in com.fasterxml.jackson.annotation"><B>PREV CLASS</B></A>&nbsp;
294&nbsp;<A HREF="../../../../com/fasterxml/jackson/annotation/JsonIgnore.html" title="annotation in com.fasterxml.jackson.annotation"><B>NEXT CLASS</B></A></FONT></TD>
295<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
296  <A HREF="../../../../index.html?com/fasterxml/jackson/annotation/JsonIdentityInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;
297&nbsp;<A HREF="JsonIdentityInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
298&nbsp;<SCRIPT type="text/javascript">
299  <!--
300  if(window==top) {
301    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
302  }
303  //-->
304</SCRIPT>
305<NOSCRIPT>
306  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
307</NOSCRIPT>
308
309
310</FONT></TD>
311</TR>
312<TR>
313<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
314  SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
315<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
316DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
317</TR>
318</TABLE>
319<A NAME="skip-navbar_bottom"></A>
320<!-- ======== END OF BOTTOM NAVBAR ======= -->
321
322<HR>
323Copyright &#169; 2012 <a href="http://fasterxml.com">fasterxml.com</a>. All Rights Reserved.
324</BODY>
325</HTML>
326