📄 accountbean.html
字号:
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="balance()"><!-- --></A><H3>
balance</H3>
<PRE>
public double <B>balance</B>()</PRE>
<DL>
<DD>Returns current balance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>double Balance</DL>
</DD>
</DL>
<HR>
<A NAME="deposit(double)"><!-- --></A><H3>
deposit</H3>
<PRE>
public double <B>deposit</B>(double amount)</PRE>
<DL>
<DD>Adds amount to balance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>amount</CODE> - double Amount<DT><B>Returns:</B><DD>double balance</DL>
</DD>
</DL>
<HR>
<A NAME="ejbActivate()"><!-- --></A><H3>
ejbActivate</H3>
<PRE>
public void <B>ejbActivate</B>()</PRE>
<DL>
<DD>Required by the EJB specification, this method is not used by this example.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>ejbActivate</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="ejbCreate(java.lang.String, double)"><!-- --></A><H3>
ejbCreate</H3>
<PRE>
public java.lang.String <B>ejbCreate</B>(java.lang.String accountId, double initialBalance) throws javax.ejb.CreateException</PRE>
<DL>
<DD>This method corresponds to the create method in the home interface "AccountHome.java". The parameter sets of the two methods are identical. When the client calls <code>AccountHome.create()</code>, the container allocates an instance of this bean and calls <code>AccountBean.ejbCreate()</code>. <p> For bean-managed persistence, <code>ejbCreate()</code> returns a primary key, unlike the case of container-managed persistence, where it returns a void.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>accountID</CODE> - String Account ID<DD><CODE>initialBalance</CODE> - double Initial Balance<DT><B>Returns:</B><DD>String Primary Key<DT><B>Throws:</B><DD><CODE>javax.ejb.CreateException</CODE> - if there is a problem creating the bean<DD><CODE>javax.ejb.DuplicateKeyException</CODE> - if a create is attempted using a Primary Key already in the database<DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="ejbFindBigAccounts(double)"><!-- --></A><H3>
ejbFindBigAccounts</H3>
<PRE>
public java.util.Enumeration <B>ejbFindBigAccounts</B>(double balanceGreaterThan)</PRE>
<DL>
<DD>Finds all EJBeans with a balance greater than a given amount. Returns an Enumeration of found EJBean primary keys.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>balanceGreaterThan</CODE> - double Test Amount<DT><B>Returns:</B><DD>Enumeration EJBean Primary Keys<DT><B>Throws:</B><DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="ejbFindByPrimaryKey(java.lang.String)"><!-- --></A><H3>
ejbFindByPrimaryKey</H3>
<PRE>
public java.lang.String <B>ejbFindByPrimaryKey</B>(java.lang.String pk) throws javax.ejb.ObjectNotFoundException</PRE>
<DL>
<DD>Attempts to find the EJBean with a given Primary Key from the persistent storage.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pk</CODE> - String Primary Key<DT><B>Returns:</B><DD>String Primary Key<DT><B>Throws:</B><DD><CODE>javax.ejb.ObjectNotFoundException</CODE> - thrown if the EJBean cannot be found<DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="ejbLoad()"><!-- --></A><H3>
ejbLoad</H3>
<PRE>
public void <B>ejbLoad</B>()</PRE>
<DL>
<DD>Loads the EJBean from the persistent storage.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>ejbLoad</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>javax.ejb.NoSuchEntityException</CODE> - if the bean is not found in the database<DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="ejbPassivate()"><!-- --></A><H3>
ejbPassivate</H3>
<PRE>
public void <B>ejbPassivate</B>()</PRE>
<DL>
<DD>This method is required by the EJB Specification, but is not used by this example.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>ejbPassivate</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="ejbPostCreate(java.lang.String, double)"><!-- --></A><H3>
ejbPostCreate</H3>
<PRE>
public void <B>ejbPostCreate</B>(java.lang.String accountId, double initialBalance)</PRE>
<DL>
<DD>Required by the EJB specification, this method is not used by this example.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>accountID</CODE> - String Account Identification<DD><CODE>initialBalance</CODE> - double Initial Balance</DL>
</DD>
</DL>
<HR>
<A NAME="ejbRemove()"><!-- --></A><H3>
ejbRemove</H3>
<PRE>
public void <B>ejbRemove</B>()</PRE>
<DL>
<DD>Deletes the EJBean from the persistent storage.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>ejbRemove</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>javax.ejb.NoSuchEntityException</CODE> - if the bean is not found in the database<DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="ejbStore()"><!-- --></A><H3>
ejbStore</H3>
<PRE>
public void <B>ejbStore</B>()</PRE>
<DL>
<DD>Stores the EJBean in the persistent storage.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>ejbStore</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>javax.ejb.NoSuchEntityException</CODE> - if the bean is not found in the database<DD><CODE>javax.ejb.EJBException</CODE> - if there is a communications or systems failure</DL>
</DD>
</DL>
<HR>
<A NAME="setEntityContext(javax.ejb.EntityContext)"><!-- --></A><H3>
setEntityContext</H3>
<PRE>
public void <B>setEntityContext</B>(javax.ejb.EntityContext ctx)</PRE>
<DL>
<DD>Sets the EntityContext for the EJBean.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>setEntityContext</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ctx</CODE> - EntityContext</DL>
</DD>
</DL>
<HR>
<A NAME="unsetEntityContext()"><!-- --></A><H3>
unsetEntityContext</H3>
<PRE>
public void <B>unsetEntityContext</B>()</PRE>
<DL>
<DD>Unsets the EntityContext for the EJBean.<DD><DL>
<DT><B>Specified by: </B><DD><CODE>unsetEntityContext</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="withdraw(double)"><!-- --></A><H3>
withdraw</H3>
<PRE>
public double <B>withdraw</B>(double amount) throws <A HREF="../../../../examples/ejb/basic/beanManaged/ProcessingErrorException.html">ProcessingErrorException</A></PRE>
<DL>
<DD>Subtracts amount from balance.<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>amount</CODE> - double Amount<DT><B>Returns:</B><DD>double Balance<DT><B>Throws:</B><DD><CODE><A HREF="../../../../examples/ejb/basic/beanManaged/ProcessingErrorException.html">ProcessingErrorException</A></CODE> - if Amount > Balance.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../examples/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>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</td><td valign=bottom align=right>Documentation is available at<br> <a href=http://e-docs.bea.com/wls/docs60>http://e-docs.bea.com/wls/docs60</a></td></EM>
</TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<a href=http://e-docs.bea.com/wls/docs60/copyright.html>Copyright</a> © 2000 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -