📄 accountbean.html
字号:
</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.
<P>
<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.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>ejbActivate</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
</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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><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.Collection <B>ejbFindBigAccounts</B>(double balanceGreaterThan)</PRE>
<DL>
<DD>Finds all EJBeans with a balance greater than a given amount.
Returns an Collection of found EJBean primary keys.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>balanceGreaterThan</CODE> - double Test Amount
<DT><B>Returns:</B><DD>Collection 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.
<P>
<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.
<P>
<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.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>ejbPassivate</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
</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.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><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.
<P>
<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.
<P>
<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.
<P>
<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.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>unsetEntityContext</CODE> in interface <CODE>javax.ejb.EntityBean</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="withdraw(double)"><!-- --></A><H3>
withdraw</H3>
<PRE>
public double <B>withdraw</B>(double amount)
throws <A HREF="../../../../examples/ejb20/basic/beanManaged/ProcessingErrorException.html">ProcessingErrorException</A></PRE>
<DL>
<DD>Subtracts amount from balance.
<P>
<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/ejb20/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=3 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="../../../../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/docs81>http://e-docs.bea.com/wls/docs81</a></td></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../examples/ejb20/basic/beanManaged/Client.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="AccountBean.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | 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/docs81/copyright.html>Copyright</a> © 2003 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -