KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ce > auction > persistence > package-info


1 @TypeDefs({
2     @TypeDef(
3         name="monetary_amount_usd",
4         typeClass = MonetaryAmountType.class,
5         parameters = { @Parameter(name="convertTo", value="USD") }
6     ),
7     @TypeDef(
8         name="monetary_amount_eur",
9         typeClass = MonetaryAmountType.class,
10         parameters = { @Parameter(name="convertTo", value="EUR") }
11     ),
12     @TypeDef(
13         name="item_state",
14         typeClass = EnumUserType.class,
15         parameters = { @Parameter(name="enumClassName", value="org.hibernate.ce.auction.model.ItemState") }
16     ),
17
18     @TypeDef(
19         name="creditcard_type",
20         typeClass = EnumUserType.class,
21         parameters = { @Parameter(name="enumClassName", value="org.hibernate.ce.auction.model.CreditCardType") }
22     ),
23     @TypeDef(
24         name="rating",
25         typeClass = EnumUserType.class,
26         parameters = { @Parameter(name="enumClassName", value="org.hibernate.ce.auction.model.Rating") }
27     )
28 })
29
30 @NamedQueries({
31     @NamedQuery(
32         name="minBid",
33         queryString="select b from Bid b where b.amount.value = (select min(b.amount.value) from Bid b where b.item.id = :itemid)"
34     ),
35     @NamedQuery(
36         name="maxBid",
37         queryString="select b from Bid b where b.amount.value = (select max(b.amount.value) from Bid b where b.item.id = :itemid)"
38     )
39 })
40
41 package org.hibernate.ce.auction.persistence;
42
43 import org.hibernate.annotations.*;
44 import javax.persistence.*;
45
Popular Tags