Demoting methods from an interface

If you promote a method to an interface, you can easily demote the method.
Note: 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.

To demote a method that was previously promoted to an interface:

  1. Select the Java™ file that contains the promoted method, and open the file in the Java editor.
  2. 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:
    • Enterprise Bean > Demote from Local Interface
    • Enterprise Bean > Demote from Local Home Interface
    • Enterprise Bean > Demote from Remote Interface
    • Enterprise Bean > Demote from Home Interface
    • Enterprise Bean > Demote from Service Endpoint Interface
  3. Save your changes and close the Java editor.
The demoted method is removed from the interface. The import statement that was added during promote is not removed.
Related tasks
Working with a bean's client interface methods
Adding methods to the home interface
Promoting methods to an interface

Feedback