diff options
author | Jesse Morgan <morganjm@amazon.com> | 2013-12-03 14:03:28 -0800 |
---|---|---|
committer | Jesse Morgan <morganjm@amazon.com> | 2013-12-03 14:03:28 -0800 |
commit | d479253768d296a40b4f699e1de9b03c7146a97a (patch) | |
tree | 208e70d81fc3e477a37d3f9ca6475c39bb6410d3 /apidocs/com/amazon/carbonado/Storable.html |
Adding javadocs and Carbonado User Guidegh-pages
Diffstat (limited to 'apidocs/com/amazon/carbonado/Storable.html')
-rw-r--r-- | apidocs/com/amazon/carbonado/Storable.html | 1116 |
1 files changed, 1116 insertions, 0 deletions
diff --git a/apidocs/com/amazon/carbonado/Storable.html b/apidocs/com/amazon/carbonado/Storable.html new file mode 100644 index 0000000..d6bd6ba --- /dev/null +++ b/apidocs/com/amazon/carbonado/Storable.html @@ -0,0 +1,1116 @@ +<!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 (version 1.7.0_25) on Tue Dec 03 13:53:40 PST 2013 --> +<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> +<title>Storable (Carbonado 1.2.3 API)</title> +<meta name="date" content="2013-12-03"> +<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> +</head> +<body> +<script type="text/javascript"><!-- + if (location.href.indexOf('is-external=true') == -1) { + parent.document.title="Storable (Carbonado 1.2.3 API)"; + } +//--> +</script> +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<!-- ========= START OF TOP NAVBAR ======= --> +<div class="topNav"><a name="navbar_top"> +<!-- --> +</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/Storable.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-files/index-1.html">Index</a></li> +<li><a href="../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../com/amazon/carbonado/Sequence.html" title="annotation in com.amazon.carbonado"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../com/amazon/carbonado/Storage.html" title="interface in com.amazon.carbonado"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../index.html?com/amazon/carbonado/Storable.html" target="_top">Frames</a></li> +<li><a href="Storable.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>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </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">com.amazon.carbonado</div> +<h2 title="Interface Storable" class="title">Interface Storable<S extends Storable<S>></h2> +</div> +<div class="contentContainer"> +<div class="description"> +<ul class="blockList"> +<li class="blockList"> +<dl> +<dt>All Known Subinterfaces:</dt> +<dd><a href="../../../com/amazon/carbonado/repo/indexed/StoredIndexInfo.html" title="interface in com.amazon.carbonado.repo.indexed">StoredIndexInfo</a>, <a href="../../../com/amazon/carbonado/layout/StoredLayout.html" title="interface in com.amazon.carbonado.layout">StoredLayout</a>, <a href="../../../com/amazon/carbonado/layout/StoredLayoutEquivalence.html" title="interface in com.amazon.carbonado.layout">StoredLayoutEquivalence</a>, <a href="../../../com/amazon/carbonado/layout/StoredLayoutProperty.html" title="interface in com.amazon.carbonado.layout">StoredLayoutProperty</a>, <a href="../../../com/amazon/carbonado/spi/StoredSequence.html" title="interface in com.amazon.carbonado.spi">StoredSequence</a>, <a href="../../../com/amazon/carbonado/sequence/StoredSequence.html" title="interface in com.amazon.carbonado.sequence">StoredSequence</a></dd> +</dl> +<dl> +<dt>All Known Implementing Classes:</dt> +<dd><a href="../../../com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.html" title="class in com.amazon.carbonado.repo.sleepycat">StoredDatabaseInfo</a>, <a href="../../../com/amazon/carbonado/spi/StoredLob.html" title="class in com.amazon.carbonado.spi">StoredLob</a>, <a href="../../../com/amazon/carbonado/spi/StoredLob.Block.html" title="class in com.amazon.carbonado.spi">StoredLob.Block</a></dd> +</dl> +<hr> +<br> +<pre>public interface <span class="strong">Storable<S extends Storable<S>></span></pre> +<div class="block">A data access object in a <a href="../../../com/amazon/carbonado/Repository.html" title="interface in com.amazon.carbonado"><code>Repository</code></a>. User defined storables must + either extend or implement this interface via an interface or abstract + class. Abstract bean properties defined in the storable are persisted into + the repository. At least one property must be annotated as the <a href="../../../com/amazon/carbonado/PrimaryKey.html" title="annotation in com.amazon.carbonado"><code>PrimaryKey</code></a>. At most one property may be annotated as being the <a href="../../../com/amazon/carbonado/Version.html" title="annotation in com.amazon.carbonado"><code>Version</code></a> property. + + <p>Storable instances are mutable, but they must be thread-safe. Although + race conditions are possible if multiple threads are mutating the Storable, + the Storable instance will not get into a corrupt state.</div> +<dl><dt><span class="strong">Author:</span></dt> + <dd>Brian S O'Neill, Don Schneider</dd> +<dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Alias.html" title="annotation in com.amazon.carbonado"><code>Alias</code></a>, +<a href="../../../com/amazon/carbonado/Indexes.html" title="annotation in com.amazon.carbonado"><code>Indexes</code></a>, +<a href="../../../com/amazon/carbonado/Join.html" title="annotation in com.amazon.carbonado"><code>Join</code></a>, +<a href="../../../com/amazon/carbonado/Nullable.html" title="annotation in com.amazon.carbonado"><code>Nullable</code></a>, +<a href="../../../com/amazon/carbonado/PrimaryKey.html" title="annotation in com.amazon.carbonado"><code>PrimaryKey</code></a>, +<a href="../../../com/amazon/carbonado/Version.html" title="annotation in com.amazon.carbonado"><code>Version</code></a></dd></dl> +</li> +</ul> +</div> +<div class="summary"> +<ul class="blockList"> +<li class="blockList"> +<!-- ========== METHOD SUMMARY =========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_summary"> +<!-- --> +</a> +<h3>Method Summary</h3> +<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> +<caption><span>Methods</span><span class="tabEnd"> </span></caption> +<tr> +<th class="colFirst" scope="col">Modifier and Type</th> +<th class="colLast" scope="col">Method and Description</th> +</tr> +<tr class="altColor"> +<td class="colFirst"><code><a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a></code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copy()">copy</a></strong>()</code> +<div class="block">Returns an exact shallow copy of this object, including the state.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copyAllProperties(S)">copyAllProperties</a></strong>(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</code> +<div class="block">Copies all supported properties, skipping any that are uninitialized.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copyDirtyProperties(S)">copyDirtyProperties</a></strong>(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</code> +<div class="block">Copies all supported non-primary key properties which are + dirty.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copyPrimaryKeyProperties(S)">copyPrimaryKeyProperties</a></strong>(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</code> +<div class="block">Copies all supported primary key properties, skipping any that are + uninitialized.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copyUnequalProperties(S)">copyUnequalProperties</a></strong>(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</code> +<div class="block">Copies all supported non-primary key properties which are unequal, + skipping any that are uninitialized.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#copyVersionProperty(S)">copyVersionProperty</a></strong>(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</code> +<div class="block">Copies the optional version property, unless it is uninitialized.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#delete()">delete</a></strong>()</code> +<div class="block">Deletes this object from the storage layer by its primary key, + regardless of whether this object has actually been loaded or not.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#equalPrimaryKeys(java.lang.Object)">equalPrimaryKeys</a></strong>(java.lang.Object obj)</code> +<div class="block">True if the supported properties which participate in the primary key + are equal.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#equalProperties(java.lang.Object)">equalProperties</a></strong>(java.lang.Object obj)</code> +<div class="block">True if all supported properties for this object are equal.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object obj)</code> +<div class="block">True if all properties and fields are equal, but ignoring the state.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.Object</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#getPropertyValue(java.lang.String)">getPropertyValue</a></strong>(java.lang.String propertyName)</code> +<div class="block">Returns a Storable property value by name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#hasDirtyProperties()">hasDirtyProperties</a></strong>()</code> +<div class="block">Returns true if any non-primary key properties in this object are + dirty.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>int</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#hashCode()">hashCode</a></strong>()</code> </td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#insert()">insert</a></strong>()</code> +<div class="block">Inserts a new persistent value for this object.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#isPropertyClean(java.lang.String)">isPropertyClean</a></strong>(java.lang.String propertyName)</code> +<div class="block">Returns true if the given property of this Storable is clean.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#isPropertyDirty(java.lang.String)">isPropertyDirty</a></strong>(java.lang.String propertyName)</code> +<div class="block">Returns true if the given property of this Storable has been set, but no + load or store operation has been performed yet.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#isPropertySupported(java.lang.String)">isPropertySupported</a></strong>(java.lang.String propertyName)</code> +<div class="block">Returns true if the given property exists and is supported.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#isPropertyUninitialized(java.lang.String)">isPropertyUninitialized</a></strong>(java.lang.String propertyName)</code> +<div class="block">Returns true if the given property of this Storable has never been + loaded or set.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#load()">load</a></strong>()</code> +<div class="block">Loads or reloads this object from the storage layer by a primary or + alternate key.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#markAllPropertiesClean()">markAllPropertiesClean</a></strong>()</code> +<div class="block">Marks all properties as clean, including uninitialized properties.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#markAllPropertiesDirty()">markAllPropertiesDirty</a></strong>()</code> +<div class="block">Marks all properties as dirty, including uninitialized properties.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#markPropertiesClean()">markPropertiesClean</a></strong>()</code> +<div class="block">Marks all dirty properties as clean.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#markPropertiesDirty()">markPropertiesDirty</a></strong>()</code> +<div class="block">Marks all clean properties as dirty.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code><a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a></code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#prepare()">prepare</a></strong>()</code> +<div class="block">Prepares a new object for loading, inserting, updating, or deleting.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.util.Map<java.lang.String,java.lang.Object></code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#propertyMap()">propertyMap</a></strong>()</code> +<div class="block">Returns a fixed-size map view of this Storable's properties.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#readFrom(java.io.InputStream)">readFrom</a></strong>(java.io.InputStream in)</code> +<div class="block">Restores property values and states as encoded by <a href="../../../com/amazon/carbonado/Storable.html#writeTo(java.io.OutputStream)"><code>writeTo(java.io.OutputStream)</code></a>.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#setPropertyValue(java.lang.String, java.lang.Object)">setPropertyValue</a></strong>(java.lang.String propertyName, + java.lang.Object value)</code> +<div class="block">Sets a Storable property value by name.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.Class<<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a>></code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#storableType()">storableType</a></strong>()</code> +<div class="block">Returns the class or interface from which this storable was + generated.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>java.lang.String</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#toString()">toString</a></strong>()</code> +<div class="block">Returns a string for debugging purposes that contains all supported + property names and values for this object.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>java.lang.String</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#toStringKeyOnly()">toStringKeyOnly</a></strong>()</code> +<div class="block">Returns a string for debugging purposes that contains supported key + property names and values for this object.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#tryDelete()">tryDelete</a></strong>()</code> +<div class="block">Deletes this object from the storage layer by its primary key, + regardless of whether this object has actually been loaded or not.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#tryInsert()">tryInsert</a></strong>()</code> +<div class="block">Inserts a new persistent value for this object.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#tryLoad()">tryLoad</a></strong>()</code> +<div class="block">Loads or reloads this object from the storage layer by a primary or + alternate key.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>boolean</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#tryUpdate()">tryUpdate</a></strong>()</code> +<div class="block">Updates the persistent value of this object, regardless of whether this + object has actually been loaded or not.</div> +</td> +</tr> +<tr class="altColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#update()">update</a></strong>()</code> +<div class="block">Updates the persistent value of this object, regardless of whether this + object has actually been loaded or not.</div> +</td> +</tr> +<tr class="rowColor"> +<td class="colFirst"><code>void</code></td> +<td class="colLast"><code><strong><a href="../../../com/amazon/carbonado/Storable.html#writeTo(java.io.OutputStream)">writeTo</a></strong>(java.io.OutputStream out)</code> +<div class="block">Serializes property values and states for temporary storage or for + network transfer.</div> +</td> +</tr> +</table> +</li> +</ul> +</li> +</ul> +</div> +<div class="details"> +<ul class="blockList"> +<li class="blockList"> +<!-- ============ METHOD DETAIL ========== --> +<ul class="blockList"> +<li class="blockList"><a name="method_detail"> +<!-- --> +</a> +<h3>Method Detail</h3> +<a name="load()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>load</h4> +<pre>void load() + throws <a href="../../../com/amazon/carbonado/FetchNoneException.html" title="class in com.amazon.carbonado">FetchNoneException</a>, + <a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></pre> +<div class="block">Loads or reloads this object from the storage layer by a primary or + alternate key. All properties of a key must be initialized for it to be + chosen. The primary key is examined first, and if not fully initialized, + alternate keys are examined in turn. + + <p>If load is successful, altering the primary key is no longer allowed + unless a call to delete succeeds. Attempting to alter the primary key in + this state results in an <code>IllegalStateException</code>. Alternate keys + may always be modified, however. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#tryLoad()"><code>tryLoad()</code></a> only in that it + throws an exception if no matching record was found, instead of returning + false. This may indicate that the underlying record was deleted between + a load and reload. When a FetchNoneException is thrown, this object's + state will be the same as if the delete method was called on it.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/FetchNoneException.html" title="class in com.amazon.carbonado">FetchNoneException</a></code> - if no matching record found</dd> +<dd><code><a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="tryLoad()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>tryLoad</h4> +<pre>boolean tryLoad() + throws <a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></pre> +<div class="block">Loads or reloads this object from the storage layer by a primary or + alternate key. All properties of a key must be initialized for it to be + chosen. The primary key is examined first, and if not fully initialized, + alternate keys are examined in turn. + + <p>If load is successful, altering the primary key is no longer allowed + unless a call to delete succeeds. Attempting to alter the primary key in + this state results in an <code>IllegalStateException</code>. Alternate keys + may always be modified, however. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#load()"><code>load()</code></a> only in that it returns + false if no matching record was found, instead of throwing an exception. + This may indicate that the underlying record was deleted between a load + and reload. When false is returned, this object's state will be the same + as if the delete method was called on it.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>true if found and loaded, false otherwise</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/FetchException.html" title="class in com.amazon.carbonado">FetchException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="insert()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>insert</h4> +<pre>void insert() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Inserts a new persistent value for this object. If successful, altering + the primary key is no longer allowed unless a call to delete succeeds. + Attempting to alter the primary key in this state results in an <code>IllegalStateException</code>. Alternate keys may always be modified, however. + + <p>Insert requires that all primary key properties be specified. If not, + an <code>IllegalStateException</code> is thrown. Also, repository + implementations usually require that properties which are not <a href="../../../com/amazon/carbonado/Nullable.html" title="annotation in com.amazon.carbonado"><code>Nullable</code></a> also be specified. Otherwise, a <a href="../../../com/amazon/carbonado/ConstraintException.html" title="class in com.amazon.carbonado"><code>ConstraintException</code></a> + may be thrown. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#tryInsert()"><code>tryInsert()</code></a> only in that it may + throw a UniqueConstraintException, instead of returning false.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/UniqueConstraintException.html" title="class in com.amazon.carbonado">UniqueConstraintException</a></code> - if it is absolutely known that a key + of inserted object matches an existing one</dd> +<dd><code><a href="../../../com/amazon/carbonado/ConstraintException.html" title="class in com.amazon.carbonado">ConstraintException</a></code> - if any required properties are unspecified</dd> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="tryInsert()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>tryInsert</h4> +<pre>boolean tryInsert() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Inserts a new persistent value for this object. If successful, altering + the primary key is no longer allowed unless a call to delete succeeds. + Attempting to alter the primary key in this state results in an <code>IllegalStateException</code>. Alternate keys may always be modified, however. + + <p>Insert requires that all primary key properties be specified. If not, + an <code>IllegalStateException</code> is thrown. Also, repository + implementations usually require that properties which are not <a href="../../../com/amazon/carbonado/Nullable.html" title="annotation in com.amazon.carbonado"><code>Nullable</code></a> also be specified. Otherwise, a <a href="../../../com/amazon/carbonado/ConstraintException.html" title="class in com.amazon.carbonado"><code>ConstraintException</code></a> + may be thrown. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#insert()"><code>insert()</code></a> only in that it + returns false, instead of throwing a UniqueConstraintException.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>false if it is absolutely known that a key of inserted object + matches an existing one</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/ConstraintException.html" title="class in com.amazon.carbonado">ConstraintException</a></code> - if any required properties are unspecified</dd> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="update()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>update</h4> +<pre>void update() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Updates the persistent value of this object, regardless of whether this + object has actually been loaded or not. If successful, altering the + primary key is no longer allowed unless a call to delete succeeds. + Attempting to alter the primary key in this state results in an <code>IllegalStateException</code>. Alternate keys may always be modified, however. + + <p>If this object has a <a href="../../../com/amazon/carbonado/Version.html" title="annotation in com.amazon.carbonado"><code>version</code></a> property defined, then + the update logic is a bit more strict. Updates of any storable require + that the primary keys be specified; if a version is present, the version + must be specified as well. If any of the primary key or version + properties are unspecified, an <code>IllegalStateException</code> will be + thrown; if they are fully specified and the version doesn't match the + current record, an <a href="../../../com/amazon/carbonado/OptimisticLockException.html" title="class in com.amazon.carbonado"><code>OptimisticLockException</code></a> is thrown. + + <p>Not all properties need to be set on this object when calling + update. Setting a subset results in a partial update. After a successful + update, all properties are set to the actual values in the storage + layer. Put another way, the object is automatically reloaded after a + successful update. + + <p>If PersistNoneException is thrown, this indicates that the underlying + record was deleted. When this happens, this object's state will be the + same as if the delete method was called on it.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistNoneException.html" title="class in com.amazon.carbonado">PersistNoneException</a></code> - if record is missing and no update occurred</dd> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code><a href="../../../com/amazon/carbonado/OptimisticLockException.html" title="class in com.amazon.carbonado">OptimisticLockException</a></code> - if a version property exists and the + optimistic lock failed</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified, or if a version property is unspecified</dd></dl> +</li> +</ul> +<a name="tryUpdate()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>tryUpdate</h4> +<pre>boolean tryUpdate() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Updates the persistent value of this object, regardless of whether this + object has actually been loaded or not. If successful, altering the + primary key is no longer allowed unless a call to delete succeeds. + Attempting to alter the primary key in this state results in an <code>IllegalStateException</code>. Alternate keys may always be modified, however. + + <p>If this object has a <a href="../../../com/amazon/carbonado/Version.html" title="annotation in com.amazon.carbonado"><code>version</code></a> property defined, then + the update logic is a bit more strict. Updates of any storable require + that the primary keys be specified; if a version is present, the version + must be specified as well. If any of the primary key or version + properties are unspecified, an <code>IllegalStateException</code> will be + thrown; if they are fully specified and the version doesn't match the + current record, an <a href="../../../com/amazon/carbonado/OptimisticLockException.html" title="class in com.amazon.carbonado"><code>OptimisticLockException</code></a> is thrown. + + <p>Not all properties need to be set on this object when calling + update. Setting a subset results in a partial update. After a successful + update, all properties are set to the actual values in the storage + layer. Put another way, the object is automatically reloaded after a + successful update. + + <p>A return value of false indicates that the underlying record was + deleted. When this happens, this object's state will be the same as if + the delete method was called on it.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>true if record likely exists and was updated, or false if record + absolutely no longer exists and no update occurred</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code><a href="../../../com/amazon/carbonado/OptimisticLockException.html" title="class in com.amazon.carbonado">OptimisticLockException</a></code> - if a version property exists and the + optimistic lock failed</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified, or if a version property is unspecified</dd></dl> +</li> +</ul> +<a name="delete()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>delete</h4> +<pre>void delete() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Deletes this object from the storage layer by its primary key, + regardless of whether this object has actually been loaded or not. + Calling delete does not prevent this object from being used again. All + property values are still valid, including the primary key. Once + deleted, the insert operation is permitted again. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#tryDelete()"><code>tryDelete()</code></a> only in that it may + throw a PersistNoneException, instead of returning false.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistNoneException.html" title="class in com.amazon.carbonado">PersistNoneException</a></code> - if record is missing and nothing was + deleted</dd> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="tryDelete()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>tryDelete</h4> +<pre>boolean tryDelete() + throws <a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></pre> +<div class="block">Deletes this object from the storage layer by its primary key, + regardless of whether this object has actually been loaded or not. + Calling delete does not prevent this object from being used again. All + property values are still valid, including the primary key. Once + deleted, the insert operation is permitted again. + + <p>Note: This method differs from <a href="../../../com/amazon/carbonado/Storable.html#delete()"><code>delete()</code></a> only in that it + returns false, instead of throwing a PersistNoneException.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>true if record likely existed and was deleted, or false if record + absolutely no longer exists and no delete was necessary</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code><a href="../../../com/amazon/carbonado/PersistException.html" title="class in com.amazon.carbonado">PersistException</a></code> - if storage layer throws an exception</dd> +<dd><code>java.lang.IllegalStateException</code> - if the state of this instance suggests + that any primary keys are unspecified</dd></dl> +</li> +</ul> +<a name="storableType()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>storableType</h4> +<pre>java.lang.Class<<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a>> storableType()</pre> +<div class="block">Returns the class or interface from which this storable was + generated. This represents the data class for the storable. + + <p><i>Design note: the name "getStorableType" is avoided, so as not to + conflict with a user defined property of "storableType"</i></div> +</li> +</ul> +<a name="copyAllProperties(com.amazon.carbonado.Storable)"> +<!-- --> +</a><a name="copyAllProperties(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copyAllProperties</h4> +<pre>void copyAllProperties(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</pre> +<div class="block">Copies all supported properties, skipping any that are uninitialized. + Specifically, calls "target.set<property>" for all supported + properties in this storable, passing the value of the property from this + object. Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this + or the target are not copied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - storable on which to call set<property> methods</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalStateException</code> - if any primary key properties of target + cannot be altered</dd></dl> +</li> +</ul> +<a name="copyPrimaryKeyProperties(com.amazon.carbonado.Storable)"> +<!-- --> +</a><a name="copyPrimaryKeyProperties(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copyPrimaryKeyProperties</h4> +<pre>void copyPrimaryKeyProperties(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</pre> +<div class="block">Copies all supported primary key properties, skipping any that are + uninitialized. Specifically, calls "target.set<property>" for all + supported properties which participate in the primary key, passing the + value of the property from this object. Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this or the target are not copied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - storable on which to call set<property> methods</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalStateException</code> - if any primary key properties of target + cannot be altered</dd></dl> +</li> +</ul> +<a name="copyVersionProperty(com.amazon.carbonado.Storable)"> +<!-- --> +</a><a name="copyVersionProperty(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copyVersionProperty</h4> +<pre>void copyVersionProperty(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</pre> +<div class="block">Copies the optional version property, unless it is uninitialized. + Specifically, calls "target.set<property>" for the version + property (if supported), passing the value of the property from this + object. If no version property is defined, then this method does + nothing. Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this + or the target are not copied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - storable on which to call set<property> method</dd></dl> +</li> +</ul> +<a name="copyUnequalProperties(com.amazon.carbonado.Storable)"> +<!-- --> +</a><a name="copyUnequalProperties(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copyUnequalProperties</h4> +<pre>void copyUnequalProperties(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</pre> +<div class="block">Copies all supported non-primary key properties which are unequal, + skipping any that are uninitialized. Specifically, calls + "target.get<property>", and if the value thus retrieved differs + from the local value, "target.set<property>" is called for that + property. Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this + or the target are not copied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - storable on which to call set<property> methods</dd></dl> +</li> +</ul> +<a name="copyDirtyProperties(com.amazon.carbonado.Storable)"> +<!-- --> +</a><a name="copyDirtyProperties(S)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copyDirtyProperties</h4> +<pre>void copyDirtyProperties(<a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> target)</pre> +<div class="block">Copies all supported non-primary key properties which are + dirty. Specifically, calls "target.set<property>" for any + non-primary key property which is dirty, passing the value of the + property from this object. A property is considered dirty when set + before a load or persist operation is called. Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this or the target are not + copied.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - storable on which to call set<property> methods</dd></dl> +</li> +</ul> +<a name="hasDirtyProperties()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hasDirtyProperties</h4> +<pre>boolean hasDirtyProperties()</pre> +<div class="block">Returns true if any non-primary key properties in this object are + dirty. A property is considered dirty when set before a load or persist + operation is called. A property becomes clean after a successful load, + insert, or update operation.</div> +</li> +</ul> +<a name="markPropertiesClean()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>markPropertiesClean</h4> +<pre>void markPropertiesClean()</pre> +<div class="block">Marks all dirty properties as clean. Uninitialized properties remain so. + As a side-effect, initialized primary keys may no longer be altered.</div> +</li> +</ul> +<a name="markAllPropertiesClean()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>markAllPropertiesClean</h4> +<pre>void markAllPropertiesClean()</pre> +<div class="block">Marks all properties as clean, including uninitialized properties. + As a side-effect, primary keys may no longer be altered.</div> +</li> +</ul> +<a name="markPropertiesDirty()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>markPropertiesDirty</h4> +<pre>void markPropertiesDirty()</pre> +<div class="block">Marks all clean properties as dirty. Uninitialized properties remain so. + As a side-effect, primary keys can be altered.</div> +</li> +</ul> +<a name="markAllPropertiesDirty()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>markAllPropertiesDirty</h4> +<pre>void markAllPropertiesDirty()</pre> +<div class="block">Marks all properties as dirty, including uninitialized properties. + As a side-effect, primary keys can be altered.</div> +</li> +</ul> +<a name="isPropertyUninitialized(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isPropertyUninitialized</h4> +<pre>boolean isPropertyUninitialized(java.lang.String propertyName)</pre> +<div class="block">Returns true if the given property of this Storable has never been + loaded or set.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to interrogate</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalArgumentException</code> - if property is unknown, is a join or is derived</dd></dl> +</li> +</ul> +<a name="isPropertyDirty(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isPropertyDirty</h4> +<pre>boolean isPropertyDirty(java.lang.String propertyName)</pre> +<div class="block">Returns true if the given property of this Storable has been set, but no + load or store operation has been performed yet.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to interrogate</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalArgumentException</code> - if property is unknown, is a join or is derived</dd></dl> +</li> +</ul> +<a name="isPropertyClean(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isPropertyClean</h4> +<pre>boolean isPropertyClean(java.lang.String propertyName)</pre> +<div class="block">Returns true if the given property of this Storable is clean. All + properties are clean after a successful load or store operation.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to interrogate</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalArgumentException</code> - if property is unknown, is a join or is derived</dd></dl> +</li> +</ul> +<a name="isPropertySupported(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>isPropertySupported</h4> +<pre>boolean isPropertySupported(java.lang.String propertyName)</pre> +<div class="block">Returns true if the given property exists and is supported. If a + Storable has an <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>Independent</code></a> property which is not supported by + the repository, then this method returns false.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to check</dd></dl> +</li> +</ul> +<a name="getPropertyValue(java.lang.String)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>getPropertyValue</h4> +<pre>java.lang.Object getPropertyValue(java.lang.String propertyName)</pre> +<div class="block">Returns a Storable property value by name.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to get value of</dd> +<dt><span class="strong">Returns:</span></dt><dd>property value, which is boxed if property type is primitive</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalArgumentException</code> - if property is unknown or if accessor + method declares throwing any checked exceptions</dd> +<dd><code>java.lang.UnsupportedOperationException</code> - if property is independent but unsupported</dd> +<dd><code>java.lang.NullPointerException</code> - if property name is null</dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="setPropertyValue(java.lang.String, java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>setPropertyValue</h4> +<pre>void setPropertyValue(java.lang.String propertyName, + java.lang.Object value)</pre> +<div class="block">Sets a Storable property value by name. Call insert or update to persist + the change.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>propertyName</code> - name of property to set value to</dd><dd><code>value</code> - new value for property</dd> +<dt><span class="strong">Throws:</span></dt> +<dd><code>java.lang.IllegalArgumentException</code> - if property is unknown, or if value is + unsupported due to a constraint, or if mutator method declares throwing + any checked exceptions</dd> +<dd><code>java.lang.UnsupportedOperationException</code> - if property is independent but unsupported</dd> +<dd><code>java.lang.ClassCastException</code> - if value is of wrong type</dd> +<dd><code>java.lang.NullPointerException</code> - if property name is null or if primitive + value is required but value is null</dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="propertyMap()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>propertyMap</h4> +<pre>java.util.Map<java.lang.String,java.lang.Object> propertyMap()</pre> +<div class="block">Returns a fixed-size map view of this Storable's properties. Properties + which declare throwing any checked exceptions are excluded from the + map. Removing and adding of map entries is unsupported.</div> +<dl><dt><span class="strong">Returns:</span></dt><dd>map of property name to property value; primitive property + values are boxed</dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="copy()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>copy</h4> +<pre><a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> copy()</pre> +<div class="block">Returns an exact shallow copy of this object, including the state.</div> +</li> +</ul> +<a name="prepare()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>prepare</h4> +<pre><a href="../../../com/amazon/carbonado/Storable.html" title="type parameter in Storable">S</a> prepare()</pre> +<div class="block">Prepares a new object for loading, inserting, updating, or deleting.</div> +<dl><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd> +<dt><span class="strong">See Also:</span></dt><dd><a href="../../../com/amazon/carbonado/Storage.html#prepare()"><code>Storage.prepare()</code></a></dd></dl> +</li> +</ul> +<a name="writeTo(java.io.OutputStream)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>writeTo</h4> +<pre>void writeTo(java.io.OutputStream out) + throws java.io.IOException, + <a href="../../../com/amazon/carbonado/SupportException.html" title="class in com.amazon.carbonado">SupportException</a></pre> +<div class="block">Serializes property values and states for temporary storage or for + network transfer. Call <a href="../../../com/amazon/carbonado/Storable.html#readFrom(java.io.InputStream)"><code>readFrom(java.io.InputStream)</code></a> to restore. Derived and join + properties are not serialized. + + <p>The encoding used by this method is much simpler than what is + provided by standard object serialization. It does not encode class info + or property names, which is why it is not suitable for long term + storage.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code>java.io.IOException</code> - if exception from stream</dd> +<dd><code><a href="../../../com/amazon/carbonado/SupportException.html" title="class in com.amazon.carbonado">SupportException</a></code> - if Storable cannot be serialized</dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="readFrom(java.io.InputStream)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>readFrom</h4> +<pre>void readFrom(java.io.InputStream in) + throws java.io.IOException, + <a href="../../../com/amazon/carbonado/SupportException.html" title="class in com.amazon.carbonado">SupportException</a></pre> +<div class="block">Restores property values and states as encoded by <a href="../../../com/amazon/carbonado/Storable.html#writeTo(java.io.OutputStream)"><code>writeTo(java.io.OutputStream)</code></a>. + Derived properties are not directly modified, but all other properties + not restored are reset to their initial state.</div> +<dl><dt><span class="strong">Throws:</span></dt> +<dd><code>java.io.IOException</code> - if exception from stream</dd> +<dd><code><a href="../../../com/amazon/carbonado/SupportException.html" title="class in com.amazon.carbonado">SupportException</a></code> - if Storable cannot be serialized</dd><dt><span class="strong">Since:</span></dt> + <dd>1.2</dd></dl> +</li> +</ul> +<a name="hashCode()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>hashCode</h4> +<pre>int hashCode()</pre> +<dl> +<dt><strong>Overrides:</strong></dt> +<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd> +</dl> +</li> +</ul> +<a name="equals(java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>equals</h4> +<pre>boolean equals(java.lang.Object obj)</pre> +<div class="block">True if all properties and fields are equal, but ignoring the state.</div> +<dl> +<dt><strong>Overrides:</strong></dt> +<dd><code>equals</code> in class <code>java.lang.Object</code></dd> +<dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - object to compare to for equality</dd></dl> +</li> +</ul> +<a name="equalPrimaryKeys(java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>equalPrimaryKeys</h4> +<pre>boolean equalPrimaryKeys(java.lang.Object obj)</pre> +<div class="block">True if the supported properties which participate in the primary key + are equal. This is useful to cheaply investigate if two storables refer + to the same entity, regardless of the state of object (specifically the + non-key properties). Unsupported <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> + properties in this or the target are not compared.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - object to compare to for equality</dd></dl> +</li> +</ul> +<a name="equalProperties(java.lang.Object)"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>equalProperties</h4> +<pre>boolean equalProperties(java.lang.Object obj)</pre> +<div class="block">True if all supported properties for this object are equal. Unsupported + <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties in this or the target are not + compared.</div> +<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - object to compare to for equality</dd></dl> +</li> +</ul> +<a name="toString()"> +<!-- --> +</a> +<ul class="blockList"> +<li class="blockList"> +<h4>toString</h4> +<pre>java.lang.String toString()</pre> +<div class="block">Returns a string for debugging purposes that contains all supported + property names and values for this object. Uninitialized and unsupported + <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties are not included.</div> +<dl> +<dt><strong>Overrides:</strong></dt> +<dd><code>toString</code> in class <code>java.lang.Object</code></dd> +</dl> +</li> +</ul> +<a name="toStringKeyOnly()"> +<!-- --> +</a> +<ul class="blockListLast"> +<li class="blockList"> +<h4>toStringKeyOnly</h4> +<pre>java.lang.String toStringKeyOnly()</pre> +<div class="block">Returns a string for debugging purposes that contains supported key + property names and values for this object. Uninitialized and unsupported + <a href="../../../com/amazon/carbonado/Independent.html" title="annotation in com.amazon.carbonado"><code>independent</code></a> properties are not included.</div> +</li> +</ul> +</li> +</ul> +</li> +</ul> +</div> +</div> +<!-- ========= END OF CLASS DATA ========= --> +<!-- ======= START OF BOTTOM NAVBAR ====== --> +<div class="bottomNav"><a name="navbar_bottom"> +<!-- --> +</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/Storable.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-files/index-1.html">Index</a></li> +<li><a href="../../../help-doc.html">Help</a></li> +</ul> +</div> +<div class="subNav"> +<ul class="navList"> +<li><a href="../../../com/amazon/carbonado/Sequence.html" title="annotation in com.amazon.carbonado"><span class="strong">Prev Class</span></a></li> +<li><a href="../../../com/amazon/carbonado/Storage.html" title="interface in com.amazon.carbonado"><span class="strong">Next Class</span></a></li> +</ul> +<ul class="navList"> +<li><a href="../../../index.html?com/amazon/carbonado/Storable.html" target="_top">Frames</a></li> +<li><a href="Storable.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>Nested | </li> +<li>Field | </li> +<li>Constr | </li> +<li><a href="#method_summary">Method</a></li> +</ul> +<ul class="subNavList"> +<li>Detail: </li> +<li>Field | </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 © 2006-2013 <a href="https://github.com/Carbonado/Carbonado">Amazon Technologies, Inc.</a>. All Rights Reserved.</small></p> +</body> +</html> |