blob: 8beb3077e9b4d402f2f26916db0ff5cf81e97d55 [file] [log] [blame]
<html lang=en>
<head>
<meta name="Generated by Rational Rose model" content="D:\work\WTP\org.eclipse.jst.j2ee.core\rose\j2ee.mdl">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="The primkey-field element is used to specify the name of the primary key field for an entity with container-managed persistence. The primkey-field must be one of the fields declared in the cmp-field element, and the type of the field must be the same as the primary key type. The primkey-field element is not used if the primary key maps to multiple container-managed fields (i.e. the key is a compound key). In this case, the fields of the primary key class must be public, and their names must correspond to the field names of the entity bean class that comprise the key. Examples: prim-key-class java.lang.String /prim-key-class prim-key-class com.wombat.empl.EmployeeID /prim-key-class prim-key-class java.lang.Object /prim-key-class ">
<meta name="KeyWords" content="primaryKey,Role primaryKey,j2ee,model j2ee,">
<a href="../root.html" target=_top><IMG SRC="../webviewer/home.gif"BORDER=0></a>
</head>
<body bgcolor = "#FFFFFF">
<p><font FACE="Arial, Geneva" SIZE=3><b><IMG SRC="../webviewer/pub.gif"BORDER=0>primaryKey,&nbsp;role&nbsp;for&nbsp;Element&nbsp;<a href="../cat39ee0e7f014d/cat36549f2c004e/class36549fcc00fa.htm" target="contents_frame">JavaClass</a></b></font></p>
<font FACE="Arial, Geneva" SIZE=2><b>Documentation</b></font><BR><font FACE="Arial, Geneva" SIZE=2>The&nbsp;primkey-field&nbsp;element&nbsp;is&nbsp;used&nbsp;to&nbsp;specify&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;primary&nbsp;key&nbsp;field&nbsp;for&nbsp;an&nbsp;entity&nbsp;with&nbsp;container-managed&nbsp;persistence.&nbsp;&nbsp;The&nbsp;primkey-field&nbsp;must&nbsp;be&nbsp;one&nbsp;of&nbsp;the&nbsp;fields&nbsp;declared&nbsp;in&nbsp;the&nbsp;cmp-field
<BR>element,&nbsp;and&nbsp;the&nbsp;type&nbsp;of&nbsp;the&nbsp;field&nbsp;must&nbsp;be&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;primary&nbsp;key&nbsp;type.&nbsp;&nbsp;The&nbsp;primkey-field&nbsp;element&nbsp;is&nbsp;not&nbsp;used&nbsp;if&nbsp;the&nbsp;primary&nbsp;key&nbsp;maps&nbsp;to&nbsp;multiple&nbsp;container-managed&nbsp;fields&nbsp;(i.e.&nbsp;the&nbsp;key&nbsp;is&nbsp;a&nbsp;compound&nbsp;key).&nbsp;In&nbsp;this&nbsp;case,&nbsp;the&nbsp;fields&nbsp;of&nbsp;the&nbsp;primary&nbsp;key&nbsp;class&nbsp;must&nbsp;be&nbsp;public,&nbsp;and&nbsp;their&nbsp;names&nbsp;must&nbsp;correspond&nbsp;to&nbsp;the&nbsp;field&nbsp;names&nbsp;of&nbsp;the&nbsp;entity&nbsp;bean&nbsp;class&nbsp;that&nbsp;comprise&nbsp;the&nbsp;key.
<BR>Examples:&lt;prim-key-class&gt;java.lang.String&lt;/prim-key-class&gt;
<BR> &lt;prim-key-class&gt;com.wombat.empl.EmployeeID&lt;/prim-key-class&gt;
<BR> &lt;prim-key-class&gt;java.lang.Object&lt;/prim-key-class&gt;
<BR></font><BR><BR>
</body>
</html>