| <!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 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>PersistenceCapable (JDO API 3.2.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="PersistenceCapable (JDO API 3.2.1)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="class-use/PersistenceCapable.html">Use</a></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="../../../javax/jdo/spi/JDOPermission.html" title="class in javax.jdo.spi"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/jdo/spi/PersistenceCapable.html" target="_top">Frames</a></li> |
| <li><a href="PersistenceCapable.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </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">javax.jdo.spi</div> |
| <h2 title="Interface PersistenceCapable" class="title">Interface PersistenceCapable</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">PersistenceCapable</span></pre> |
| <div class="block">A class that can be managed by a binary-compatible JDO implementation |
| must implement this interface. |
| |
| <P>This interface defines methods that allow the implementation to manage |
| the instances. It also defines methods that allow a JDO aware |
| application to examine the runtime state of instances. For example, |
| an application can discover whether the instance is persistent, transactional, |
| dirty, new, deleted, or detached; and to get its associated |
| PersistenceManager, object identity, and version if it has one. |
| |
| <P>In the Reference Implementation, the JDO Enhancer modifies the class |
| to implement PersistenceCapable prior to loading the class into the runtime |
| environment. The Reference Enhancer also adds code to implement the |
| methods defined by PersistenceCapable. |
| |
| <P>The extra methods in the PersistenceCapable interface might be generated |
| by pre-processing a .java file, or might be generated from a tool directly. |
| The exact technique for generating the extra methods is not specified by |
| JDO. |
| |
| <P>The PersistenceCapable interface is designed to avoid name conflicts |
| in the scope of user-defined classes. All of its declared method |
| names are prefixed with 'jdo'.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Version:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Interface and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldConsumer</a></span></code> |
| <div class="block">This interface is used to store fields from the Object id instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldManager.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldManager</a></span></code> |
| <div class="block">This interface is a convenience interface that allows an instance to |
| implement both <code>ObjectIdFieldSupplier</code> and |
| <code>ObjectIdFieldConsumer</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldSupplier.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldSupplier</a></span></code> |
| <div class="block">This interface is used to provide fields to the Object id instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#CHECK_READ">CHECK_READ</a></span></code> |
| <div class="block">If jdoFieldFlags for a field includes CHECK_READ, then |
| the field has been enhanced to call the jdoStateManager on read |
| if the jdoFlags setting is not READ_OK or READ_WRITE_OK.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#CHECK_WRITE">CHECK_WRITE</a></span></code> |
| <div class="block">If jdoFieldFlags for a field includes CHECK_WRITE, |
| then the field has been enhanced to call the |
| jdoStateManager on write if the jdoFlags setting is not |
| READ_WRITE_OK;.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#LOAD_REQUIRED">LOAD_REQUIRED</a></span></code> |
| <div class="block">If jdoFlags is set to LOAD_REQUIRED, then the fields in the default fetch group |
| cannot be accessed for read or write without notifying the StateManager.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#MEDIATE_READ">MEDIATE_READ</a></span></code> |
| <div class="block">If jdoFieldFlags for a field includes MEDIATE_READ, then |
| the field has been enhanced to always call the jdoStateManager |
| on all reads.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#MEDIATE_WRITE">MEDIATE_WRITE</a></span></code> |
| <div class="block">If jdoFieldFlags for a field includes MEDIATE_WRITE, then |
| the field has been enhanced to always call the jdoStateManager |
| on all writes.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#READ_OK">READ_OK</a></span></code> |
| <div class="block">If jdoFlags is set to READ_OK, then the fields in the default fetch group |
| can be accessed for read without notifying the StateManager.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#READ_WRITE_OK">READ_WRITE_OK</a></span></code> |
| <div class="block">If jdoFlags is set to READ_WRITE_OK, then the fields in the default fetch group |
| can be accessed for read or write without notifying the StateManager.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static byte</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#SERIALIZABLE">SERIALIZABLE</a></span></code> |
| <div class="block">If jdoFieldFlags for a field includes SERIALIZABLE, |
| then the field is not declared as TRANSIENT.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== 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"> </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></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>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoCopyFields-java.lang.Object-int:A-">jdoCopyFields</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> other, |
| int[] fieldNumbers)</code> |
| <div class="block">Copy field values from another instance of the same class |
| to this instance.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoCopyKeyFieldsFromObjectId-javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer-java.lang.Object-">jdoCopyKeyFieldsFromObjectId</a></span>(<a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldConsumer</a> fm, |
| <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> oid)</code> |
| <div class="block">Copy fields to an outside consumer from the key fields in the ObjectId.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoCopyKeyFieldsToObjectId-java.lang.Object-">jdoCopyKeyFieldsToObjectId</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> oid)</code> |
| <div class="block">Copy fields from this PersistenceCapable instance to the Object Id |
| instance.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoCopyKeyFieldsToObjectId-javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier-java.lang.Object-">jdoCopyKeyFieldsToObjectId</a></span>(<a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldSupplier.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldSupplier</a> fm, |
| <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> oid)</code> |
| <div class="block">Copy fields from an outside source to the key fields in the ObjectId.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <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="../../../javax/jdo/spi/PersistenceCapable.html#jdoGetObjectId--">jdoGetObjectId</a></span>()</code> |
| <div class="block">Return a copy of the JDO identity associated with this instance.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoGetPersistenceManager--">jdoGetPersistenceManager</a></span>()</code> |
| <div class="block">Return the associated PersistenceManager if there is one.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <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="../../../javax/jdo/spi/PersistenceCapable.html#jdoGetTransactionalObjectId--">jdoGetTransactionalObjectId</a></span>()</code> |
| <div class="block">Return a copy of the JDO identity associated with this instance.</div> |
| </td> |
| </tr> |
| <tr id="i7" 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="../../../javax/jdo/spi/PersistenceCapable.html#jdoGetVersion--">jdoGetVersion</a></span>()</code> |
| <div class="block">Return the version of this instance.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsDeleted--">jdoIsDeleted</a></span>()</code> |
| <div class="block">Tests whether this object has been deleted.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsDetached--">jdoIsDetached</a></span>()</code> |
| <div class="block">Tests whether this object has been detached.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsDirty--">jdoIsDirty</a></span>()</code> |
| <div class="block">Tests whether this object is dirty.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsNew--">jdoIsNew</a></span>()</code> |
| <div class="block">Tests whether this object has been newly made persistent.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsPersistent--">jdoIsPersistent</a></span>()</code> |
| <div class="block">Tests whether this object is persistent.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoIsTransactional--">jdoIsTransactional</a></span>()</code> |
| <div class="block">Tests whether this object is transactional.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoMakeDirty-java.lang.String-">jdoMakeDirty</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> fieldName)</code> |
| <div class="block">Explicitly mark this instance and this field dirty.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewInstance-javax.jdo.spi.StateManager-">jdoNewInstance</a></span>(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm)</code> |
| <div class="block">Return a new instance of this class, with the jdoStateManager set to the |
| parameter, and jdoFlags set to LOAD_REQUIRED.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewInstance-javax.jdo.spi.StateManager-java.lang.Object-">jdoNewInstance</a></span>(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm, |
| <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> oid)</code> |
| <div class="block">Return a new instance of this class, with the jdoStateManager set to the |
| parameter, key fields initialized to the values in the oid, and jdoFlags |
| set to LOAD_REQUIRED.</div> |
| </td> |
| </tr> |
| <tr id="i17" 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="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewObjectIdInstance--">jdoNewObjectIdInstance</a></span>()</code> |
| <div class="block">Create a new instance of the |
| ObjectId class for this PersistenceCapable class and initialize |
| the key fields from the instance on which this method is called.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <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="../../../javax/jdo/spi/PersistenceCapable.html#jdoNewObjectIdInstance-java.lang.Object-">jdoNewObjectIdInstance</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> o)</code> |
| <div class="block">Create a new instance of the class used for JDO identity, using the |
| key constructor of the object id class.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoProvideField-int-">jdoProvideField</a></span>(int fieldNumber)</code> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| provide the value of the single field identified by fieldNumber.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoProvideFields-int:A-">jdoProvideFields</a></span>(int[] fieldNumbers)</code> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| provide the values of the multiple fields identified by fieldNumbers.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoReplaceField-int-">jdoReplaceField</a></span>(int fieldNumber)</code> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the value of the single field identified by number.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoReplaceFields-int:A-">jdoReplaceFields</a></span>(int[] fieldNumbers)</code> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the values of the multiple fields identified by number.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoReplaceFlags--">jdoReplaceFlags</a></span>()</code> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the value of the flags by calling back the StateManager |
| replacingFlags method.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoReplaceStateManager-javax.jdo.spi.StateManager-">jdoReplaceStateManager</a></span>(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm)</code> |
| <div class="block">This method sets the StateManager instance that manages the state |
| of this instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="READ_WRITE_OK"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>READ_WRITE_OK</h4> |
| <pre>static final byte READ_WRITE_OK</pre> |
| <div class="block">If jdoFlags is set to READ_WRITE_OK, then the fields in the default fetch group |
| can be accessed for read or write without notifying the StateManager.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.READ_WRITE_OK">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="LOAD_REQUIRED"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOAD_REQUIRED</h4> |
| <pre>static final byte LOAD_REQUIRED</pre> |
| <div class="block">If jdoFlags is set to LOAD_REQUIRED, then the fields in the default fetch group |
| cannot be accessed for read or write without notifying the StateManager.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.LOAD_REQUIRED">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="READ_OK"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>READ_OK</h4> |
| <pre>static final byte READ_OK</pre> |
| <div class="block">If jdoFlags is set to READ_OK, then the fields in the default fetch group |
| can be accessed for read without notifying the StateManager.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.READ_OK">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="CHECK_READ"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CHECK_READ</h4> |
| <pre>static final byte CHECK_READ</pre> |
| <div class="block">If jdoFieldFlags for a field includes CHECK_READ, then |
| the field has been enhanced to call the jdoStateManager on read |
| if the jdoFlags setting is not READ_OK or READ_WRITE_OK.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.CHECK_READ">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MEDIATE_READ"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MEDIATE_READ</h4> |
| <pre>static final byte MEDIATE_READ</pre> |
| <div class="block">If jdoFieldFlags for a field includes MEDIATE_READ, then |
| the field has been enhanced to always call the jdoStateManager |
| on all reads.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.MEDIATE_READ">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="CHECK_WRITE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CHECK_WRITE</h4> |
| <pre>static final byte CHECK_WRITE</pre> |
| <div class="block">If jdoFieldFlags for a field includes CHECK_WRITE, |
| then the field has been enhanced to call the |
| jdoStateManager on write if the jdoFlags setting is not |
| READ_WRITE_OK;.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.CHECK_WRITE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="MEDIATE_WRITE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>MEDIATE_WRITE</h4> |
| <pre>static final byte MEDIATE_WRITE</pre> |
| <div class="block">If jdoFieldFlags for a field includes MEDIATE_WRITE, then |
| the field has been enhanced to always call the jdoStateManager |
| on all writes.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.MEDIATE_WRITE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SERIALIZABLE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SERIALIZABLE</h4> |
| <pre>static final byte SERIALIZABLE</pre> |
| <div class="block">If jdoFieldFlags for a field includes SERIALIZABLE, |
| then the field is not declared as TRANSIENT.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../constant-values.html#javax.jdo.spi.PersistenceCapable.SERIALIZABLE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="jdoGetPersistenceManager--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoGetPersistenceManager</h4> |
| <pre><a href="../../../javax/jdo/PersistenceManager.html" title="interface in javax.jdo">PersistenceManager</a> jdoGetPersistenceManager()</pre> |
| <div class="block">Return the associated PersistenceManager if there is one. |
| Transactional and persistent instances return the associated |
| PersistenceManager. |
| |
| <P>Transient non-transactional instances return null. |
| <P>This method always delegates to the StateManager if it is non-null.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the PersistenceManager associated with this instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoReplaceStateManager-javax.jdo.spi.StateManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoReplaceStateManager</h4> |
| <pre>void jdoReplaceStateManager(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></pre> |
| <div class="block">This method sets the StateManager instance that manages the state |
| of this instance. This method is normally used by the StateManager |
| during the process of making an instance persistent, transient, |
| or transactional. |
| |
| The caller of this method must have JDOPermission for the instance, |
| if the instance is not already owned by a StateManager. |
| If the parameter is null, and the StateManager approves the change, |
| then the jdoFlags field will be reset to READ_WRITE_OK. |
| If the parameter is not null, and the security manager approves |
| the change, then the jdoFlags field will be reset to LOAD_REQUIRED.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sm</code> - The StateManager which will own this instance, or null |
| to reset the instance to transient state</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" title="class or interface in java.lang">SecurityException</a></code> - if the caller does not have JDOPermission</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/spi/JDOPermission.html" title="class in javax.jdo.spi"><code>JDOPermission</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoProvideField-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoProvideField</h4> |
| <pre>void jdoProvideField(int fieldNumber)</pre> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| provide the value of the single field identified by fieldNumber.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fieldNumber</code> - the field whose value is to be provided by |
| a callback to the StateManager's |
| providedXXXField method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoProvideFields-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoProvideFields</h4> |
| <pre>void jdoProvideFields(int[] fieldNumbers)</pre> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| provide the values of the multiple fields identified by fieldNumbers.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fieldNumbers</code> - the fields whose values are to be provided by |
| multiple callbacks to the StateManager's |
| providedXXXField method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoReplaceField-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoReplaceField</h4> |
| <pre>void jdoReplaceField(int fieldNumber)</pre> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the value of the single field identified by number.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fieldNumber</code> - the field whose value is to be replaced by |
| a callback to the StateManager's |
| replacingXXXField method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoReplaceFields-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoReplaceFields</h4> |
| <pre>void jdoReplaceFields(int[] fieldNumbers)</pre> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the values of the multiple fields identified by number.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fieldNumbers</code> - the fields whose values are to be replaced by |
| multiple callbacks to the StateManager's |
| replacingXXXField method</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoReplaceFlags--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoReplaceFlags</h4> |
| <pre>void jdoReplaceFlags()</pre> |
| <div class="block">The owning StateManager uses this method to ask the instance to |
| replace the value of the flags by calling back the StateManager |
| replacingFlags method.</div> |
| </li> |
| </ul> |
| <a name="jdoCopyFields-java.lang.Object-int:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoCopyFields</h4> |
| <pre>void jdoCopyFields(<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> other, |
| int[] fieldNumbers)</pre> |
| <div class="block">Copy field values from another instance of the same class |
| to this instance. |
| <P>This method will throw an exception if the other instance is |
| not managed by the same StateManager as this instance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>other</code> - the PC instance from which field values are to be copied</dd> |
| <dd><code>fieldNumbers</code> - the field numbers to be copied into this instance</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoMakeDirty-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoMakeDirty</h4> |
| <pre>void jdoMakeDirty(<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> fieldName)</pre> |
| <div class="block">Explicitly mark this instance and this field dirty. |
| Normally, PersistenceCapable classes are able to detect changes made |
| to their fields. However, if a reference to an array is given to a |
| method outside the class, and the array is modified, then the |
| persistent instance is not aware of the change. This API allows the |
| application to notify the instance that a change was made to a field. |
| |
| <P>The field name should be the fully qualified name, including package |
| name and class name of the class declaring the field. This allows |
| unambiguous identification of the field to be marked dirty. |
| If multiple classes declare the same field, and |
| if the package and class name are not provided by the parameter in |
| this API, then the field marked |
| dirty is the field declared by the most derived class. |
| <P>Transient instances ignore this method. |
| <P></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>fieldName</code> - the name of the field to be marked dirty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoGetObjectId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoGetObjectId</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> jdoGetObjectId()</pre> |
| <div class="block">Return a copy of the JDO identity associated with this instance. |
| |
| <P>Persistent instances of PersistenceCapable classes have a JDO identity |
| managed by the PersistenceManager. This method returns a copy of the |
| ObjectId that represents the JDO identity. |
| |
| <P>Transient instances return null. |
| |
| <P>The ObjectId may be serialized |
| and later restored, and used with a PersistenceManager from the same JDO |
| implementation to locate a persistent instance with the same data store |
| identity. |
| |
| <P>If the JDO identity is managed by the application, then the ObjectId may |
| be used with a PersistenceManager from any JDO implementation that supports |
| the PersistenceCapable class. |
| |
| <P>If the JDO identity is not managed by the application or the data store, |
| then the ObjectId returned is only valid within the current transaction. |
| <P>If the JDO identity is being changed in the transaction, this method |
| returns the object id as of the beginning of the current transaction.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a copy of the ObjectId of this instance as of the beginning of the transaction.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/PersistenceManager.html#getObjectId-java.lang.Object-"><code>PersistenceManager.getObjectId(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#getObjectById-java.lang.Object-boolean-"><code>PersistenceManager.getObjectById(Object oid, boolean validate)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoGetTransactionalObjectId--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoGetTransactionalObjectId</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> jdoGetTransactionalObjectId()</pre> |
| <div class="block">Return a copy of the JDO identity associated with this instance. |
| This method is the same as jdoGetObjectId if the identity of the |
| instance has not changed in the current transaction. |
| <P>If the JDO identity is being changed in the transaction, this method |
| returns the current object id as modified in the current transaction.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a copy of the ObjectId of this instance as modified in the transaction.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoGetObjectId--"><code>jdoGetObjectId()</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#getObjectId-java.lang.Object-"><code>PersistenceManager.getObjectId(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#getObjectById-java.lang.Object-boolean-"><code>PersistenceManager.getObjectById(Object oid, boolean validate)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoGetVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoGetVersion</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> jdoGetVersion()</pre> |
| <div class="block">Return the version of this instance.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the version</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsDirty--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsDirty</h4> |
| <pre>boolean jdoIsDirty()</pre> |
| <div class="block">Tests whether this object is dirty. |
| |
| Instances that have been modified, deleted, or newly |
| made persistent in the current transaction return true. |
| |
| <P>Transient instances return false. |
| <P></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance has been modified in the current transaction.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isDirty-java.lang.Object-"><code>JDOHelper.isDirty(Object pc)</code></a>, |
| <a href="../../../javax/jdo/JDOHelper.html#makeDirty-java.lang.Object-java.lang.String-"><code>JDOHelper.makeDirty(Object pc, String fieldName)</code></a>, |
| <a href="../../../javax/jdo/spi/PersistenceCapable.html#jdoMakeDirty-java.lang.String-"><code>jdoMakeDirty(String fieldName)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsTransactional--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsTransactional</h4> |
| <pre>boolean jdoIsTransactional()</pre> |
| <div class="block">Tests whether this object is transactional. |
| |
| Instances whose state is associated with the current transaction |
| return true. |
| |
| <P>Transient instances return false. |
| <P></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance is transactional.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isTransactional-java.lang.Object-"><code>JDOHelper.isTransactional(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#makeTransactional-java.lang.Object-"><code>PersistenceManager.makeTransactional(Object pc)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsPersistent--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsPersistent</h4> |
| <pre>boolean jdoIsPersistent()</pre> |
| <div class="block">Tests whether this object is persistent. |
| Instances that represent persistent objects in the data store |
| return true.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance is persistent.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isPersistent-java.lang.Object-"><code>JDOHelper.isPersistent(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#makePersistent-T-"><code>PersistenceManager.makePersistent(Object pc)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsNew--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsNew</h4> |
| <pre>boolean jdoIsNew()</pre> |
| <div class="block">Tests whether this object has been newly made persistent. |
| |
| Instances that have been made persistent in the current transaction |
| return true. |
| |
| <P>Transient instances return false. |
| <P></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance was made persistent |
| in the current transaction.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isNew-java.lang.Object-"><code>JDOHelper.isNew(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#makePersistent-T-"><code>PersistenceManager.makePersistent(Object pc)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsDeleted--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsDeleted</h4> |
| <pre>boolean jdoIsDeleted()</pre> |
| <div class="block">Tests whether this object has been deleted. |
| |
| Instances that have been deleted in the current transaction return true. |
| |
| <P>Transient instances return false. |
| <P></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance was deleted |
| in the current transaction.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isDeleted-java.lang.Object-"><code>JDOHelper.isDeleted(Object pc)</code></a>, |
| <a href="../../../javax/jdo/PersistenceManager.html#deletePersistent-java.lang.Object-"><code>PersistenceManager.deletePersistent(Object pc)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoIsDetached--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoIsDetached</h4> |
| <pre>boolean jdoIsDetached()</pre> |
| <div class="block">Tests whether this object has been detached. |
| |
| Instances that have been detached return true. |
| |
| <P>Transient instances return false. |
| <P></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this instance is detached.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/JDOHelper.html#isDetached-java.lang.Object-"><code>JDOHelper.isDetached(Object pc)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoNewInstance-javax.jdo.spi.StateManager-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoNewInstance</h4> |
| <pre><a href="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</a> jdoNewInstance(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm)</pre> |
| <div class="block">Return a new instance of this class, with the jdoStateManager set to the |
| parameter, and jdoFlags set to LOAD_REQUIRED. |
| <P>This method is used as a performance optimization as an alternative to |
| using reflection to construct a new instance. It is used by the |
| JDOImplHelper class method newInstance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sm</code> - the StateManager that will own the new instance.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new instance of this class.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/spi/JDOImplHelper.html#newInstance-java.lang.Class-javax.jdo.spi.StateManager-"><code>JDOImplHelper.newInstance(Class pcClass, StateManager sm)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoNewInstance-javax.jdo.spi.StateManager-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoNewInstance</h4> |
| <pre><a href="../../../javax/jdo/spi/PersistenceCapable.html" title="interface in javax.jdo.spi">PersistenceCapable</a> jdoNewInstance(<a href="../../../javax/jdo/spi/StateManager.html" title="interface in javax.jdo.spi">StateManager</a> sm, |
| <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> oid)</pre> |
| <div class="block">Return a new instance of this class, with the jdoStateManager set to the |
| parameter, key fields initialized to the values in the oid, and jdoFlags |
| set to LOAD_REQUIRED. |
| <P>This method is used as a performance optimization as an alternative to |
| using reflection to construct a new instance of a class that uses |
| application identity. It is used by the |
| JDOImplHelper class method newInstance.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sm</code> - the StateManager that will own the new instance.</dd> |
| <dd><code>oid</code> - an instance of the object id class (application identity).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new instance of this class.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../javax/jdo/spi/JDOImplHelper.html#newInstance-java.lang.Class-javax.jdo.spi.StateManager-"><code>JDOImplHelper.newInstance(Class pcClass, StateManager sm)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoNewObjectIdInstance--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoNewObjectIdInstance</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> jdoNewObjectIdInstance()</pre> |
| <div class="block">Create a new instance of the |
| ObjectId class for this PersistenceCapable class and initialize |
| the key fields from the instance on which this method is called. |
| This method creates a new instance of the class used for JDO identity. |
| It is intended only for application identity. If the class has been |
| enhanced for datastore identity, or if the class is abstract, |
| null is returned. |
| <P>For classes using single field identity, this method must be called |
| on an instance of a persistence-capable class with its primary key |
| field initialized (not null), or a |
| <code>JDONullIdentityException</code> is thrown. |
| <P>The instance returned is initialized with the value(s) of the |
| primary key field(s) of the instance on which the method is called.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new instance created.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoNewObjectIdInstance-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoNewObjectIdInstance</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> jdoNewObjectIdInstance(<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> o)</pre> |
| <div class="block">Create a new instance of the class used for JDO identity, using the |
| key constructor of the object id class. It is intended for single |
| field identity. The identity |
| instance returned has no relationship with the values of the primary key |
| fields of the persistence-capable instance on which the method is called. |
| If the key is the wrong class for the object id class, null is returned. |
| <P>For classes that use single field identity, if the parameter is |
| of one of the following types, the behavior must be as specified: |
| <ul><li><code>Number</code> or <code>Character</code>: the |
| parameter must be the single field |
| type or the wrapper class of the primitive field type; the parameter |
| is passed to the single field identity constructor |
| </li><li><code>ObjectIdFieldSupplier</code>: the field value |
| is fetched from the <code>ObjectIdFieldSupplier</code> and passed to the |
| single field identity constructor |
| </li><li><code>String</code>: the String is passed to the |
| single field identity constructor |
| </li></ul></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>o</code> - the object identity constructor parameter</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new instance created.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>2.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoCopyKeyFieldsToObjectId-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoCopyKeyFieldsToObjectId</h4> |
| <pre>void jdoCopyKeyFieldsToObjectId(<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> oid)</pre> |
| <div class="block">Copy fields from this PersistenceCapable instance to the Object Id |
| instance. For classes using single field identity, this method always |
| throws <code>JDOUserException</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>oid</code> - the ObjectId target of the key fields</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoCopyKeyFieldsToObjectId-javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdoCopyKeyFieldsToObjectId</h4> |
| <pre>void jdoCopyKeyFieldsToObjectId(<a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldSupplier.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldSupplier</a> fm, |
| <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> oid)</pre> |
| <div class="block">Copy fields from an outside source to the key fields in the ObjectId. |
| This method is generated in the <code>PersistenceCapable</code> |
| class to generate |
| a call to the field manager for each key field in the ObjectId. For |
| example, an ObjectId class that has three key fields <code>(int id, |
| String name, and Float salary)</code> would have the method generated: |
| <code> |
| void jdoCopyKeyFieldsToObjectId |
| (ObjectIdFieldSupplier fm, Object objectId) { |
| EmployeeKey oid = (EmployeeKey)objectId; |
| oid.id = fm.fetchIntField (0); |
| oid.name = fm.fetchStringField (1); |
| oid.salary = fm.fetchObjectField (2); |
| }</code> |
| <P>The implementation is responsible for implementing the |
| <code>ObjectIdFieldSupplier</code> to produce the values |
| for the key fields. |
| <P>For classes using single field identity, this method always |
| throws <code>JDOUserException</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>oid</code> - the ObjectId target of the copy.</dd> |
| <dd><code>fm</code> - the field supplier that supplies the field values.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="jdoCopyKeyFieldsFromObjectId-javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer-java.lang.Object-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>jdoCopyKeyFieldsFromObjectId</h4> |
| <pre>void jdoCopyKeyFieldsFromObjectId(<a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi">PersistenceCapable.ObjectIdFieldConsumer</a> fm, |
| <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> oid)</pre> |
| <div class="block">Copy fields to an outside consumer from the key fields in the ObjectId. |
| This method is generated in the <code>PersistenceCapable</code> |
| class to generate |
| a call to the field manager for each key field in the ObjectId. For |
| example, an ObjectId class that has three key fields <code>(int id, |
| String name, and Float salary)</code> would have the method generated: |
| <code> |
| void copyKeyFieldsFromObjectId(ObjectIdFieldConsumer fm, Object objectId) { |
| EmployeeKey oid = (EmployeeKey)objectId; |
| fm.storeIntField (0, oid.id); |
| fm.storeStringField (1, oid.name); |
| fm.storeObjectField (2, oid.salary); |
| }</code> |
| <P>The implementation is responsible for implementing the |
| <code>ObjectIdFieldConsumer</code> to store the values for the |
| key fields.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>oid</code> - the ObjectId source of the copy.</dd> |
| <dd><code>fm</code> - the field manager that receives the field values.</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="class-use/PersistenceCapable.html">Use</a></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="../../../javax/jdo/spi/JDOPermission.html" title="class in javax.jdo.spi"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../javax/jdo/spi/PersistenceCapable.ObjectIdFieldConsumer.html" title="interface in javax.jdo.spi"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?javax/jdo/spi/PersistenceCapable.html" target="_top">Frames</a></li> |
| <li><a href="PersistenceCapable.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.html">All 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: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2005–2022 <a href="http://www.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |