| <%@ jet package="org.eclipse.jst.j2ee.ejb.gmf.templates.entity" class="TypeStubGenerator" imports="java.util.* org.eclipse.jst.j2ee.ejb.annotation.internal.model.*"%> |
| <% IContainerManagedEntityBean cmp = (IContainerManagedEntityBean)argument; |
| boolean isCMP = true; |
| |
| String primaryKeyType = cmp.getPrimaryKeyClass(); |
| List keyAttributes = cmp.getKeyAttributes(); |
| int pkCount=keyAttributes.size(); |
| boolean isComposite = keyAttributes.size() > 1; |
| |
| %> |
| public abstract class <%= cmp.getSimpleClassName()%> implements <%= cmp.getInterfaces() %> |
| { |
| |
| <% if(isComposite ){ %> |
| /** |
| * Generated Primary Key Class |
| * @generated |
| */ |
| public class PrimaryKey { |
| <% |
| Iterator keys = keyAttributes.iterator(); |
| while(keys.hasNext()){ |
| CMPAttributeDelegate key = (CMPAttributeDelegate) keys.next(); |
| %> |
| /** |
| * @generated |
| */ |
| public <%= key.getAttributeType() %> <%= key.getName() %> ; |
| <% } %> |
| } |
| <% }%> |
| |
| } |