Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/2.4/a array"

m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{EclipseLink_TLJPA
+
#REDIRECT [[EclipseLink/UserGuide/JPA/2.4/toc]]
|info=n
+
|toc=n
+
|category=JPA
+
|release=2.4.x
+
|title=TLJPA }}
+
<span class="metaname">    </span>
+
 
+
{| class="simple oac_no_warn" width="100%"
+
| align="left" valign="top" | 
+
| width="185" align="right" valign="bottom" |
+
{| class="simple oac_no_warn" width="100%"
+
|
+
| align="center" valign="top" |
+
[[Image:Elug_Magnifier.png|Search]][http://www.google.com/cse/home?cx=016171230611334810008:y5kxq4rqd8s&hl=en Search]
+
| align="center" valign="top" |
+
&nbsp;&nbsp;&nbsp;[[Image:Elug_guide_icon.png|Contents]][[EclipseLink/UserGuide/JPA/2.4/toc| Contents]]
+
|}
+
|}
+
 
+
----
+
 
+
{| width="165"
+
| align="center" |
+
[[EclipseLink/UserGuide/JPA/2.4/a_additionalcriteria| Previous ]]<span class="previouslink">[[Image:Elug_previous_icon.png|Previous]]</span>
+
| align="center" |
+
[[EclipseLink/UserGuide/JPA/2.4/a_batchfetch| Next ]][[Image:Elug_next_icon.png|Next]]
+
|
+
|}
+
 
+
<span id="CHDDDFDA"></span>
+
 
+
----
+
 
+
==@Array==
+
 
+
Use <code>@Array</code> to define object-relational data types supported by specific databases, such as Oracle <code>VARRAY</code> types or PostgreSQL <code>JDBC Struct</code> types.
+
 
+
<span id="sthref20"></span>
+
 
+
''' '''
+
 
+
===Annotation Elements===
+
 
+
[[#CBABBAJF|Table 2-2]] describes this annotation's elements.
+
 
+
<span id="sthref21"></span><span id="CBABBAJF"></span>
+
 
+
'''''Table 2-2 @Array Annotation Elements'''''
+
 
+
{| class="HRuleFormalWide" dir="ltr" title="@Array Annotation Elements" summary="This table describes the list of attributes for this annotation." width="100%" border="1" frame="hsides" rules="rows" cellpadding="3" frame="hsides" rules="rows"
+
|- align="left" valign="top"
+
! id="r1c1-t5" align="left" valign="bottom" | '''Annotation Element'''
+
! id="r1c2-t5" align="left" valign="bottom" | '''Description'''
+
! id="r1c3-t5" align="left" valign="bottom" | '''Default'''
+
|- align="left" valign="top"
+
| id="r2c1-t5" headers="r1c1-t5" align="left" |
+
<code>databaseType</code>
+
| headers="r2c1-t5 r1c2-t5" align="left" |
+
(Required) The name of the database array structure type.
+
| headers="r2c1-t5 r1c3-t5" align="left" | <br />
+
|- align="left" valign="top"
+
| id="r3c1-t5" headers="r1c1-t5" align="left" |
+
<code>targetClass</code>
+
| headers="r3c1-t5 r1c2-t5" align="left" |
+
(Optional only if the collection field or property is defined using Java generics; otherwise Required) The class (basic or embeddable) that is the element type of the collection.
+
| headers="r3c1-t5 r1c3-t5" align="left" |
+
Parameterized type of the collection.
+
|}
+
 
+
<br />
+
 
+
<span id="sthref22"></span>
+
 
+
''' '''
+
 
+
===Usage===
+
 
+
Use <code>@Array</code> on a collection attribute that is persisted to an <code>Array</code> type. The collection can be of basic types or embeddable class mapped using a <code>Struct</code>.
+
 
+
<span id="sthref23"></span>
+
 
+
''' '''
+
 
+
===Examples===
+
 
+
[[#CBABHEHD|Example 2-5]] shows how to use this annotation with an Oracle <code>VARRAY</code> type.
+
 
+
<span id="CBABHEHD"></span>
+
 
+
'''''Example 2-5 Using @Array with Oracle VARRAY'''''
+
 
+
+
+
 
+
[[#CBACGBDA|Example 2-6]] shows how to use this annotation with an Postgress <code>Struct</code> type.
+
 
+
<span id="CBACGBDA"></span>
+
 
+
'''''Example 2-6 Using @Array with Postgress Struct'''''
+
 
+
+
+
 
+
<span id="sthref24"></span>
+
 
+
''' '''
+
 
+
===See Also===
+
 
+
For more information, see the following:
+
 
+
* [[EclipseLink/UserGuide/JPA/2.4/a_struct|"@Struct"]]
+
 
+
<span id="footerspace"> </span>
+
 
+
----
+
 
+
{| class="simple oac_no_warn" width="100%"
+
|-
+
| valign="bottom" |
+
{| width="165"
+
|-
+
|
+
| align="center" |
+
[[EclipseLink/UserGuide/JPA/2.4/a_additionalcriteria| Previous ]]<span class="previouslink">[[Image:Elug_previous_icon.png|Previous]]</span>
+
| align="center" |
+
[[EclipseLink/UserGuide/JPA/2.4/a_batchfetch| Next ]][[Image:Elug_next_icon.png|Next]]
+
|}
+
| width="34%" align="center" |
+
[[Image:Eclipselink-logo.gif|150px|EclispeLink]]<br />[[Image:Elug_home_icon.png|EclipseLink logo]] [http://www.eclipse.org/eclipselink/ EclipseLink Home] • [[Image:Elug_pdf.png|PDF]] PDF (coming soon)<br />
+
| align="right" valign="bottom" |
+
{| class="simple oac_no_warn" width="225"
+
|
+
| align="center" valign="top" |
+
[[Image:Elug_Magnifier.png|Search]][http://www.google.com/cse/home?cx=016171230611334810008:y5kxq4rqd8s&hl=en Search]
+
| align="center" valign="top" |
+
&nbsp;&nbsp;&nbsp;[[Image:Elug_guide_icon.png|Contents]][[EclipseLink/UserGuide/JPA/2.4/toc| Contents]]
+
|}
+
|}
+

Latest revision as of 12:22, 29 June 2012

Back to the top