Subversion Repositories SmartDukaan

Rev

Rev 34474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34474 Rev 35095
Line 2... Line 2...
2
 
2
 
3
 
3
 
4
import javax.persistence.*;
4
import javax.persistence.*;
5
 
5
 
6
@Entity
6
@Entity
-
 
7
@NamedQuery(
-
 
8
        name = "decrementGift",
-
 
9
        query = "UPDATE GiftEntity g SET g.maxRedemptions = g.maxRedemptions - 1 WHERE g.id = :giftId AND g.maxRedemptions > 0"
-
 
10
)
7
@Table(name = "web.gifts")
11
@Table(name = "web.gifts")
8
public class GiftEntity {
12
public class GiftEntity {
9
    @Id
13
    @Id
10
    @GeneratedValue(strategy = GenerationType.IDENTITY)
14
    @GeneratedValue(strategy = GenerationType.IDENTITY)
11
    private Integer id;
15
    private Integer id;