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 (1.8.0_162) on Sat Apr 25 16:37:31 PDT 2020 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>ObjectIdGenerator (Jackson-annotations 2.11.0 API)</title> 8<meta name="date" content="2020-04-25"> 9<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 10<script type="text/javascript" src="../../../../script.js"></script> 11</head> 12<body> 13<script type="text/javascript"><!-- 14 try { 15 if (location.href.indexOf('is-external=true') == -1) { 16 parent.document.title="ObjectIdGenerator (Jackson-annotations 2.11.0 API)"; 17 } 18 } 19 catch(err) { 20 } 21//--> 22var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":10,"i5":6,"i6":10,"i7":6}; 23var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; 24var altColor = "altColor"; 25var rowColor = "rowColor"; 26var tableTab = "tableTab"; 27var activeTableTab = "activeTableTab"; 28</script> 29<noscript> 30<div>JavaScript is disabled on your browser.</div> 31</noscript> 32<!-- ========= START OF TOP NAVBAR ======= --> 33<div class="topNav"><a name="navbar.top"> 34<!-- --> 35</a> 36<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> 37<a name="navbar.top.firstrow"> 38<!-- --> 39</a> 40<ul class="navList" title="Navigation"> 41<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 42<li class="navBarCell1Rev">Class</li> 43<li><a href="class-use/ObjectIdGenerator.html">Use</a></li> 44<li><a href="package-tree.html">Tree</a></li> 45<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 46<li><a href="../../../../index-all.html">Index</a></li> 47<li><a href="../../../../help-doc.html">Help</a></li> 48</ul> 49</div> 50<div class="subNav"> 51<ul class="navList"> 52<li><a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 53<li><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.IdKey.html" title="class in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 54</ul> 55<ul class="navList"> 56<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/ObjectIdGenerator.html" target="_top">Frames</a></li> 57<li><a href="ObjectIdGenerator.html" target="_top">No Frames</a></li> 58</ul> 59<ul class="navList" id="allclasses_navbar_top"> 60<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 61</ul> 62<div> 63<script type="text/javascript"><!-- 64 allClassesLink = document.getElementById("allclasses_navbar_top"); 65 if(window==top) { 66 allClassesLink.style.display = "block"; 67 } 68 else { 69 allClassesLink.style.display = "none"; 70 } 71 //--> 72</script> 73</div> 74<div> 75<ul class="subNavList"> 76<li>Summary: </li> 77<li><a href="#nested.class.summary">Nested</a> | </li> 78<li>Field | </li> 79<li><a href="#constructor.summary">Constr</a> | </li> 80<li><a href="#method.summary">Method</a></li> 81</ul> 82<ul class="subNavList"> 83<li>Detail: </li> 84<li>Field | </li> 85<li><a href="#constructor.detail">Constr</a> | </li> 86<li><a href="#method.detail">Method</a></li> 87</ul> 88</div> 89<a name="skip.navbar.top"> 90<!-- --> 91</a></div> 92<!-- ========= END OF TOP NAVBAR ========= --> 93<!-- ======== START OF CLASS DATA ======== --> 94<div class="header"> 95<div class="subTitle">com.fasterxml.jackson.annotation</div> 96<h2 title="Class ObjectIdGenerator" class="title">Class ObjectIdGenerator<T></h2> 97</div> 98<div class="contentContainer"> 99<ul class="inheritance"> 100<li><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 101<li> 102<ul class="inheritance"> 103<li>com.fasterxml.jackson.annotation.ObjectIdGenerator<T></li> 104</ul> 105</li> 106</ul> 107<div class="description"> 108<ul class="blockList"> 109<li class="blockList"> 110<dl> 111<dt><span class="paramLabel">Type Parameters:</span></dt> 112<dd><code>T</code> - Type of Object Identifiers produced.</dd> 113</dl> 114<dl> 115<dt>All Implemented Interfaces:</dt> 116<dd><a href="https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></dd> 117</dl> 118<dl> 119<dt>Direct Known Subclasses:</dt> 120<dd><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.IntSequenceGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerators.IntSequenceGenerator</a>, <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.None.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerators.None</a>, <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.PropertyGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerators.PropertyGenerator</a>, <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.StringIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerators.StringIdGenerator</a>, <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerators.UUIDGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerators.UUIDGenerator</a></dd> 121</dl> 122<hr> 123<br> 124<pre>public abstract class <span class="typeNameLabel">ObjectIdGenerator<T></span> 125extends <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> 126implements <a href="https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> 127<div class="block">Definition of API used for constructing Object Identifiers 128 (as annotated using <a href="../../../../com/fasterxml/jackson/annotation/JsonIdentityInfo.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonIdentityInfo</code></a>). 129 Also defines factory methods used for creating instances 130 for serialization, deserialization.</div> 131<dl> 132<dt><span class="seeLabel">See Also:</span></dt> 133<dd><a href="../../../../serialized-form.html#com.fasterxml.jackson.annotation.ObjectIdGenerator">Serialized Form</a></dd> 134</dl> 135</li> 136</ul> 137</div> 138<div class="summary"> 139<ul class="blockList"> 140<li class="blockList"> 141<!-- ======== NESTED CLASS SUMMARY ======== --> 142<ul class="blockList"> 143<li class="blockList"><a name="nested.class.summary"> 144<!-- --> 145</a> 146<h3>Nested Class Summary</h3> 147<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> 148<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> 149<tr> 150<th class="colFirst" scope="col">Modifier and Type</th> 151<th class="colLast" scope="col">Class and Description</th> 152</tr> 153<tr class="altColor"> 154<td class="colFirst"><code>static class </code></td> 155<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.IdKey.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator.IdKey</a></span></code> 156<div class="block">Simple key class that can be used as a key for 157 ObjectId-to-POJO mappings, when multiple ObjectId types 158 and scopes are used.</div> 159</td> 160</tr> 161</table> 162</li> 163</ul> 164<!-- ======== CONSTRUCTOR SUMMARY ======== --> 165<ul class="blockList"> 166<li class="blockList"><a name="constructor.summary"> 167<!-- --> 168</a> 169<h3>Constructor Summary</h3> 170<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 171<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 172<tr> 173<th class="colOne" scope="col">Constructor and Description</th> 174</tr> 175<tr class="altColor"> 176<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#ObjectIdGenerator--">ObjectIdGenerator</a></span>()</code> </td> 177</tr> 178</table> 179</li> 180</ul> 181<!-- ========== METHOD SUMMARY =========== --> 182<ul class="blockList"> 183<li class="blockList"><a name="method.summary"> 184<!-- --> 185</a> 186<h3>Method Summary</h3> 187<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 188<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> 189<tr> 190<th class="colFirst" scope="col">Modifier and Type</th> 191<th class="colLast" scope="col">Method and Description</th> 192</tr> 193<tr id="i0" class="altColor"> 194<td class="colFirst"><code>abstract boolean</code></td> 195<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#canUseFor-com.fasterxml.jackson.annotation.ObjectIdGenerator-">canUseFor</a></span>(<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?> gen)</code> 196<div class="block">Method called to check whether this generator instance can 197 be used for Object Ids of specific generator type and 198 scope; determination is based by passing a configured 199 "blueprint" (prototype) instance; from which the actual 200 instances are created (using <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#newForSerialization-java.lang.Object-"><code>newForSerialization(java.lang.Object)</code></a>).</div> 201</td> 202</tr> 203<tr id="i1" class="rowColor"> 204<td class="colFirst"><code>abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a>></code></td> 205<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#forScope-java.lang.Class-">forScope</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> scope)</code> 206<div class="block">Factory method to create a blueprint instance for specified 207 scope.</div> 208</td> 209</tr> 210<tr id="i2" class="altColor"> 211<td class="colFirst"><code>abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a></code></td> 212<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#generateId-java.lang.Object-">generateId</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> forPojo)</code> 213<div class="block">Method used for generating a new Object Identifier to serialize 214 for given POJO.</div> 215</td> 216</tr> 217<tr id="i3" class="rowColor"> 218<td class="colFirst"><code>abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?></code></td> 219<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#getScope--">getScope</a></span>()</code> </td> 220</tr> 221<tr id="i4" class="altColor"> 222<td class="colFirst"><code>boolean</code></td> 223<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#isValidReferencePropertyName-java.lang.String-java.lang.Object-">isValidReferencePropertyName</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, 224 <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> parser)</code> 225<div class="block">Accessor that may be called (after verifying (via <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#maySerializeAsObject--"><code>maySerializeAsObject()</code></a>) 226 whether given name</div> 227</td> 228</tr> 229<tr id="i5" class="rowColor"> 230<td class="colFirst"><code>abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.IdKey.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator.IdKey</a></code></td> 231<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#key-java.lang.Object-">key</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</code> 232<div class="block">Method for constructing key to use for ObjectId-to-POJO maps.</div> 233</td> 234</tr> 235<tr id="i6" class="altColor"> 236<td class="colFirst"><code>boolean</code></td> 237<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#maySerializeAsObject--">maySerializeAsObject</a></span>()</code> 238<div class="block">Accessor that needs to be overridden to return <code>true</code> 239 if the Object Id may be serialized as JSON Object; used by, for example, 240 JSOG handling.</div> 241</td> 242</tr> 243<tr id="i7" class="rowColor"> 244<td class="colFirst"><code>abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a>></code></td> 245<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#newForSerialization-java.lang.Object-">newForSerialization</a></span>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> context)</code> 246<div class="block">Factory method called to create a new instance to use for 247 serialization: needed since generators may have state 248 (next id to produce).</div> 249</td> 250</tr> 251</table> 252<ul class="blockList"> 253<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> 254<!-- --> 255</a> 256<h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 257<code><a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> 258</ul> 259</li> 260</ul> 261</li> 262</ul> 263</div> 264<div class="details"> 265<ul class="blockList"> 266<li class="blockList"> 267<!-- ========= CONSTRUCTOR DETAIL ======== --> 268<ul class="blockList"> 269<li class="blockList"><a name="constructor.detail"> 270<!-- --> 271</a> 272<h3>Constructor Detail</h3> 273<a name="ObjectIdGenerator--"> 274<!-- --> 275</a> 276<ul class="blockListLast"> 277<li class="blockList"> 278<h4>ObjectIdGenerator</h4> 279<pre>public ObjectIdGenerator()</pre> 280</li> 281</ul> 282</li> 283</ul> 284<!-- ============ METHOD DETAIL ========== --> 285<ul class="blockList"> 286<li class="blockList"><a name="method.detail"> 287<!-- --> 288</a> 289<h3>Method Detail</h3> 290<a name="getScope--"> 291<!-- --> 292</a> 293<ul class="blockList"> 294<li class="blockList"> 295<h4>getScope</h4> 296<pre>public abstract <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> getScope()</pre> 297</li> 298</ul> 299<a name="canUseFor-com.fasterxml.jackson.annotation.ObjectIdGenerator-"> 300<!-- --> 301</a> 302<ul class="blockList"> 303<li class="blockList"> 304<h4>canUseFor</h4> 305<pre>public abstract boolean canUseFor(<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><?> gen)</pre> 306<div class="block">Method called to check whether this generator instance can 307 be used for Object Ids of specific generator type and 308 scope; determination is based by passing a configured 309 "blueprint" (prototype) instance; from which the actual 310 instances are created (using <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#newForSerialization-java.lang.Object-"><code>newForSerialization(java.lang.Object)</code></a>).</div> 311<dl> 312<dt><span class="returnLabel">Returns:</span></dt> 313<dd>True if this instance can be used as-is; false if not</dd> 314</dl> 315</li> 316</ul> 317<a name="maySerializeAsObject--"> 318<!-- --> 319</a> 320<ul class="blockList"> 321<li class="blockList"> 322<h4>maySerializeAsObject</h4> 323<pre>public boolean maySerializeAsObject()</pre> 324<div class="block">Accessor that needs to be overridden to return <code>true</code> 325 if the Object Id may be serialized as JSON Object; used by, for example, 326 JSOG handling. 327 The reason accessor is needed is because handling such Object Ids is 328 more complex and may incur additional buffering or performance overhead, 329 avoiding of which makes sense for common case of scalar object ids 330 (or native object ids some formats support). 331<p> 332 Default implementation returns <code>false</code>, so needs to be overridden 333 by Object-producing generators.</div> 334<dl> 335<dt><span class="simpleTagLabel">Since:</span></dt> 336<dd>2.5</dd> 337</dl> 338</li> 339</ul> 340<a name="isValidReferencePropertyName-java.lang.String-java.lang.Object-"> 341<!-- --> 342</a> 343<ul class="blockList"> 344<li class="blockList"> 345<h4>isValidReferencePropertyName</h4> 346<pre>public boolean isValidReferencePropertyName(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name, 347 <a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> parser)</pre> 348<div class="block">Accessor that may be called (after verifying (via <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html#maySerializeAsObject--"><code>maySerializeAsObject()</code></a>) 349 whether given name</div> 350<dl> 351<dt><span class="paramLabel">Parameters:</span></dt> 352<dd><code>name</code> - Name of property to check</dd> 353<dd><code>parser</code> - Parser that points to property name, in case generator needs 354 further verification (note: untyped, because <code>JsonParser</code> is defined 355 in `jackson-core`, and this package does not depend on it).</dd> 356<dt><span class="simpleTagLabel">Since:</span></dt> 357<dd>2.5</dd> 358</dl> 359</li> 360</ul> 361<a name="forScope-java.lang.Class-"> 362<!-- --> 363</a> 364<ul class="blockList"> 365<li class="blockList"> 366<h4>forScope</h4> 367<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a>> forScope(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> scope)</pre> 368<div class="block">Factory method to create a blueprint instance for specified 369 scope. Generators that do not use scope may return 'this'.</div> 370</li> 371</ul> 372<a name="newForSerialization-java.lang.Object-"> 373<!-- --> 374</a> 375<ul class="blockList"> 376<li class="blockList"> 377<h4>newForSerialization</h4> 378<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator</a><<a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a>> newForSerialization(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> context)</pre> 379<div class="block">Factory method called to create a new instance to use for 380 serialization: needed since generators may have state 381 (next id to produce). 382<p> 383 Note that actual type of 'context' is 384 <code>com.fasterxml.jackson.databind.SerializerProvider</code>, 385 but can not be declared here as type itself (as well as call 386 to this object) comes from databind package.</div> 387<dl> 388<dt><span class="paramLabel">Parameters:</span></dt> 389<dd><code>context</code> - Serialization context object used (of type 390 <code>com.fasterxml.jackson.databind.SerializerProvider</code>; 391 may be needed by more complex generators to access contextual 392 information such as configuration.</dd> 393</dl> 394</li> 395</ul> 396<a name="key-java.lang.Object-"> 397<!-- --> 398</a> 399<ul class="blockList"> 400<li class="blockList"> 401<h4>key</h4> 402<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.IdKey.html" title="class in com.fasterxml.jackson.annotation">ObjectIdGenerator.IdKey</a> key(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> key)</pre> 403<div class="block">Method for constructing key to use for ObjectId-to-POJO maps.</div> 404</li> 405</ul> 406<a name="generateId-java.lang.Object-"> 407<!-- --> 408</a> 409<ul class="blockListLast"> 410<li class="blockList"> 411<h4>generateId</h4> 412<pre>public abstract <a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.html" title="type parameter in ObjectIdGenerator">T</a> generateId(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> forPojo)</pre> 413<div class="block">Method used for generating a new Object Identifier to serialize 414 for given POJO.</div> 415<dl> 416<dt><span class="paramLabel">Parameters:</span></dt> 417<dd><code>forPojo</code> - POJO for which identifier is needed</dd> 418<dt><span class="returnLabel">Returns:</span></dt> 419<dd>Object Identifier to use.</dd> 420</dl> 421</li> 422</ul> 423</li> 424</ul> 425</li> 426</ul> 427</div> 428</div> 429<!-- ========= END OF CLASS DATA ========= --> 430<!-- ======= START OF BOTTOM NAVBAR ====== --> 431<div class="bottomNav"><a name="navbar.bottom"> 432<!-- --> 433</a> 434<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> 435<a name="navbar.bottom.firstrow"> 436<!-- --> 437</a> 438<ul class="navList" title="Navigation"> 439<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 440<li class="navBarCell1Rev">Class</li> 441<li><a href="class-use/ObjectIdGenerator.html">Use</a></li> 442<li><a href="package-tree.html">Tree</a></li> 443<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 444<li><a href="../../../../index-all.html">Index</a></li> 445<li><a href="../../../../help-doc.html">Help</a></li> 446</ul> 447</div> 448<div class="subNav"> 449<ul class="navList"> 450<li><a href="../../../../com/fasterxml/jackson/annotation/Nulls.html" title="enum in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev Class</span></a></li> 451<li><a href="../../../../com/fasterxml/jackson/annotation/ObjectIdGenerator.IdKey.html" title="class in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next Class</span></a></li> 452</ul> 453<ul class="navList"> 454<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/ObjectIdGenerator.html" target="_top">Frames</a></li> 455<li><a href="ObjectIdGenerator.html" target="_top">No Frames</a></li> 456</ul> 457<ul class="navList" id="allclasses_navbar_bottom"> 458<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 459</ul> 460<div> 461<script type="text/javascript"><!-- 462 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 463 if(window==top) { 464 allClassesLink.style.display = "block"; 465 } 466 else { 467 allClassesLink.style.display = "none"; 468 } 469 //--> 470</script> 471</div> 472<div> 473<ul class="subNavList"> 474<li>Summary: </li> 475<li><a href="#nested.class.summary">Nested</a> | </li> 476<li>Field | </li> 477<li><a href="#constructor.summary">Constr</a> | </li> 478<li><a href="#method.summary">Method</a></li> 479</ul> 480<ul class="subNavList"> 481<li>Detail: </li> 482<li>Field | </li> 483<li><a href="#constructor.detail">Constr</a> | </li> 484<li><a href="#method.detail">Method</a></li> 485</ul> 486</div> 487<a name="skip.navbar.bottom"> 488<!-- --> 489</a></div> 490<!-- ======== END OF BOTTOM NAVBAR ======= --> 491<p class="legalCopy"><small>Copyright © 2008–2020 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 492</body> 493</html> 494