persistenceunitinfo.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 598 行 · 第 1/2 页

HTML
598
字号
         transaction-type attribute in the persistence.xml file.<P><DD><DL><DT><B>Returns:</B><DD>The transaction type of the entity managers created by the         EntityManagerFactory. The transaction type corresponds to the         transaction-type attribute in the persistence.xml file.</DL></DD></DL><HR><A NAME="getJtaDataSource()"><!-- --></A><H3>getJtaDataSource</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/sql/DataSource.html" title="class or interface in javax.sql">DataSource</A> <B>getJtaDataSource</B>()</PRE><DL><DD>Returns the JTA-enabled data source to be used by the persistence         provider. The data source corresponds to the &lt;jta-data-source&gt;         element in the persistence.xml file or is provided at deployment         or by the container.<P><DD><DL><DT><B>Returns:</B><DD>the JTA-enabled data source to be used by the persistence         provider. The data source corresponds to the &lt;jta-data-source&gt;         element in the persistence.xml file or is provided at deployment         or by the container.</DL></DD></DL><HR><A NAME="getNonJtaDataSource()"><!-- --></A><H3>getNonJtaDataSource</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/sql/DataSource.html" title="class or interface in javax.sql">DataSource</A> <B>getNonJtaDataSource</B>()</PRE><DL><DD>Returns the non-JTA-enabled data source to be used by the persistence         provider for accessing data outside a JTA transaction. The data         source corresponds to the named &lt;non-jta-data-source&gt; element in         the persistence.xml file or provided at deployment or by the         container.<P><DD><DL><DT><B>Returns:</B><DD>The non-JTA-enabled data source to be used by the persistence         provider for accessing data outside a JTA transaction. The data         source corresponds to the named &lt;non-jta-data-source&gt; element in         the persistence.xml file or provided at deployment or by the         container.</DL></DD></DL><HR><A NAME="getMappingFileNames()"><!-- --></A><H3>getMappingFileNames</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getMappingFileNames</B>()</PRE><DL><DD>Returns the list of mapping file names that the persistence provider must         load to determine the mappings for the entity classes. The         mapping files must be in the standard XML mapping format, be         uniquely named and be resource-loadable from the application         classpath. This list will not include the orm.xml file if one was         specified. Each mapping file name corresponds to a &lt;mapping-file&gt;         element in the persistence.xml file.<P><DD><DL><DT><B>Returns:</B><DD>The list of mapping file names that the persistence provider must         load to determine the mappings for the entity classes. The         mapping files must be in the standard XML mapping format, be         uniquely named and be resource-loadable from the application         classpath. This list will not include the orm.xml file if one was         specified. Each mapping file name corresponds to a &lt;mapping-file&gt;         element in the persistence.xml file.</DL></DD></DL><HR><A NAME="getJarFileUrls()"><!-- --></A><H3>getJarFileUrls</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>&gt; <B>getJarFileUrls</B>()</PRE><DL><DD>Returns a list of URLs for the jar files or exploded jar file directories that the persistence provider must examine for managed classes of the persistence unit. Each URL corresponds to a named <jar-file> element in the persistence.xml file. A URL will either be a file: URL referring to a jar file or referring to a directory that contains an exploded jar file, or some other URL from which an InputStream in jar format can be obtained.<P><DD><DL><DT><B>Returns:</B><DD>a list of URL objects referring to jar files or directories.</DL></DD></DL><HR><A NAME="getPersistenceUnitRootUrl()"><!-- --></A><H3>getPersistenceUnitRootUrl</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> <B>getPersistenceUnitRootUrl</B>()</PRE><DL><DD>Returns the URL for the jar file or directory that is the root of the persistence unit. (If the persistence unit is rooted in the WEB-INF/classes directory, this will be the URL of that directory.) The URL will either be a file: URL referring to a jar file or referring to a directory that contains an exploded jar file, or some other URL from which an InputStream in jar format can be obtained.<P><DD><DL><DT><B>Returns:</B><DD>a URL referring to a jar file or directory.</DL></DD></DL><HR><A NAME="getManagedClassNames()"><!-- --></A><H3>getManagedClassNames</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getManagedClassNames</B>()</PRE><DL><DD>Returns the list of the names of the classes that the persistence         provider must add it to its set of managed classes. Each name         corresponds to a named &lt;class&gt; element in the persistence.xml         file.<P><DD><DL><DT><B>Returns:</B><DD>The list of the names of the classes that the persistence         provider must add it to its set of managed classes. Each name         corresponds to a named &lt;class&gt; element in the persistence.xml         file.</DL></DD></DL><HR><A NAME="excludeUnlistedClasses()"><!-- --></A><H3>excludeUnlistedClasses</H3><PRE>boolean <B>excludeUnlistedClasses</B>()</PRE><DL><DD>Returns whether classes in the root of the persistence unit that have not         been explicitly listed are to be included in the set of managed         classes. This value corresponds to the &lt;exclude-unlisted-classes&gt;         element in the persistence.xml file.<P><DD><DL><DT><B>Returns:</B><DD>Whether classes in the root of the persistence unit that have not         been explicitly listed are to be included in the set of managed         classes. This value corresponds to the &lt;exclude-unlisted-classes&gt;         element in the persistence.xml file.</DL></DD></DL><HR><A NAME="getProperties()"><!-- --></A><H3>getProperties</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A> <B>getProperties</B>()</PRE><DL><DD>Returns properties object. Each property corresponds to a &lt;property&gt;         element in the persistence.xml file<P><DD><DL><DT><B>Returns:</B><DD>Properties object. Each property corresponds to a &lt;property&gt;         element in the persistence.xml file</DL></DD></DL><HR><A NAME="getClassLoader()"><!-- --></A><H3>getClassLoader</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> <B>getClassLoader</B>()</PRE><DL><DD>Returns ClassLoader that the provider may use to load any classes,         resources, or open URLs.<P><DD><DL><DT><B>Returns:</B><DD>ClassLoader that the provider may use to load any classes,         resources, or open URLs.</DL></DD></DL><HR><A NAME="addTransformer(javax.persistence.spi.ClassTransformer)"><!-- --></A><H3>addTransformer</H3><PRE>void <B>addTransformer</B>(<A HREF="../../../javax/persistence/spi/ClassTransformer.html" title="interface in javax.persistence.spi">ClassTransformer</A>&nbsp;transformer)</PRE><DL><DD>Add a transformer supplied by the provider that will be called for every new class definition or class redefinition that gets loaded by the loader returned by the <A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getClassLoader()"><CODE>getClassLoader()</CODE></A> method. The transformer has no effect on the result returned by the <A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getNewTempClassLoader()"><CODE>getNewTempClassLoader()</CODE></A> method. Classes are only transformed once within the same classloading scope, regardless of how many persistence units they may be a part of.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>transformer</CODE> - A provider-supplied transformer that the Container                    invokes at class-(re)definition time</DL></DD></DL><HR><A NAME="getNewTempClassLoader()"><!-- --></A><H3>getNewTempClassLoader</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> <B>getNewTempClassLoader</B>()</PRE><DL><DD>Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs. The scope and classpath of this loader is exactly the same as that of the loader returned by <A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getClassLoader()"><CODE>getClassLoader()</CODE></A>. None of the classes loaded by this class loader will be visible to application components. The provider may only use this ClassLoader within the scope of the <A HREF="../../../javax/persistence/spi/PersistenceProvider.html#createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)"><CODE>PersistenceProvider.createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo, java.util.Map)</CODE></A> call.<P><DD><DL><DT><B>Returns:</B><DD>Temporary ClassLoader with same visibility as current loader</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/persistence/spi/PersistenceProvider.html" title="interface in javax.persistence.spi"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/persistence/spi/PersistenceUnitTransactionType.html" title="enum in javax.persistence.spi"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/persistence/spi/PersistenceUnitInfo.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PersistenceUnitInfo.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?