Interface Checks

The following OOM model checks are made on interfaces:

Check

Description and Correction

Interface name and code uniqueness

Interface names and codes must be unique in the namespace (model or package).

Manual correction: Modify the duplicate name/code

Automatic correction: Appends a number to the duplicate name/code

Empty classifier

Attributes and operations are missing for this classifier.

Manual correction: Add attributes or operations to the classifier

Automatic correction: None

Classifier visibility

A private or protected classifier should be inner to another classifier.

Manual correction: Change classifier visibility to public or package

Automatic correction: Changes the visibility to public or package

Interface constructor

An interface cannot be instantiated. Thus a constructor cannot be defined for an interface.

Manual correction: Remove the constructor

Automatic correction: None

Interface navigability

Navigation is not allowed from an interface.

Manual correction: Deselect navigability on the class side of the association

Automatic correction: Deselects navigability on the class side of the association

Home interface create methods

The return type for create<METHOD> methods must be the bean component interface type. The throws clause must include the javax.ejb.CreateException together with all exceptions defined in the throws clause of the matching ejbCreate<METHOD> and ejbPostCreate<METHOD> methods of the Bean class.

Manual correction: Include the javax.ejb.CreateException and all exceptions defined in the throws clause of the matching ejbCreate<METHOD> and ejbPostCreate<METHOD> methods of the Bean class, or remove exceptions from the ejbPostCreate<METHOD> method

Automatic correction: Includes the javax.ejb.CreateException and all exceptions defined in the throws clause of the matching ejbCreate<METHOD> and ejbPostCreate<METHOD> methods of the Bean class

Home interface finder methods

The return type for find<METHOD> methods must be the bean component interface type (for a single-object finder) or a collection of primary keys thereof (for a multi-object finder). The throws clause must include the javax.ejb.FinderException.

Manual correction: Include the javax.ejb.FinderException in the throws clause

Automatic correction: Includes the javax.ejb.FinderException in the throws clause, and sets Return Type to be the component interface type

The following check applies to BPM Entity Beans only.

The throws clause must include all exceptions defined in the throws clause of the matching ejbFind<METHOD> methods of the Bean class.

Manual correction: Include all exceptions defined in the throws clause of the matching ejbFind<METHOD> methods of the Bean class, or remove exceptions from the ejbFind<METHOD> method

Automatic correction: Includes all exceptions defined in the throws clause of the matching ejbFind<METHOD> methods of the Bean class

Remote Home interface methods

The throws clause of the Remote Home interface methods must include the java.rmi.RemoteException.

Manual correction: Include the java.rmi.RemoteException

Automatic correction: Includes the java.rmi.RemoteException

Component interface business methods

The throws clause of the component interface business methods must include all exceptions defined in the throws clause of the matching method of the Bean class. The throws clause of the Remote interface methods must include the java.rmi.RemoteException.

Manual correction: Include the java.rmi.RemoteException

Automatic correction: Includes the java.rmi.RemoteException

Incomplete bound classifier

A classifier that is of type "Bound" must be bound to a generic classifier.

Manual correction: Specify a generic classifier in the field to the right of the type list on the General tab of the bound classifier's property sheet. You can also connect it to the generic classifier by way of a dependency with stereotype <<bind>>.

Automatic correction: None


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com