PowerDesigner provides default model checks to verify the validity of classes.
Check |
Description and Correction |
---|---|
Name/Code contains terms not in glossary |
[if glossary enabled] Names and codes must contain only approved terms drawn from the glossary.
|
Name/Code contains synonyms of glossary terms |
[if glossary enabled] Names and codes must not contain synonyms of glossary terms.
|
Name/Code uniqueness |
Object names must be unique in the namespace.
|
Empty classifier |
Attributes and operations are missing for this classifier.
|
Persistent class without persistent attributes |
All attributes of a persistent class cannot be non-persistent.
|
Association class with identifier(s) |
An associated class should not have identifiers.
|
Classifier visibility |
A private or protected classifier should be inner to another classifier.
|
Class constructor return type |
A constructor cannot have a return type.
|
Class constructor modifiers |
A constructor cannot be static, abstract, or final.
|
Operation implementation |
When there is a realization between a class and an interface, you must implement the operations of the interface within the class. To do so, click the Operations tab in the class property sheet and select the To be Implemented button at the bottom of the tab to implement the missing operations.
|
Role name assignment |
A navigable role will be migrated as an attribute into a class. The code of the association is used if the role has no name.
|
Role name uniqueness |
The name of the role is used by another role or by another attribute.
|
JavaBean without a BeanInfo |
Bean implementors that provide explicit information about their beans must provide a BeanInfo class.
|
BeanInfo without a JavaBean class |
A BeanInfo class must depend on a JavaBean class.
|
Emuneration type parent |
A enum may not have children.
|
Bean class definition |
The Bean class must be defined as public. It must define a public constructor that takes no arguments and cannot define the finalize() method. It must be abstract for CMP Entity Beans but cannot be abstract or final for BMP Entity, Session and Message-driven Beans.
|
Bean class Business methods implementation |
For each method defined in the component interface(s), there must be a matching method in the Bean class that has the same name, number, return type and types of arguments.
|
Bean class Home interface methods implementation |
For each create<METHOD> method of the bean Home Interface(s), there must be a matching ejbCreate<METHOD> method in the Bean class with the same method arguments. For each home method of the Home Interface(s), there must be a matching ebjHome<METHOD> method in the Bean class with the same number and types of arguments, and the same return type. The following check applies to Entity Beans only. For each ejbCreate<METHOD> method of the Bean class, there must be a matching ejbPostCreate<METHOD> method in the Bean class with the same number and types of arguments.
The following check applies to BMP Entity Beans only. For each find<METHOD> finder method defined in the bean Home Interface(s), there must be a corresponding ejbFind<METHOD> method with the same number, return type, and types of arguments.
|
Bean class ejbCreate methods |
ejbCreate<METHOD> methods must be defined as public, and cannot be final nor static. The following check applies to Entity Beans only. The return type of an ejbCreate() method must be the primary key type.
The following check applies to Session Beans and Message Driven Beans. and Message Driven Beans. The return type of an ejbCreate() method must be void.
The following check applies to Message Driven Beans only. The Bean class must define an ejbCreate() method that takes no arguments.
|
Bean class ejbPostCreate methods |
The following check applies to Entity Beans only. ejbPostCreate<METHOD> methods must be defined as public, and cannot be final nor static. Their return type must be void.
|
Bean class ejbFind methods |
BMP Entity Bean specific. ejbFind<METHOD> methods must be defined as public and cannot be final nor static. Their return type must be the entity bean primary key type or a collection of primary keys.
|
Bean class ejbHome methods |
ejbHome<METHOD> methods must be defined as public and cannot be static.
|
Bean class ejbSelect methods |
The following check applies to CMP Entity Beans only. EjbSelect <METHOD> methods must be defined as public and abstract. Their throws clause must include the javax.ejb.FinderException.
|
Primary key class definition |
The following check applies to Entity Beans only. The primary key class must be declared as public and must define a public constructor that takes no arguments.
|
Primary key class attributes |
All primary key class attributes must be declared as public. In addition, each primary key class attribute must have a corresponding cmp-field in the Bean class.
|
Primary key class existence |
If the bean class has more than one primary key attribute then a primary key class must exist. If there is only one primary key attribute, it cannot have a standard data type, but must have an object data type (ex: java.lang.Long).
|
Class mapping not defined |
The class must be mapped to tables or views in the data source.
For more information about O/R mapping, see Core Features Guide > Linking and Synchronizing Models > Object Mappings > Object to Relational (O/R) Mapping. |
Attribute mapping not defined |
The attribute must be mapped to columns in the data source.
For more information about O/R mapping, see Core Features Guide > Linking and Synchronizing Models > Object Mappings > Object to Relational (O/R) Mapping. |
Incomplete bound classifier |
A classifier that is of type "Bound" must be bound to a generic classifier.
|
Invalid generation mode |
If a class has its persistence mode set to Migrate Columns, it must have a persistent parent or child to which to migrate the columns
|