Skip to Content
image image

1.Invalid Jar- No JavaBeans available for Import

2.Relations are getting generated by BeanImporter….etc etc

These are the problems that we are facing while importing the JavaBean Model

Java bean model is most often model importer in WebDynpro. This weblog expalins what are the pre requisites,limitations of using javaBean Model Importer in WebDynpro.

1. Prerequisites

NetWeaver Development Studio (SP9) onwards

2.Requirements

2.1 WebDynpro relevant properties, methods, and relations must be modeled with public visibility

2.2 Datatypes used for properties are limited to java primitive types as well as the primitive Wrapper classes (except byte and java.lang.Byte).

2.3 In addition, java.lang.Object, java.math.BigDecimal, java.sql.Date and java.sql.Time are supported. BUT, java.util.Date is not supported (use java.sql.Date instead)

The other complex datatypes are identified as relations.

2.4 For each property, there must be a getter method for read-only properties, additionally a setter method for read/write properties

There need not be an appropriate member, a getter/setter method is sufficient. E.g. for the read/write property String firstName the following two methods must be implemented:

public String getFirstName();

public void setFirstName(String value);

2.5 The getter methods which return non-primitive types will be identified as relations

Depending on the cardinality of the relation role, the accessors/mutators are as follows:
– singular relation roles (0..1 or 1..1): public Customer getCustomer(); public void setCustomer(Customer value); – multiple relation roles (0..* or 1..*): public java.util.List getOrders();

3. Limitations

3.1.Interfaces/Abstract classes are not supported. Only Java classes are imported as model into the WebDynpro Project
3.2.Only getter/setter methods are imported as either properties or relations. User-defined methods are not imported

3.3.Arrays are not supported

3.Naming Conventions

1.For properties, the name of the model property, that will be imported, will be the programmatic name of the corresponding getter/setter method For e.g. for the getter method public String getFirstName(); The property name is identified as firstName.
2.For relations

a. Name of the relation -"className" + "." + 'propertyName'

i. className – name of the javabean class for which this relation is being identified ii. propertyName – programmatic name of the getter method whose return type is not a simple type b. Source Role Name i. If the relation is unidirectional -“relationName” + “.” + “untitled”

ii. If the relation is bi-directional – “className” className – name of the javabean class for which this relation is being identified c. Target Role Name – “propertyName” propertyName – programmatic name of the getter method whose return type is not a simple type

image

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply