|
|
(7 intermediate revisions 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}}
| + | |
− | | + | |
− | <span class="metaname"> </span>
| + | |
− | | + | |
− | {| class="simple oac_no_warn" width="100%"
| + | |
− | | align="left" valign="top" | '''EclipseLink JPA Extensions Reference Guide'''<br />'''Version 2.4.x'''<br />
| + | |
− | | width="144" align="right" valign="bottom" |
| + | |
− | {| class="simple oac_no_warn" width="100%"
| + | |
− | |
| + | |
− | | align="center" valign="top" |
| + | |
− | [http://www.google.com/cse/home?cx=016171230611334810008:y5kxq4rqd8s&hl=en Search]
| + | |
− | | align="center" valign="top" |
| + | |
− | [[EclipseLink/UserGuide/JPA/toc| Contents]] | + | |
− | |}
| + | |
− | |}
| + | |
− | | + | |
− | ----
| + | |
− | | + | |
− | {| width="100%"
| + | |
− | | align="center" |
| + | |
− | [[EclipseLink/UserGuide/JPA/a_additionalcriteria|<- Previous]]
| + | |
− | | align="center" |
| + | |
− | [[EclipseLink/UserGuide/JPA/a_batchfetch|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="sthref21"></span>
| + | |
− | | + | |
− | ''' '''
| + | |
− | | + | |
− | ===Annotation Elements===
| + | |
− | | + | |
− | [[#CBABBAJF|Table 2-1]] describes this annotation's elements.
| + | |
− | | + | |
− | <span id="sthref22"></span><span id="CBABBAJF"></span>
| + | |
− | | + | |
− | '''''Table 2-1 @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-t2" align="left" valign="bottom" | '''Annotation Element'''
| + | |
− | ! id="r1c2-t2" align="left" valign="bottom" | '''Description'''
| + | |
− | ! id="r1c3-t2" align="left" valign="bottom" | '''Default'''
| + | |
− | |- align="left" valign="top"
| + | |
− | | id="r2c1-t2" headers="r1c1-t2" align="left" |
| + | |
− | <code>databaseType</code>
| + | |
− | | headers="r2c1-t2 r1c2-t2" align="left" |
| + | |
− | (Required) The name of the database array structure type.
| + | |
− | | headers="r2c1-t2 r1c3-t2" align="left" | <br />
| + | |
− | |- align="left" valign="top"
| + | |
− | | id="r3c1-t2" headers="r1c1-t2" align="left" |
| + | |
− | <code>targetClass</code>
| + | |
− | | headers="r3c1-t2 r1c2-t2" 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-t2 r1c3-t2" align="left" |
| + | |
− | Parameterized type of the collection.
| + | |
− | |}
| + | |
− | | + | |
− | <br />
| + | |
− | | + | |
− | <span id="sthref23"></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="sthref24"></span>
| + | |
− | | + | |
− | ''' '''
| + | |
− | | + | |
− | ===Examples===
| + | |
− | | + | |
− | <span id="sthref25"></span>
| + | |
− | | + | |
− | '''''Example 2-1 Using @Array with Oracle VARRAY'''''
| + | |
− | | + | |
− |
| + | |
− | | + | |
− | <span id="sthref26"></span>
| + | |
− | | + | |
− | '''''Example 2-2 Using @Array with Postgress Struct'''''
| + | |
− | | + | |
− |
| + | |
− | | + | |
− | <span id="sthref27"></span>
| + | |
− | | + | |
− | ''' '''
| + | |
− | | + | |
− | ===See Also===
| + | |
− | | + | |
− | For more information, see the following:
| + | |
− | | + | |
− | * [[EclipseLink_UserGuide/JPA/a_struct|"@Struct"]]
| + | |
− | | + | |
− | ----
| + | |
− | | + | |
− | {| class="simple oac_no_warn" width="100%"
| + | |
− | |-
| + | |
− | | valign="bottom" |
| + | |
− | {| width="100%"
| + | |
− | |-
| + | |
− | |
| + | |
− | | align="center" |
| + | |
− | [[EclipseLink/UserGuide/JPA/a_additionalcriteria|<- Previous]]
| + | |
− | | align="center" |
| + | |
− | [[EclipseLink/UserGuide/JPA/a_batchfetch|Next ->]]
| + | |
− | |}
| + | |
− | | width="34%" align="center" |
| + | |
− | [[Image:Eclipselink-logo.gif|150px|EclispeLink]]<br />[http://wiki.eclipse.org/EclipseLink EclipseLink Home]<br />
| + | |
− | | align="right" valign="bottom" |
| + | |
− | {| class="simple oac_no_warn" width="225"
| + | |
− | |
| + | |
− | | align="center" valign="top" |
| + | |
− | [http://www.google.com/cse/home?cx=016171230611334810008:y5kxq4rqd8s&hl=en Search]
| + | |
− | | align="center" valign="top" |
| + | |
− | [[EclipseLink/UserGuide/JPA/toc| Contents]]
| + | |
− | |}
| + | |
− | |}
| + | |