| <html><head> | 
 |       <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 
 |    <title>8.  Retrieving Properties Information</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="jpa_overview_em.html" title="Chapter 8.  EntityManager"><link rel="prev" href="jpa_overview_em_locking.html" title="7.  Entity Locking"><link rel="next" href="jpa_overview_em_closing.html" title="9.  Closing"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.  | 
 | 			Retrieving Properties Information | 
 | 		</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="jpa_overview_em_locking.html">Prev</a> </td><th width="60%" align="center">Chapter 8.  | 
 |         EntityManager | 
 |     </th><td width="20%" align="right"> <a accesskey="n" href="jpa_overview_em_closing.html">Next</a></td></tr></table><hr></div><div class="section" title="8.  Retrieving Properties Information"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="jpa_overview_em_properties">8.  | 
 | 			Retrieving Properties Information | 
 | 		</h2></div></div></div> | 
 | 		 | 
 | 		<a class="indexterm" name="d5e2755"></a> | 
 |          | 
 |  | 
 | <p> | 
 | There are two sets of properties that may be specified: those that | 
 | are specific to OpenJPA and those that have been defined by the JPA | 
 | specification. In some cases, two properties may be equivalent, but | 
 | have different keys. For example, <span class="emphasis"><em>openjpa.LockTimeout | 
 | </em></span> and <span class="emphasis"><em>javax.persistence.lock.timeout</em></span> | 
 | are two different keys for the same property. | 
 | </p> | 
 | <p> | 
 | There are two methods that can be used to retrieve information related to | 
 | properties: | 
 | </p><pre class="programlisting"> | 
 | public Map<String,Object> getProperties(); | 
 | public Set<String> getSupportedProperties(); | 
 | </pre><p> | 
 | 	</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> | 
 | 			<p> | 
 | 			<code class="methodname">getProperties</code> - Provides a list of current  | 
 | 			properties. If a property has more than one key, the key | 
 | 			that will be returned is the one that was used when the | 
 | 			property was set. If the property was not explicitly | 
 | 			set, the key defined by the JPA specification will be returned  | 
 | 			with the default value. | 
 | 			</p> | 
 | 		</li><li class="listitem"> | 
 | 			<p> | 
 | 			<code class="methodname">getSupportedProperties</code> - Returns a set of | 
 | 			supported property keys. This includes keys defined by the JPA | 
 | 			specification as well as keys specific to OpenJPA. | 
 | 			If a property | 
 | 			has more than one key, all possible keys will be returned. | 
 | 			</p> | 
 | 		</li></ul></div><p> | 
 | </p> | 
 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3> | 
 | 	<p> | 
 | 		The <code class="methodname">getSupportedProperties</code> method is an OpenJPA | 
 | 		extension to the JPA specification. | 
 | 	</p> | 
 | </div> | 
 |  | 
 |     </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="jpa_overview_em_locking.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="jpa_overview_em.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="jpa_overview_em_closing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">7.  | 
 |             Entity Locking | 
 |          </td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top"> 9.  | 
 |             Closing | 
 |         </td></tr></table></div></body></html> |