persistenceunitinfo.html
来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 598 行 · 第 1/2 页
HTML
598 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_14) on Mon Jan 28 05:47:05 PST 2008 --><TITLE>PersistenceUnitInfo (Java EE 5)</TITLE><META NAME="keywords" CONTENT="javax.persistence.spi.PersistenceUnitInfo interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PersistenceUnitInfo (Java EE 5)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/persistence/spi/PersistenceProvider.html" title="interface in javax.persistence.spi"><B>PREV CLASS</B></A> <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> <A HREF="PersistenceUnitInfo.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.persistence.spi</FONT><BR>Interface PersistenceUnitInfo</H2><HR><DL><DT><PRE>public interface <B>PersistenceUnitInfo</B></DL></PRE><P>Interface implemented by the container and used by the persistence provider when creating an <A HREF="../../../javax/persistence/EntityManagerFactory.html" title="interface in javax.persistence"><CODE>EntityManagerFactory</CODE></A>.<P><P><DL><DT><B>Since:</B></DT> <DD>Java Persistence 1.0</DD></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#addTransformer(javax.persistence.spi.ClassTransformer)">addTransformer</A></B>(<A HREF="../../../javax/persistence/spi/ClassTransformer.html" title="interface in javax.persistence.spi">ClassTransformer</A> transformer)</CODE><BR> 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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#excludeUnlistedClasses()">excludeUnlistedClasses</A></B>()</CODE><BR> 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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getClassLoader()">getClassLoader</A></B>()</CODE><BR> Returns ClassLoader that the provider may use to load any classes, resources, or open URLs.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getJarFileUrls()">getJarFileUrls</A></B>()</CODE><BR> 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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/sql/DataSource.html" title="class or interface in javax.sql">DataSource</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getJtaDataSource()">getJtaDataSource</A></B>()</CODE><BR> Returns the JTA-enabled data source to be used by the persistence provider.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getManagedClassNames()">getManagedClassNames</A></B>()</CODE><BR> Returns the list of the names of the classes that the persistence provider must add it to its set of managed classes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getMappingFileNames()">getMappingFileNames</A></B>()</CODE><BR> Returns the list of mapping file names that the persistence provider must load to determine the mappings for the entity classes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getNewTempClassLoader()">getNewTempClassLoader</A></B>()</CODE><BR> Return a new instance of a ClassLoader that the provider may use to temporarily load any classes, resources, or open URLs.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/sql/DataSource.html" title="class or interface in javax.sql">DataSource</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getNonJtaDataSource()">getNonJtaDataSource</A></B>()</CODE><BR> Returns the non-JTA-enabled data source to be used by the persistence provider for accessing data outside a JTA transaction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getPersistenceProviderClassName()">getPersistenceProviderClassName</A></B>()</CODE><BR> Returns the fully qualified name of the persistence provider implementation class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getPersistenceUnitName()">getPersistenceUnitName</A></B>()</CODE><BR> Returns the name of the persistence unit.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getPersistenceUnitRootUrl()">getPersistenceUnitRootUrl</A></B>()</CODE><BR> Returns the URL for the jar file or directory that is the root of the persistence unit.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getProperties()">getProperties</A></B>()</CODE><BR> Returns properties object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/persistence/spi/PersistenceUnitTransactionType.html" title="enum in javax.persistence.spi">PersistenceUnitTransactionType</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/persistence/spi/PersistenceUnitInfo.html#getTransactionType()">getTransactionType</A></B>()</CODE><BR> Returns the transaction type of the entity managers created by the EntityManagerFactory.</TD></TR></TABLE> <P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getPersistenceUnitName()"><!-- --></A><H3>getPersistenceUnitName</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPersistenceUnitName</B>()</PRE><DL><DD>Returns the name of the persistence unit. Corresponds to the name attribute in the persistence.xml file.<P><DD><DL><DT><B>Returns:</B><DD>The name of the persistence unit. Corresponds to the name attribute in the persistence.xml file.</DL></DD></DL><HR><A NAME="getPersistenceProviderClassName()"><!-- --></A><H3>getPersistenceProviderClassName</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPersistenceProviderClassName</B>()</PRE><DL><DD>Returns the fully qualified name of the persistence provider implementation class. Corresponds to the <provider> element in the persistence.xml file.<P><DD><DL><DT><B>Returns:</B><DD>The fully qualified name of the persistence provider implementation class. Corresponds to the <provider> element in the persistence.xml file.</DL></DD></DL><HR><A NAME="getTransactionType()"><!-- --></A><H3>getTransactionType</H3><PRE><A HREF="../../../javax/persistence/spi/PersistenceUnitTransactionType.html" title="enum in javax.persistence.spi">PersistenceUnitTransactionType</A> <B>getTransactionType</B>()</PRE><DL><DD>Returns the transaction type of the entity managers created by the EntityManagerFactory. The transaction type corresponds to the
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?