blob: 8e5b9250c7509f5dbde41dc0db04dc9040aa92cd [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Demoting methods from an interface</title>
</head>
<body id="tedemoteinterfacemethod"><a name="tedemoteinterfacemethod"><!-- --></a>
<h1 class="topictitle1">Demoting methods from an interface</h1>
<div><p>If you promote a method to an interface, you can easily demote
the method.</p><div class="skipspace"><div class="note"><span class="notetitle">Note: </span>The import statement added to the interface class when you
promoted the method will not be removed from the interface class when you
demote the method because we cannot guarantee that it is not being used by
other methods. A warning message of "Import is never used" may appear in the
Problems view if this warning level is turned on in the Preferences.</div>
<p>To
demote a method that was previously promoted to an interface:</p>
</div>
<ol><li><span>Select the Java™ file that contains the promoted method,
and open the file in the Java editor.</span></li>
<li><span>In the Outline view, right-click the business method that you want
to demote, and select the appropriate option, depending on the interface that
you are demoting it from:</span><ul><li><span class="menucascade"><span class="uicontrol">Enterprise Bean</span> &gt; <span class="uicontrol">Demote
from Local Interface</span></span></li>
<li><span class="menucascade"><span class="uicontrol">Enterprise Bean</span> &gt; <span class="uicontrol">Demote
from Local Home Interface</span></span></li>
<li><span class="menucascade"><span class="uicontrol">Enterprise Bean</span> &gt; <span class="uicontrol">Demote
from Remote Interface</span></span></li>
<li><span class="menucascade"><span class="uicontrol">Enterprise Bean</span> &gt; <span class="uicontrol">Demote
from Home Interface</span></span></li>
<li><span class="menucascade"><span class="uicontrol">Enterprise Bean</span> &gt; <span class="uicontrol">Demote
from Service Endpoint Interface</span></span></li>
</ul>
</li>
<li><span>Save your changes and close the Java editor.</span></li>
</ol>
<div class="skipspace">The demoted method is removed from the interface. The import statement
that was added during promote is not removed.</div>
</div>
<div><p><b class="reltaskshd">Related tasks</b><br />
<a href="../topics/teinterfacemethods.html" title="When you create an enterprise bean, a set of required methods for the bean is automatically created. You can use the Java editor to modify methods.">Working with a bean's client interface methods</a><br />
<a href="../topics/teaddhomeinterfacemethod.html" title="You can use the Java editor to add a new home method.">Adding methods to the home interface</a><br />
<a href="../topics/tepromoteinterfacemethod.html" title="You can promote methods to the remote interface from an enterprise bean class without editing the remote interface directly.">Promoting methods to an interface</a><br />
</p>
</div> <br />
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</body>
</html>